FindVCS: support Subversion 1.7
authorFabian Groffen <grobian@gentoo.org>
Sat, 15 Oct 2011 12:41:13 +0000 (14:41 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sat, 15 Oct 2011 12:41:13 +0000 (14:41 +0200)
Since subversion 1.7, only a top-level .svn dir is used.  Make FindVCS
also deal with that.  (Tested with repoman on Prefix SVN-based tree.)

pym/repoman/utilities.py

index 380f8edb52ec0d1549ffba881f104271da25b852..79137036c36a68a72b84ea6faee9af270adfe1a7 100644 (file)
@@ -472,7 +472,7 @@ def FindVCS():
        outvcs = []
 
        def seek(depth = None):
-               """ Seek for distributed VCSes. """
+               """ Seek for VCSes that have a top-level data directory only. """
                retvcs = []
                pathprep = ''
 
@@ -483,6 +483,8 @@ def FindVCS():
                                retvcs.append('bzr')
                        if os.path.isdir(os.path.join(pathprep, '.hg')):
                                retvcs.append('hg')
+                       if os.path.isdir(os.path.join(pathprep, '.svn')):  # >=1.7
+                               retvcs.append('svn')
 
                        if retvcs:
                                break
@@ -497,7 +499,7 @@ def FindVCS():
        # Level zero VCS-es.
        if os.path.isdir('CVS'):
                outvcs.append('cvs')
-       if os.path.isdir('.svn'):
+       if os.path.isdir('.svn'):  # <1.7
                outvcs.append('svn')
 
        # If we already found one of 'level zeros', just take a quick look