Fix `svn status` output parsing for compatibility with subversion-1.6. Thanks
authorZac Medico <zmedico@gentoo.org>
Thu, 2 Oct 2008 16:57:45 +0000 (16:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 2 Oct 2008 16:57:45 +0000 (16:57 -0000)
to Arfrever for this patch.

svn path=/main/trunk/; revision=11613

bin/repoman

index b30f6ab2906f86288ebce95d62a0e9c8ab13349a..e281284caa82030c0e6d8e2a0ba2a5fe37036918 100755 (executable)
@@ -753,8 +753,8 @@ if vcs == "cvs":
 
 if vcs == "svn":
        svnstatus = os.popen("svn status").readlines()
-       mychanged = [ "./" + elem.rstrip()[7:] for elem in svnstatus if elem and elem[:1] in "MR" ]
-       mynew     = [ "./" + elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
+       mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR" ]
+       mynew     = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A") ]
 
 if vcs:
        new_ebuilds.update(x for x in mynew if x.endswith(".ebuild"))
@@ -1711,9 +1711,9 @@ else:
        if vcs == "svn":
                if myautoadd:
                        svnstatus = os.popen("svn status").readlines()
-                       mychanged = [ "./" + elem.rstrip()[7:] for elem in svnstatus if elem and elem[:1] in "MR" ]
-                       mynew     = [ "./" + elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
-               myremoved = [ "./" + elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
+                       mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR" ]
+                       mynew     = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A") ]
+               myremoved = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D") ]
                # in contrast to CVS, SVN expands nothing by default.
                # bin_blobs historically
                # were just there to see what files need to be checked for