summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-16 21:22:18 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-16 21:22:18 -0700
commit17a76f21f811e7e5741fa259ef5a635fddfdb75a (patch)
tree30851aa5691c76e81ea4bc3eab159d7c0152075a
parent630ea9d916bd6e09a1af6414ae7fbe83ecd2331f (diff)
downloadportage-17a76f21f811e7e5741fa259ef5a635fddfdb75a.tar.gz
portage-17a76f21f811e7e5741fa259ef5a635fddfdb75a.tar.bz2
portage-17a76f21f811e7e5741fa259ef5a635fddfdb75a.zip
repoman: support --echangelog=force
Allows forced ChangeLog generation even when the vcs has detected that the ChangeLog has already been modified.
-rwxr-xr-xbin/repoman11
-rw-r--r--man/repoman.15
2 files changed, 9 insertions, 7 deletions
diff --git a/bin/repoman b/bin/repoman
index ba810c66c..ad1e68830 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -195,8 +195,9 @@ def ParseArgs(argv, qahelp):
help='do not print unnecessary messages')
parser.add_option(
- '--echangelog', type='choice', choices=('y', 'n'), metavar="<y|n>",
- help='for commit mode, call echangelog if ChangeLog is unmodified')
+ '--echangelog', type='choice', choices=('y', 'n', 'force'), metavar="<y|n|force>",
+ help='for commit mode, call echangelog if ChangeLog is unmodified (or '
+ 'regardless of modification if \'force\' is specified)')
parser.add_option('-f', '--force', dest='force', default=False, action='store_true',
help='Commit with QA violations')
@@ -654,7 +655,7 @@ if vcs is None:
# This is needed because they try to avoid merge collisions.
# Gentoo's Council decided to always use the ChangeLog file.
# TODO: shouldn't this just be switched on the repo, iso the VCS?
-check_changelog = options.echangelog != 'y' and vcs in ('cvs', 'svn')
+check_changelog = options.echangelog not in ('y', 'force') and vcs in ('cvs', 'svn')
# Generate an appropriate PORTDIR_OVERLAY value for passing into the
# profile-specific config constructor calls.
@@ -2419,7 +2420,7 @@ else:
print("* aborting commit.")
sys.exit(1)
- if options.echangelog == 'y':
+ if options.echangelog in ('y', 'force'):
logging.info("checking for unmodified ChangeLog files")
for x in sorted(vcs_files_to_cps(
chain(myupdates, mymanifests, myremoved))):
@@ -2434,7 +2435,7 @@ else:
changelog_path = os.path.join(checkdir_relative, "ChangeLog")
changelog_modified = changelog_path in modified_changelogs
- if changelog_modified:
+ if changelog_modified and options.echangelog != 'force':
continue
# get changes for this package
diff --git a/man/repoman.1 b/man/repoman.1
index 4d22e8d1c..2e4c86cf4 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -41,8 +41,9 @@ Forces the metadata.xml parse check to be carried out
\fB-v\fR, \fB--verbose\fR
Displays every package name while checking
.TP
-\fB\-\-echangelog=<y|n>\fR
-For commit mode, call echangelog if ChangeLog is unmodified
+\fB\-\-echangelog=<y|n|force>\fR
+For commit mode, call echangelog if ChangeLog is unmodified (or
+regardless of modification if 'force' is specified)
.TP
\fB\-\-if\-modified=<y|n>\fR
Only check packages that have uncommitted modifications