Mercurial > hg
comparison hgext/rebase.py @ 44050:2ecbc4ec87d8
overlayworkingctx: default branch to base context's branch
This matches what the dirstate does (it reuses working copy parent's
branch unless told otherwise). By moving the default out of
`rebase.commitmemorynode()`, it will let us clean that up better
later.
Differential Revision: https://phab.mercurial-scm.org/D7821
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 10 Jan 2020 17:03:23 -0800 |
parents | bd88407edc0e |
children | 436d106de670 |
comparison
equal
deleted
inserted
replaced
44049:6cfaebb625d3 | 44050:2ecbc4ec87d8 |
---|---|
1428 if wctx.isempty() and not repo.ui.configbool(b'ui', b'allowemptycommit'): | 1428 if wctx.isempty() and not repo.ui.configbool(b'ui', b'allowemptycommit'): |
1429 return None | 1429 return None |
1430 | 1430 |
1431 # By convention, ``extra['branch']`` (set by extrafn) clobbers | 1431 # By convention, ``extra['branch']`` (set by extrafn) clobbers |
1432 # ``branch`` (used when passing ``--keepbranches``). | 1432 # ``branch`` (used when passing ``--keepbranches``). |
1433 branch = repo[p1].branch() | 1433 branch = None |
1434 if b'branch' in extra: | 1434 if b'branch' in extra: |
1435 branch = extra[b'branch'] | 1435 branch = extra[b'branch'] |
1436 | 1436 |
1437 memctx = wctx.tomemctx( | 1437 memctx = wctx.tomemctx( |
1438 commitmsg, | 1438 commitmsg, |