sapling/tests/test-smartlog-remotenames.t
Durham Goode b804c11020 smartlog: hide public heads when remote bookmarks are enabled
Summary:
If the user is using remote bookmarks, let's hide the public heads from the
smartlog output. This allows the server to do a non-fastward bookmark move,
without having the old heads cluttering the user's smartlog output.

Test Plan: Added a test

Reviewers: mitrandir, rmcelroy, ericsumner, lcharignon

Reviewed By: lcharignon

Differential Revision: https://phabricator.fb.com/D2264878

Signature: t1:2264878:1437505970:664348ed91ba8d8b1018299e282ed4308bfbdbc0
2015-07-21 11:32:27 -07:00

49 lines
1.2 KiB
Perl

$ $PYTHON -c 'import remotenames' || exit 80
$ extpath=$(dirname $TESTDIR)
$ cp $extpath/smartlog.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF
> [extensions]
> smartlog=$TESTTMP/smartlog.py
> remotenames=
> EOF
$ hg init repo
$ cd repo
$ echo x > x
$ hg commit -qAm x
$ hg book master
$ 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 mybook -r 0
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg smartlog -T '{node|short} {bookmarks} {remotebookmarks}'
o a89d614e2364 default/master
|
@ b292c1e3311f mybook
$ echo z >> x
$ hg commit -qAm x3
$ hg push -f --to master
pushing rev d14b8058ba3a to destination $TESTTMP/repo bookmark master
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
updating bookmark master
$ hg smartlog -T '{node|short} {bookmarks} {remotebookmarks}'
@ d14b8058ba3a default/master
|
o b292c1e3311f mybook