Patchwork D6855: amend: enable support for closing the branch

login
register
mail settings
Submitter phabricator
Date Sept. 16, 2019, 5:55 p.m.
Message ID <6042d06f15219ed951716add8e5e317d@localhost.localdomain>
Download mbox | patch
Permalink /patch/41682/
State Not Applicable
Headers show

Comments

phabricator - Sept. 16, 2019, 5:55 p.m.
Closed by commit rHG09d46b90f6f9: amend: enable support for closing the branch (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6855?vs=16548&id=16557

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6855/new/

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

AFFECTED FILES
  hgext/amend.py
  relnotes/next
  tests/test-amend.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-amend.t b/tests/test-amend.t
--- a/tests/test-amend.t
+++ b/tests/test-amend.t
@@ -450,6 +450,12 @@ 
   abort: --date and --currentdate are mutually exclusive
   [255]
 
+Close branch
+
+  $ hg amend --close-branch
+  $ hg log --limit 1 -T 'close={get(extras, "close")}\n'
+  close=1
+
   $ cd ..
 
 Corner case of amend from issue6157:
diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -2,6 +2,8 @@ 
 
  * The amend extension supports the `--currentuser` argument.
 
+ * The amend extension supports the `--close-branch` argument.
+
  * The uncommit extension supports the `rewrite.update-timestamp` config option.
 
 == New Experimental Features ==
diff --git a/hgext/amend.py b/hgext/amend.py
--- a/hgext/amend.py
+++ b/hgext/amend.py
@@ -34,6 +34,8 @@ 
       _('mark new/missing files as added/removed before committing')),
      ('e', 'edit', None, _('invoke editor on commit messages')),
      ('i', 'interactive', None, _('use interactive mode')),
+     (b'', b'close-branch', None,
+      _(b'mark a branch as closed, hiding it from the branch list')),
      ('n', 'note', '', _('store a note on the amend')),
     ] + cmdutil.walkopts + cmdutil.commitopts + cmdutil.commitopts2
       + cmdutil.commitopts3,