sapling/tests/test-reset-remotenames.t
Durham Goode b85c9c6a07 reset: fix resetting past remote bookmarks
Summary:
Previously reseting from above a remote bookmark to below it would delete the
commit that the remote bookmark pointed to. This fixes that and adds a test.

Test Plan: Added a test

Reviewers: rmcelroy, ericsumner, lcharignon

Differential Revision: https://phabricator.fb.com/D2233971
2015-07-10 11:40:30 -07:00

33 lines
767 B
Perl

$ $PYTHON -c 'import remotenames' || exit 80
$ extpath=$(dirname $TESTDIR)
$ cp $extpath/reset.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF
> [extensions]
> reset=$TESTTMP/reset.py
> remotenames=
> EOF
$ hg init repo
$ cd repo
$ echo x > x
$ hg commit -qAm x
$ hg book foo
$ echo x >> x
$ hg commit -qAm x2
Resetting past a remote bookmark should not delete the remote bookmark
$ cd ..
$ hg clone repo client
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd client
$ hg book bar
$ hg reset --clean default/foo^
$ hg log -G -T '{node|short} {bookmarks} {remotebookmarks}\n'
o a89d614e2364 default/foo
|
@ b292c1e3311f bar