ramccor / vcscommand

Automatically exported from code.google.com/p/vcscommand
0 stars 0 forks source link

Add priority to VCS identification algorithm. #103

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The current VCS identification algorithm results in undecidable ties when two 
or more VCS are detected.  To help break the tie, it's possible to assign a 
priority to each detected VCS such that more "local" VCS are considered higher 
priority (such as when $HOME is stored in one VCS and $HOME/some/project is 
ignored by the outer VCS and itself uses another VCS).

Attached is a patch that implements this priority concept.  The patch is also 
available on github at:
git://github.com/drmikehenry/vcscommand.vim.git
with SHA1:
2c1dc008d4eeb7204f01c01f71cb8a01c066e9d0

The patch is done against the latest released VCSCommand (1.99.46).  My testing 
was done on Fedora 17.

Thanks,
Michael Henry

Original issue reported on code.google.com by drmikehe...@gmail.com on 3 Feb 2013 at 1:09

Attachments:

GoogleCodeExporter commented 9 years ago
This looks reasonable on the face of it.  It does a better job on the likely 
common use case of nested VCS than the old exact vs inexact.  If I can't think 
of a situation where it would cause unexpected behavior, I'll incorporate it.  
Thanks!

I believe the 'unlet preferences' is still necessary, though I haven't reviewed 
the code in depth.  You can't assign a string to a variable that previously 
contained a list, or vice versa. 

Original comment by bob.hies...@gmail.com on 4 Feb 2013 at 4:17

GoogleCodeExporter commented 9 years ago
Thanks for the explanation about 'unlet'.  I hadn't realized Vim behaved that 
way.  I thought this was just a stray line of code that was left over from 
refactoring.

Original comment by drmikehe...@gmail.com on 5 Feb 2013 at 11:13

GoogleCodeExporter commented 9 years ago

Original comment by bob.hies...@gmail.com on 12 Apr 2013 at 2:58