sapling/tests/test-fbamend-noinhibit.t
Arun Kulshreshtha 6065ceef3f fbamend: use unfiltered repo when clearing preamend bookmarks
Summary: Sometimes restack attempts to clear preamend bookmarks on hidden commits. This only happens when the user has a configuration error (typically inhibit is disabled) which would mess up other parts of restack. Nonetheless, there is no reason to crash here.

Test Plan: Disable inhibit, perform an amend, and run `hg restack`. Unit test is forthcoming.

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4856640

Tasks: 16726367

Signature: t1:4856640:1491816803:56beeb11360a7a2f6bc6243069c562b08a015afc
2017-04-19 15:52:45 -07:00

25 lines
763 B
Perl

Set up test environment.
$ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF
> [extensions]
> evolve=
> fbamend=$TESTTMP/fbamend.py
> rebase=
> [experimental]
> evolution = createmarkers
> evolutioncommands = prev next split fold
> EOF
$ hg init repo && cd repo
Perform restack without inhibit extension.
$ hg debugbuilddag -m +3
$ hg update 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg amend -m "Amended"
warning: the changeset's children were left behind
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
$ hg rebase --restack
rebasing 2:* "r2" (glob)