summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2010-10-11 09:22:55 +0200
committerZac Medico <zmedico@gentoo.org>2010-10-11 00:31:01 -0700
commit579d11b4def198d9ce48dd4e73d6f805e501dd81 (patch)
tree5494681ab855778605145e2640f4b04d8a1cfcba
parentde5bbdc286f52543607161b1bdcc4bcf8e003f1e (diff)
downloadportage-579d11b4def198d9ce48dd4e73d6f805e501dd81.tar.gz
portage-579d11b4def198d9ce48dd4e73d6f805e501dd81.tar.bz2
portage-579d11b4def198d9ce48dd4e73d6f805e501dd81.zip
Don't look for $Header$ when using svn.
Subversion doesn't expand $Header$, so look only for $Id$ if using subversion. In addition, the whole grepping code is now executed only for CVS and Subversion.
-rwxr-xr-xbin/repoman40
1 files changed, 23 insertions, 17 deletions
diff --git a/bin/repoman b/bin/repoman
index 1308ec717..3526fde79 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2217,23 +2217,6 @@ else:
mymanifests = list(mymanifests)
myheaders = []
mydirty = []
- headerstring = "'\$(Header|Id)"
- headerstring += ".*\$'"
- for myfile in myupdates:
-
- # for CVS, no_expansion contains files that are excluded from expansion
- if vcs == "cvs":
- if myfile in no_expansion:
- continue
-
- # for SVN, expansion contains files that are included in expansion
- elif vcs == "svn":
- if myfile not in expansion:
- continue
-
- myout = subprocess_getstatusoutput("egrep -q "+headerstring+" "+myfile)
- if myout[0] == 0:
- myheaders.append(myfile)
print("* %s files being committed..." % green(str(len(myupdates))), end=' ')
if vcs in ('git', 'bzr', 'hg'):
@@ -2242,9 +2225,32 @@ else:
# committed in one big commit at the end.
print()
else:
+ if vcs == 'cvs':
+ headerstring = "'\$(Header|Id)"
+ elif vcs == 'svn':
+ headerstring = "'\$Id"
+ headerstring += ".*\$'"
+
+ for myfile in myupdates:
+
+ # for CVS, no_expansion contains files that are excluded from expansion
+ if vcs == "cvs":
+ if myfile in no_expansion:
+ continue
+
+ # for SVN, expansion contains files that are included in expansion
+ elif vcs == "svn":
+ if myfile not in expansion:
+ continue
+
+ myout = subprocess_getstatusoutput("egrep -q "+headerstring+" "+myfile)
+ if myout[0] == 0:
+ myheaders.append(myfile)
+
print("%s have headers that will change." % green(str(len(myheaders))))
print("* Files with headers will cause the " + \
"manifests to be made and recommited.")
+
logging.info("myupdates: %s", myupdates)
logging.info("myheaders: %s", myheaders)