fourjay / vcscommand

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

Handling of multiple VCS #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have a CVS repository and hg repository in the same directory

What is the expected output? What do you see instead?
Its not a defect as such, more of a feature request. At work I have to use CVS 
but locally use mercurial so I can actually have a version control system. I 
overlay the two, and have some scripts that handle the interaction. However in 
vim, when I use VCSLog etc I would like to be able to choose which system to 
use, or even to have CVSLog, HGLog to forcefully override it myself. I briefly 
looked inside the code and saw that it shouldn't actually work at all:

    if len(matches) == 1
        call setbufvar(a:buffer, 'VCSCommandVCSType', matches[0])
        return matches[0]
    elseif len(matches) == 0
        throw 'No suitable plugin'
    else
        throw 'Too many matching VCS:  ' . join(matches)
    endif

But in my case, it just does a VCSLog for mercurial.

What version of the product are you using? On what operating system?
gvim 7.3.46
vcscommand - I cant find a version number, but downloaded about 4 weeks ago
windows 7

Please provide any additional information below.

Original issue reported on code.google.com by stephen....@gmail.com on 16 Feb 2011 at 9:56

GoogleCodeExporter commented 8 years ago
Update:
I found the zip file I downloaded, vcscommand-1.99.42.zip

Original comment by stephen....@gmail.com on 16 Feb 2011 at 10:03

GoogleCodeExporter commented 8 years ago
Please take a look at the VCSCommandVCSTypeOverride variable.  You can do 
something like the following in your vimrc:

let VCSCommandVCSTypeOverride=[["^/cygdrive/f/src", "HG"]]

... changing the path to the appropriate place.  This allows very fine-grained 
control of which VCS to apply to a given path.

Original comment by bob.hies...@gmail.com on 3 Jun 2011 at 9:03

GoogleCodeExporter commented 8 years ago
If you want to globally prefer a VCS over other ones that match, you can use 
the plugin at the following link:

http://repo.or.cz/w/vcscommand.git/snapshot/dev/preferred.zip

That version implements a preference option, 'VCSCommandVCSTypePreference'.  
You can use that to specify, for instance,

let VCSCommandVCSTypePreference=['hg']

I'm still considering more options to explicitly control the type for a given 
command.

Original comment by bob.hies...@gmail.com on 7 Jul 2011 at 4:24

GoogleCodeExporter commented 8 years ago
Going back to the original request for a more dynamic, command-by-command 
override, if you use the version at the following link:

http://repo.or.cz/w/vcscommand.git/snapshot/dev/override.zip

... you can then define your own commands in your vimrc similar to:

:com! -nargs=+ HG let VCSCommandVCSTypeExplicitOverride='HG'|execute <q-args> 
|unlet VCSCommandVCSTypeExplicitOverride

:com! -nargs=+ CVS let VCSCommandVCSTypeExplicitOverride='CVS'|execute <q-args> 
|unlet VCSCommandVCSTypeExplicitOverride

Having done that, you could then do:

:CVS VCSLog
:HG VCSDiff

Please let me know if that answers your need.

Original comment by bob.hies...@gmail.com on 7 Jul 2011 at 5:26

GoogleCodeExporter commented 8 years ago
Closing due to inactivity.

Original comment by bob.hies...@gmail.com on 3 Oct 2011 at 5:27