diff options
author | Michał Górny <gentoo@mgorny.alt.pl> | 2010-07-12 00:14:39 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-11 15:21:13 -0700 |
commit | d0b7c3d7ff9b89d700b4dfd0cd51705aa02bd48e (patch) | |
tree | 61ebe2daec318367083468d0c2dfa8e8ac5928d8 | |
parent | fc0e49d98177691813fe81d0ef678bb7192180b3 (diff) | |
download | portage-d0b7c3d7ff9b89d700b4dfd0cd51705aa02bd48e.tar.gz portage-d0b7c3d7ff9b89d700b4dfd0cd51705aa02bd48e.tar.bz2 portage-d0b7c3d7ff9b89d700b4dfd0cd51705aa02bd48e.zip |
Support '--ask' option to 'repoman commit'.
-rwxr-xr-x | bin/repoman | 8 | ||||
-rw-r--r-- | man/repoman.1 | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman index f14dc4533..3532c4b2b 100755 --- a/bin/repoman +++ b/bin/repoman @@ -52,6 +52,7 @@ from repoman import utilities from repoman.herdbase import make_herd_base from _emerge.Package import Package from _emerge.RootConfig import RootConfig +from _emerge.userquery import userquery import portage.checksum import portage.const import portage.dep @@ -163,6 +164,9 @@ def ParseArgs(args, qahelp): parser.description += "\nDistributed under the terms of the GNU General Public License v2" parser.description += "\nmodes: " + " | ".join(map(green,mode_keys)) + parser.add_option('-a', '--ask', dest='ask', + help='Request a confirmation before commiting') + parser.add_option('-m', '--commitmsg', dest='commitmsg', help='specify a commit message on the command line') @@ -2276,6 +2280,10 @@ else: commitmessage += ", RepoMan options: --force" commitmessage += ")" + if options.ask and userquery('Commit changes?', True) != 'Yes': + print("* aborting commit.") + sys.exit(1) + if vcs in ('cvs', 'svn') and (myupdates or myremoved): myfiles = myupdates + myremoved if not myheaders and "sign" not in repoman_settings.features: diff --git a/man/repoman.1 b/man/repoman.1 index aec8b7adb..362e6e538 100644 --- a/man/repoman.1 +++ b/man/repoman.1 @@ -12,6 +12,9 @@ checks the quality of ebuild repositories. Note: \fBrepoman commit\fR only works \fIinside local\fR cvs, git, or subversion repositories. .SH OPTIONS .TP +\fB-a\fR, \fB--ask\fR +Request a confirmation before commiting +.TP \fB--force\fR Force commit to proceed, regardless of QA issues. For convenience, this option causes the most time consuming QA checks to be skipped. The commit message will |