comparison tests/test-amend.t @ 49772:e78a41686464

amend: add a --draft option to set phase to draft Some users create commits in secret phase by default and then want to make them draft so they can be uploaded. This patch adds a --draft option for that. We already have a flag for changing the phase to secret, so it seems consistent to have one for draft.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 29 Nov 2022 15:41:28 -0800
parents df68d64b0d50
children
comparison
equal deleted inserted replaced
49771:f0e9dda408b3 49772:e78a41686464
558 $ hg amend --secret --close-branch 558 $ hg amend --secret --close-branch
559 $ hg log --limit 1 -T 'close={get(extras, "close")}\nphase={phase}\n' 559 $ hg log --limit 1 -T 'close={get(extras, "close")}\nphase={phase}\n'
560 close=1 560 close=1
561 phase=secret 561 phase=secret
562 562
563 `hg amend --draft` sets phase to draft
564
565 $ hg amend --draft -m declassified
566 $ hg log --limit 1 -T 'phase={phase}\n'
567 phase=draft
568
563 $ cd .. 569 $ cd ..
564 570
565 Corner case of amend from issue6157: 571 Corner case of amend from issue6157:
566 - working copy parent has a change to file `a` 572 - working copy parent has a change to file `a`
567 - working copy has the inverse change 573 - working copy has the inverse change