2015-07-21 21:32:27 +03:00
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [extensions]
|
2018-01-09 14:06:09 +03:00
|
|
|
> smartlog=
|
2015-07-21 21:32:27 +03:00
|
|
|
> remotenames=
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
|
|
|
|
|
|
|
$ echo x > x
|
|
|
|
$ hg commit -qAm x
|
|
|
|
$ hg book master
|
|
|
|
$ echo x >> x
|
|
|
|
$ hg commit -qAm x2
|
|
|
|
|
2015-08-13 00:58:41 +03:00
|
|
|
Non-bookmarked public heads should not be visible in smartlog
|
2015-07-21 21:32:27 +03:00
|
|
|
|
|
|
|
$ 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
|
2015-08-13 00:58:41 +03:00
|
|
|
$ hg smartlog -T '{rev} {bookmarks} {remotebookmarks}'
|
|
|
|
o 1 default/master
|
2015-07-21 21:32:27 +03:00
|
|
|
|
|
2015-08-13 00:58:41 +03:00
|
|
|
@ 0 mybook
|
2015-07-21 21:32:27 +03:00
|
|
|
|
2015-08-13 00:58:41 +03:00
|
|
|
Old head (rev 1) should no longer be visible
|
|
|
|
|
2015-07-21 21:32:27 +03:00
|
|
|
$ echo z >> x
|
|
|
|
$ hg commit -qAm x3
|
2015-11-18 04:54:28 +03:00
|
|
|
$ hg push --non-forward-move -q --to master
|
2015-08-13 00:58:41 +03:00
|
|
|
$ hg smartlog -T '{rev} {bookmarks} {remotebookmarks}'
|
|
|
|
@ 2 default/master
|
|
|
|
|
|
|
|
|
o 0 mybook
|
|
|
|
|
|
|
|
|
|
|
|
Test configuration of "interesting" bookmarks
|
|
|
|
|
2016-01-08 05:30:24 +03:00
|
|
|
$ hg up -q ".^"
|
2015-08-13 00:58:41 +03:00
|
|
|
$ echo x >> x
|
|
|
|
$ hg commit -qAm x4
|
2015-11-18 04:54:28 +03:00
|
|
|
$ hg push -q --to project/bookmark --create
|
2015-08-13 00:58:41 +03:00
|
|
|
$ hg smartlog -T '{rev} {bookmarks} {remotebookmarks}'
|
|
|
|
o 2 default/master
|
|
|
|
|
|
|
|
|
| @ 3 default/project/bookmark
|
|
|
|
|/
|
|
|
|
o 0 mybook
|
|
|
|
|
|
|
|
|
2016-01-08 05:30:24 +03:00
|
|
|
$ hg up ".^"
|
2015-08-13 00:58:41 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg smartlog -T '{rev} {bookmarks} {remotebookmarks}'
|
|
|
|
o 2 default/master
|
|
|
|
|
|
|
|
|
@ 0 mybook
|
|
|
|
|
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [smartlog]
|
|
|
|
> repos=default/
|
|
|
|
> names=project/bookmark
|
|
|
|
> EOF
|
|
|
|
$ hg smartlog -T '{rev} {bookmarks} {remotebookmarks}'
|
|
|
|
o 3 default/project/bookmark
|
|
|
|
|
|
|
|
|
@ 0 mybook
|
|
|
|
|
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [smartlog]
|
|
|
|
> names=master project/bookmark
|
|
|
|
> EOF
|
|
|
|
$ hg smartlog -T '{rev} {bookmarks} {remotebookmarks}'
|
|
|
|
o 2 default/master
|
2015-07-21 21:32:27 +03:00
|
|
|
|
|
2015-08-13 00:58:41 +03:00
|
|
|
| o 3 default/project/bookmark
|
|
|
|
|/
|
|
|
|
@ 0 mybook
|
2015-07-21 21:32:27 +03:00
|
|
|
|
2016-02-02 22:15:28 +03:00
|
|
|
|
|
|
|
Change remote master to a non-existing locally commit and check that warning
|
|
|
|
is shown to the user
|
|
|
|
$ cat > .hg/remotenames << EOF
|
|
|
|
> 6dd477f76ca35ae46e82972648735867cf335d3e bookmarks remote/master
|
|
|
|
> EOF
|
|
|
|
$ hg sl
|
|
|
|
o changeset: 3:8e2253d950ae
|
|
|
|
| tag: tip
|
|
|
|
| parent: 0:b292c1e3311f
|
|
|
|
| user: test
|
|
|
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
| summary: x4
|
|
|
|
|
|
|
|
|
@ changeset: 0:b292c1e3311f
|
|
|
|
bookmark: mybook
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: x
|
|
|
|
|
|
|
|
note: hiding 3 old heads without bookmarks
|
|
|
|
(use --all to see them)
|