Mercurial > hg
comparison mercurial/commands.py @ 19234:7bbad79b9542
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 23 May 2013 17:52:21 -0500 |
parents | 6cf8e3b4e074 b592fd33233a |
children | 043abd6a91d1 |
comparison
equal
deleted
inserted
replaced
19233:81d9a7f6f2e7 | 19234:7bbad79b9542 |
---|---|
1323 See :hg:`help dates` for a list of formats valid for -d/--date. | 1323 See :hg:`help dates` for a list of formats valid for -d/--date. |
1324 | 1324 |
1325 Returns 0 on success, 1 if nothing changed. | 1325 Returns 0 on success, 1 if nothing changed. |
1326 """ | 1326 """ |
1327 if opts.get('subrepos'): | 1327 if opts.get('subrepos'): |
1328 if opts.get('amend'): | |
1329 raise util.Abort(_('cannot amend with --subrepos')) | |
1328 # Let --subrepos on the command line override config setting. | 1330 # Let --subrepos on the command line override config setting. |
1329 ui.setconfig('ui', 'commitsubrepos', True) | 1331 ui.setconfig('ui', 'commitsubrepos', True) |
1330 | 1332 |
1331 extra = {} | 1333 extra = {} |
1332 if opts.get('close_branch'): | 1334 if opts.get('close_branch'): |
1335 branch = repo[None].branch() | 1337 branch = repo[None].branch() |
1336 bheads = repo.branchheads(branch) | 1338 bheads = repo.branchheads(branch) |
1337 | 1339 |
1338 if opts.get('amend'): | 1340 if opts.get('amend'): |
1339 if ui.configbool('ui', 'commitsubrepos'): | 1341 if ui.configbool('ui', 'commitsubrepos'): |
1340 raise util.Abort(_('cannot amend recursively')) | 1342 raise util.Abort(_('cannot amend with ui.commitsubrepos enabled')) |
1341 | 1343 |
1342 old = repo['.'] | 1344 old = repo['.'] |
1343 if old.phase() == phases.public: | 1345 if old.phase() == phases.public: |
1344 raise util.Abort(_('cannot amend public changesets')) | 1346 raise util.Abort(_('cannot amend public changesets')) |
1345 if len(repo[None].parents()) > 1: | 1347 if len(repo[None].parents()) > 1: |