views:

218

answers:

5

If you have some directories from different version control systems (cvs, svn...), how do you find out what type of repository each came from?

+1  A: 

"svn info" is the command you want.

/some/random/directory/in/project/space/

$ svn info

Path: .
URL: https://example.org/svn/project/space/
Repository Root: https://example.org/svn/project/
Repository UUID: aaaaaaaa-bbbb-cccc-dddd-333333333333
Revision: 295
Node Kind: directory
Schedule: normal
Last Changed Author: kurt
Last Changed Rev: 295
Last Changed Date: 2008-12-14 01:43:24 -0500 (Thu, 18 Dec 2008)
Kurt
A: 

As kurt said, svn info will give you lots of information. If you just want to know whether this directory is under revision control or not, you can look for the folder with all the data in it -- for svn it's called '.svn' (you may have to switch on view hidden directories) for darcs its '_darcs'.

Greg
A: 

TortoiseSVN displays icon overlays within Windows Explorer (on Windows, of course). You can right-click (the fact the repository uses TortoiseSVN is obvious at this point) and get information, help, and many SVN functions on the context menu.

If any revision control systems also use icon overlays, you still might have the same problem if you use more than one system, as you state above.

And as Greg states, there is also a .svn folder in each directory under SVN.

Rich J
+2  A: 

Are there .svn folders? -> SVN

Are there CVS folders? -> CVS

Are there files ending in .scc and .vssscc (probably depending a bit on the VSS version)? -> Microsoft Visual SourceSafe

Arnout
A: 

Ok thanx for your answers, in future i will probably do a script which highlight differently a directory giving its version control, when i am advanced in bash. For the moment i will use svn info.

toddoon
This is not an answer. Use a comment or edit your question.
Geoffrey Chetwood