Mercurial > hg
changeset 35414:a51541681b8d
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 14 Dec 2017 16:01:28 -0500 |
parents | c8e8e14a5ee9 (current diff) 7b73bf1a48d4 (diff) |
children | 56854848e485 |
files | hgext/histedit.py mercurial/templater.py tests/test-histedit-commute.t |
diffstat | 3 files changed, 39 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Thu Dec 14 20:18:15 2017 +0000 +++ b/hgext/histedit.py Thu Dec 14 16:01:28 2017 -0500 @@ -488,6 +488,7 @@ repo.ui.pushbuffer(error=True, labeled=True) hg.update(repo, self.state.parentctxnode, quietempty=True) stats = applychanges(repo.ui, repo, rulectx, {}) + repo.dirstate.setbranch(rulectx.branch()) if stats and stats[3] > 0: buf = repo.ui.popbuffer() repo.ui.write(*buf)
--- a/mercurial/templater.py Thu Dec 14 20:18:15 2017 +0000 +++ b/mercurial/templater.py Thu Dec 14 16:01:28 2017 -0500 @@ -918,7 +918,7 @@ """Return the max of an iterable""" if len(args) != 1: # i18n: "max" is a keyword - raise error.ParseError(_("max expects one arguments")) + raise error.ParseError(_("max expects one argument")) iterable = evalfuncarg(context, mapping, args[0]) try: @@ -933,7 +933,7 @@ """Return the min of an iterable""" if len(args) != 1: # i18n: "min" is a keyword - raise error.ParseError(_("min expects one arguments")) + raise error.ParseError(_("min expects one argument")) iterable = evalfuncarg(context, mapping, args[0]) try: @@ -958,7 +958,7 @@ """Compute obsfate related information based on markers (EXPERIMENTAL)""" if len(args) != 1: # i18n: "obsfateoperations" is a keyword - raise error.ParseError(_("obsfateoperations expects one arguments")) + raise error.ParseError(_("obsfateoperations expects one argument")) markers = evalfuncarg(context, mapping, args[0]) @@ -975,7 +975,7 @@ """Compute obsfate related information based on markers (EXPERIMENTAL)""" if len(args) != 1: # i18n: "obsfatedate" is a keyword - raise error.ParseError(_("obsfatedate expects one arguments")) + raise error.ParseError(_("obsfatedate expects one argument")) markers = evalfuncarg(context, mapping, args[0]) @@ -992,7 +992,7 @@ """Compute obsfate related information based on markers (EXPERIMENTAL)""" if len(args) != 1: # i18n: "obsfateusers" is a keyword - raise error.ParseError(_("obsfateusers expects one arguments")) + raise error.ParseError(_("obsfateusers expects one argument")) markers = evalfuncarg(context, mapping, args[0])
--- a/tests/test-histedit-commute.t Thu Dec 14 20:18:15 2017 +0000 +++ b/tests/test-histedit-commute.t Thu Dec 14 16:01:28 2017 -0500 @@ -454,3 +454,36 @@ rename to another-dir/renamed-file $ cd .. + +Test that branches are preserved and stays active +------------------------------------------------- + + $ hg init repo-with-branch + $ cd repo-with-branch + $ echo a > a + $ hg add a + $ hg commit -m A + $ hg branch foo + marked working directory as branch foo + (branches are permanent and global, did you want a bookmark?) + $ echo a > b + $ hg add b + $ hg commit -m foo-B + $ echo a > c + $ hg add c + $ hg commit -m foo-C + + $ hg branch + foo + $ echo "pick efefa76d6dc3 2 foo-C" >> cmd + $ echo "pick 7336e7550422 1 foo-B" >> cmd + + $ HGEDITOR=cat hg histedit -r ".^" --commands cmd --quiet + $ hg log --template '{rev} {branch}\n' + 2 foo + 1 foo + 0 default + $ hg branch + foo + + $ cd ..