Page MenuHomePhabricator

branch: add tests which shows branch can be closed from a non-branchhead cset

Authored by khanchi97 on Apr 19 2019, 3:48 AM.



This patch shows that we can close a branch even from a cset which is not
a branch head. It was supposed to abort this operation.
Next patch will be fixing the issue.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

khanchi97 created this revision.Apr 19 2019, 3:48 AM
khanchi97 added inline comments.Apr 25 2019, 1:47 PM
961 ↗(On Diff #14858)

I created this patch assuming that hg should not allow to create a branch closing commit from a cset which is not a branch head. Let me know if I am missing something here.

pulkit accepted this revision.Apr 25 2019, 1:51 PM
pulkit added a subscriber: pulkit.

Queueing this, many thanks!

961 ↗(On Diff #14858)

I think that the assumption is correct. hg help commit says --close-branch mark a branch head as closed.

So it should definitely be a head.

This revision was automatically updated to reflect the committed changes.