Patchwork D726: uncommit: rename the flag 'empty' to 'keep' which retains empty changeset

login
register
mail settings
Submitter phabricator
Date Sept. 20, 2017, 4:26 p.m.
Message ID <722c5dc9623c99f9980bc0bbc0848e0b@localhost.localdomain>
Download mbox | patch
Permalink /patch/24048/
State Not Applicable
Headers show

Comments

phabricator - Sept. 20, 2017, 4:26 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf94442d46984: uncommit: rename the flag &#039;empty&#039; to &#039;keep&#039; which retains empty changeset (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D726?vs=1864&id=1924

REVISION DETAIL
  https://phab.mercurial-scm.org/D726

AFFECTED FILES
  hgext/uncommit.py
  tests/test-uncommit.t

CHANGE DETAILS




To: pulkit, #hg-reviewers, krbullock, durin42
Cc: krbullock, mercurial-devel

Patch

diff --git a/tests/test-uncommit.t b/tests/test-uncommit.t
--- a/tests/test-uncommit.t
+++ b/tests/test-uncommit.t
@@ -30,7 +30,7 @@ 
   
   options ([+] can be repeated):
   
-      --empty               allow an empty commit after uncommiting
+      --keep                allow an empty commit after uncommiting
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
   
@@ -286,7 +286,7 @@ 
   > P
   > EOS
   $ hg up Q -q
-  $ hg uncommit --empty
+  $ hg uncommit --keep
   $ hg log -G -T '{desc} FILES: {files}'
   @  Q FILES:
   |
diff --git a/hgext/uncommit.py b/hgext/uncommit.py
--- a/hgext/uncommit.py
+++ b/hgext/uncommit.py
@@ -133,7 +133,7 @@ 
         ds.copy(src, dst)
 
 @command('uncommit',
-    [('', 'empty', False, _('allow an empty commit after uncommiting')),
+    [('', 'keep', False, _('allow an empty commit after uncommiting')),
     ] + commands.walkopts,
     _('[OPTION]... [FILE]...'))
 def uncommit(ui, repo, *pats, **opts):
@@ -163,7 +163,7 @@ 
 
         with repo.transaction('uncommit'):
             match = scmutil.match(old, pats, opts)
-            newid = _commitfiltered(repo, old, match, opts.get('empty'))
+            newid = _commitfiltered(repo, old, match, opts.get('keep'))
             if newid is None:
                 ui.status(_("nothing to uncommit\n"))
                 return 1