Improve svn properties reading, thanks to Arfrever in #-portage.
authorFabian Groffen <grobian@gentoo.org>
Sun, 27 Jul 2008 14:54:44 +0000 (14:54 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 27 Jul 2008 14:54:44 +0000 (14:54 -0000)
svn path=/main/branches/prefix/; revision=11225

bin/repoman

index e3336b5e134573e783a3428d4268f6e613244f6c..a164b4c3f5dd950d1443511ea8fbeebe174ebde2 100755 (executable)
@@ -1753,13 +1753,14 @@ else:
                mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("M") ]
                mynew     = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
                myremoved = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
-               # in contrast to CVS, SVN expands nothing by default, but of
-               # course proplist's output is horrible.  bin_blobs historically
+               # in contrast to CVS, SVN expands nothing by default.
+               # bin_blobs historically
                # were just there to see what files need to be checked for
                # keyword expansion, which is exactly what we do here, so
-               # slightly change the semantic meaning of "bin_blob"...
-               props = os.popen("svn proplist -R").readlines()
-               expansion = [ prop[15:-3] for prop in props if prop.startswith("Properties on '") ]
+               # slightly change the semantic meaning of "bin_blob"...  In the
+               # future we could store which keyword is expanded.
+               props = os.popen("svn propget -R svn:keywords").readlines()
+               expansion = [ prop.split("-")[0].strip() for prop in props ]
 
        if vcs:
                if not (mychanged or mynew or myremoved):