Improved repoman SVN support:
authorFabian Groffen <grobian@gentoo.org>
Sun, 19 Nov 2006 17:02:23 +0000 (17:02 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 19 Nov 2006 17:02:23 +0000 (17:02 -0000)
- svn list returns outdated information if not preceded by svn update
- svn list doesn't return information on newly added files, so for SVN
  run svn status to get the added files
This fixes problems with phantom files being reported as not added,
while they either don't exist any more in the repo, or are added for
sure.

svn path=/main/branches/prefix/; revision=5090

bin/repoman

index 7950c7a71e82194c141089c28327d12170b127a9..2311ba29c5f44076f92b14ec7008c284538a2854 100755 (executable)
@@ -866,7 +866,7 @@ for x in scanlist:
                        if isCvs:
                                myf=open(checkdir+"/CVS/Entries","r")
                        if isSvn:
-                               myf=os.popen("svn list")
+                               myf=os.popen("svn update > /dev/null; svn list")
                        myl=myf.readlines()     
                        myf.close()
                        for l in myl:
@@ -884,6 +884,15 @@ for x in scanlist:
                                                continue
                                        if l[-7:] == ".ebuild":
                                                eadded.append(l[:-7])
+                       if isSvn:
+                               myf=os.popen("svn status")
+                               myl=myf.readlines()
+                               myf.close()
+                               for l in myl:
+                                       if l[0] == "A":
+                                               l = l.rstrip().split(' ')[-1]
+                                               if l[-7:] == ".ebuild":
+                                                       eadded.append(l[:-7])
                except IOError:
                        if mymode=="commit" and isCvs:
                                stats["CVS/Entries.IO_error"] += 1