##// END OF EJS Templates
bookmark: complexity pull-push test to have deeper tree...
bookmark: complexity pull-push test to have deeper tree This changeset only touch test. The previous test was correct, it tested that the successors of an old bookmark position was seen as a valid destination for bookmark. However, a newer version is made for two reason: (1) The new test check further. It check that the descendant of the successors is a valid destination (2) An ever more complexe test is needed to validate a future fix to issue 3680 Splitting complexification of the test and actual bugfix help to reduce the noise in the bugfix changeset. Issue 3680 is NOT fixed by this changeset.

File last commit:

r17864:d044a762 stable
r17864:d044a762 stable
Show More
test-bookmarks-pushpull.t
381 lines | 10.2 KiB | text/troff | Tads3Lexer
/ tests / test-bookmarks-pushpull.t
Mads Kiilerich
tests: use 'hghave serve' to guard tests that requires serve daemon management
r15446 $ "$TESTDIR/hghave" serve || exit 80
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 $ cat << EOF >> $HGRCPATH
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 > [ui]
> logtemplate={rev}:{node|short} {desc|firstline}
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 > [phases]
> publish=False
> [extensions]
> EOF
$ cat > obs.py << EOF
> import mercurial.obsolete
> mercurial.obsolete._enabled = True
> EOF
$ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
Will Maier
tests: add test for bookmark push/pull
r12303 initialize
$ hg init a
$ cd a
$ echo 'test' > test
$ hg commit -Am'test'
adding test
set bookmarks
$ hg bookmark X
$ hg bookmark Y
$ hg bookmark Z
import bookmark by name
$ hg init ../b
$ cd ../b
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg book Y
$ hg book
* Y -1:000000000000
Will Maier
tests: add test for bookmark push/pull
r12303 $ hg pull ../a
pulling from ../a
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
David Soria Parra
localrepo: do not update bookmarks in addchangegroup...
r13662 updating bookmark Y
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 adding remote bookmark X
adding remote bookmark Z
Will Maier
tests: add test for bookmark push/pull
r12303 (run 'hg update' to get a working copy)
$ hg bookmarks
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 X 0:4e3505fd9583
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 Y 0:4e3505fd9583
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 Z 0:4e3505fd9583
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg debugpushkey ../a namespaces
bookmarks
Pierre-Yves David
phases: add basic pushkey support
r15648 phases
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 namespaces
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 obsolete
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg debugpushkey ../a bookmarks
Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
X 4e3505fd95835d721066b76e75dbb8cc554d7f77
Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
Will Maier
tests: add test for bookmark push/pull
r12303 $ hg pull -B X ../a
pulling from ../a
no changes found
importing bookmark X
$ hg bookmark
David Soria Parra
localrepo: sort hg bookmark output...
r13388 X 0:4e3505fd9583
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 Y 0:4e3505fd9583
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 Z 0:4e3505fd9583
Will Maier
tests: add test for bookmark push/pull
r12303
export bookmark by name
$ hg bookmark W
$ hg bookmark foo
$ hg bookmark foobar
$ hg push -B W ../a
pushing to ../a
searching for changes
no changes found
exporting bookmark W
Matt Mackall
push: don't treat bookmark as a found change...
r16038 [1]
Will Maier
tests: add test for bookmark push/pull
r12303 $ hg -R ../a bookmarks
David Soria Parra
localrepo: sort hg bookmark output...
r13388 W -1:000000000000
Will Maier
tests: add test for bookmark push/pull
r12303 X 0:4e3505fd9583
David Soria Parra
localrepo: sort hg bookmark output...
r13388 Y 0:4e3505fd9583
Will Maier
tests: add test for bookmark push/pull
r12303 * Z 0:4e3505fd9583
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 delete a remote bookmark
$ hg book -d W
$ hg push -B W ../a
Matt Mackall
bookmarks: move push/pull command features to core
r13368 pushing to ../a
searching for changes
no changes found
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 deleting remote bookmark W
Matt Mackall
push: don't treat bookmark as a found change...
r16038 [1]
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969
Will Maier
tests: add test for bookmark push/pull
r12303 push/pull name that doesn't exist
$ hg push -B badname ../a
Matt Mackall
bookmarks: move push/pull command features to core
r13368 pushing to ../a
searching for changes
no changes found
Will Maier
tests: add test for bookmark push/pull
r12303 bookmark badname does not exist on the local or remote repository!
Matt Mackall
tests: add exit codes to unified tests
r12316 [2]
Will Maier
tests: add test for bookmark push/pull
r12303 $ hg pull -B anotherbadname ../a
Matt Mackall
bookmarks: move push/pull command features to core
r13368 pulling from ../a
Will Maier
tests: add test for bookmark push/pull
r12303 abort: remote bookmark anotherbadname not found!
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969
divergent bookmarks
$ cd ../a
$ echo c1 > f1
$ hg ci -Am1
adding f1
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 $ hg book -f @
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg book -f X
$ hg book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:0d2164f0ce0d
David Soria Parra
localrepo: sort hg bookmark output...
r13388 * X 1:0d2164f0ce0d
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 Y 0:4e3505fd9583
Z 1:0d2164f0ce0d
$ cd ../b
$ hg up
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Kevin Bullock
update: note updated bookmark...
r16010 updating bookmark foobar
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ echo c2 > f2
$ hg ci -Am2
adding f2
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 $ hg book -f @
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg book -f X
$ hg book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:9b140be10808
David Soria Parra
localrepo: sort hg bookmark output...
r13388 * X 1:9b140be10808
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 Y 0:4e3505fd9583
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 Z 0:4e3505fd9583
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 foo -1:000000000000
Matt Mackall
bookmarks: automatically advance bookmark on naked update (BC) (issue2894)
r15935 foobar 1:9b140be10808
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969
Matt Mackall
bookmarks: mark divergent bookmarks with book@pathalias when source in [paths]
r15614 $ hg pull --config paths.foo=../a foo
Adrian Buehlmann
test-bookmarks-pushpull: partially adapt for Windows...
r17021 pulling from $TESTTMP/a (glob)
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
Matt Mackall
bookmarks: mark divergent bookmarks with book@pathalias when source in [paths]
r15614 divergent bookmark X stored as X@foo
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 updating bookmark Z
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 divergent bookmark @ stored as @foo
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 (run 'hg heads' to see heads, 'hg merge' to merge)
$ hg book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:9b140be10808
@foo 2:0d2164f0ce0d
David Soria Parra
localrepo: sort hg bookmark output...
r13388 * X 1:9b140be10808
Matt Mackall
bookmarks: mark divergent bookmarks with book@pathalias when source in [paths]
r15614 X@foo 2:0d2164f0ce0d
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 Y 0:4e3505fd9583
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 Z 2:0d2164f0ce0d
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 foo -1:000000000000
Matt Mackall
bookmarks: automatically advance bookmark on naked update (BC) (issue2894)
r15935 foobar 1:9b140be10808
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg push -f ../a
pushing to ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
$ hg -R ../a book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:0d2164f0ce0d
David Soria Parra
localrepo: sort hg bookmark output...
r13388 * X 1:0d2164f0ce0d
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 Y 0:4e3505fd9583
Z 1:0d2164f0ce0d
Levi Bard
bookmarks: allow existing remote bookmarks to become heads when pushing
r16835 update a remote bookmark from a non-head to a head
$ hg up -q Y
$ echo c3 > f2
$ hg ci -Am3
adding f2
created new head
$ hg push ../a
pushing to ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
updating bookmark Y
$ hg -R ../a book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:0d2164f0ce0d
Levi Bard
bookmarks: allow existing remote bookmarks to become heads when pushing
r16835 * X 1:0d2164f0ce0d
Y 3:f6fc62dde3c0
Z 1:0d2164f0ce0d
diverging a remote bookmark fails
$ hg up -q 4e3505fd9583
$ echo c4 > f2
$ hg ci -Am4
adding f2
created new head
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 $ echo c5 > f2
$ hg ci -Am5
$ hg log -G
@ 5:c922c0139ca0 5
|
o 4:4efff6d98829 4
|
| o 3:f6fc62dde3c0 3
|/
| o 2:0d2164f0ce0d 1
|/
| o 1:9b140be10808 2
|/
o 0:4e3505fd9583 test
Levi Bard
bookmarks: allow existing remote bookmarks to become heads when pushing
r16835 $ hg book -f Y
Sune Foldager
fix push of moved bookmark when creating new branch heads...
r17043
$ cat <<EOF > ../a/.hg/hgrc
> [web]
> push_ssl = false
> allow_push = *
> EOF
$ hg -R ../a serve -p $HGPORT2 -d --pid-file=../hg2.pid
$ cat ../hg2.pid >> $DAEMON_PIDS
$ hg push http://localhost:$HGPORT2/
pushing to http://localhost:$HGPORT2/
Levi Bard
bookmarks: allow existing remote bookmarks to become heads when pushing
r16835 searching for changes
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 abort: push creates new remote head c922c0139ca0!
Levi Bard
bookmarks: allow existing remote bookmarks to become heads when pushing
r16835 (did you forget to merge? use push -f to force)
[255]
$ hg -R ../a book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:0d2164f0ce0d
Levi Bard
bookmarks: allow existing remote bookmarks to become heads when pushing
r16835 * X 1:0d2164f0ce0d
Y 3:f6fc62dde3c0
Z 1:0d2164f0ce0d
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551
Unrelated marker does not alter the decision
$ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
$ hg push http://localhost:$HGPORT2/
pushing to http://localhost:$HGPORT2/
searching for changes
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 abort: push creates new remote head c922c0139ca0!
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 (did you forget to merge? use push -f to force)
[255]
$ hg -R ../a book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:0d2164f0ce0d
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 * X 1:0d2164f0ce0d
Y 3:f6fc62dde3c0
Z 1:0d2164f0ce0d
Update to a successor works
$ hg id --debug -r 3
f6fc62dde3c0771e29704af56ba4d8af77abcc2f
$ hg id --debug -r 4
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 4efff6d98829d9c824c621afd6e3f01865f5439f
$ hg id --debug -r 5
c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f 4efff6d98829d9c824c621afd6e3f01865f5439f
$ hg push http://localhost:$HGPORT2/
pushing to http://localhost:$HGPORT2/
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 updating bookmark Y
$ hg -R ../a book
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:0d2164f0ce0d
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 * X 1:0d2164f0ce0d
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 Y 5:c922c0139ca0
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 Z 1:0d2164f0ce0d
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 hgweb
$ cat <<EOF > .hg/hgrc
> [web]
> push_ssl = false
> allow_push = *
> EOF
$ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
$ cat ../hg.pid >> $DAEMON_PIDS
$ cd ../a
Mads Kiilerich
check-code: fix check for trailing whitespace on sh command lines...
r17345 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 bookmarks
Pierre-Yves David
phases: add basic pushkey support
r15648 phases
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 namespaces
Pierre-Yves David
bookmark: take successors into account when updating (issue3561)...
r17551 obsolete
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 9b140be1080824d768c5a4691a564088eede71f9
foo 0000000000000000000000000000000000000000
foobar 9b140be1080824d768c5a4691a564088eede71f9
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 Y c922c0139ca03858f655e4a2af4dd02796a63969
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 X 9b140be1080824d768c5a4691a564088eede71f9
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 Z 0d2164f0ce0d8f1d6f94351eba04b794909be66c
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg out -B http://localhost:$HGPORT/
comparing with http://localhost:$HGPORT/
searching for changed bookmarks
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 no changed bookmarks found
[1]
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg push -B Z http://localhost:$HGPORT/
pushing to http://localhost:$HGPORT/
searching for changes
no changes found
exporting bookmark Z
Matt Mackall
push: don't treat bookmark as a found change...
r16038 [1]
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg book -d Z
$ hg in -B http://localhost:$HGPORT/
comparing with http://localhost:$HGPORT/
searching for changed bookmarks
Z 0d2164f0ce0d
foo 000000000000
Matt Mackall
bookmarks: automatically advance bookmark on naked update (BC) (issue2894)
r15935 foobar 9b140be10808
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 $ hg pull -B Z http://localhost:$HGPORT/
pulling from http://localhost:$HGPORT/
no changes found
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 divergent bookmark @ stored as @1
adding remote bookmark foo
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 adding remote bookmark foobar
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 divergent bookmark X stored as X@1
Levi Bard
bookmarks: pull new bookmarks from remote by default (BC)
r16697 adding remote bookmark Z
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 importing bookmark Z
David Soria Parra
hg: add support for cloning bookmarks
r13604 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
requesting all changes
adding changesets
adding manifests
adding file changes
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 added 5 changesets with 5 changes to 3 files (+2 heads)
David Soria Parra
hg: add support for cloning bookmarks
r13604 updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R cloned-bookmarks bookmarks
David M. Carr
bookmarks: when @ bookmark diverges, don't double the @ sign (BC)...
r17770 @ 1:9b140be10808
David Soria Parra
hg: add support for cloning bookmarks
r13604 X 1:9b140be10808
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 Y 4:c922c0139ca0
David Soria Parra
hg: add support for cloning bookmarks
r13604 Z 2:0d2164f0ce0d
foo -1:000000000000
Matt Mackall
bookmarks: automatically advance bookmark on naked update (BC) (issue2894)
r15935 foobar 1:9b140be10808
Mads Kiilerich
check-code: fix check for trailing whitespace on empty lines...
r17346
Augie Fackler
test-bookmarks-pushpull.t: verify correct push -B behavior...
r17189 $ cd ..
Pushing a bookmark should only push the changes required by that
bookmark, not all outgoing changes:
$ hg clone http://localhost:$HGPORT/ addmarks
requesting all changes
adding changesets
adding manifests
adding file changes
Pierre-Yves David
bookmark: complexity pull-push test to have deeper tree...
r17864 added 5 changesets with 5 changes to 3 files (+2 heads)
Augie Fackler
test-bookmarks-pushpull.t: verify correct push -B behavior...
r17189 updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd addmarks
$ echo foo > foo
$ hg add foo
$ hg commit -m 'add foo'
$ echo bar > bar
$ hg add bar
$ hg commit -m 'add bar'
$ hg co "tip^"
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg book add-foo
$ hg book -r tip add-bar
Note: this push *must* push only a single changeset, as that's the point
of this test.
Pierre-Yves David
checkheads: check successors for new heads in both missing and common...
r17548 $ hg push -B add-foo --traceback
Augie Fackler
test-bookmarks-pushpull.t: verify correct push -B behavior...
r17189 pushing to http://localhost:$HGPORT/
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
exporting bookmark add-foo
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913 $ cd ..