[PATCH 2 of 2] add --force to commit options

Johan Euphrosine proppy at google.com
Mon Jan 9 07:46:02 CST 2012


# HG changeset patch
# User Johan Euphrosine <proppy at google.com>
# Date 1326116607 -3600
# Node ID a08547027b43603f26e71fd03f855fdd8b226a94
# Parent  afdf4f5bac6147476ef4834707e5bfd687e39202
add --force to commit options

diff -r afdf4f5bac61 -r a08547027b43 mercurial/commands.py
--- a/mercurial/commands.py	Mon Dec 26 15:01:06 2011 +0100
+++ b/mercurial/commands.py	Mon Jan 09 14:43:27 2012 +0100
@@ -1154,6 +1154,7 @@
      _('mark new/missing files as added/removed before committing')),
     ('', 'close-branch', None,
      _('mark a branch as closed, hiding it from the branch list')),
+    ('f', 'force', None, _('force a merge commit with outstanding changes'))
     ] + walkopts + commitopts + commitopts2 + subrepoopts,
     _('[OPTION]... [FILE]...'))
 def commit(ui, repo, *pats, **opts):
@@ -1195,7 +1196,7 @@
 
     def commitfunc(ui, repo, message, match, opts):
         return repo.commit(message, opts.get('user'), opts.get('date'), match,
-                           editor=e, extra=extra)
+                           editor=e, extra=extra, force=opts.get('force'))
 
     branch = repo[None].branch()
     bheads = repo.branchheads(branch)


More information about the Mercurial-devel mailing list