##// END OF EJS Templates
help: properly underline annotate config heading
help: properly underline annotate config heading

File last commit:

r15446:c5c9ca37 default
r15612:6f2eee68 default
Show More
test-bookmarks-pushpull.t
195 lines | 5.1 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
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
Will Maier
tests: add test for bookmark push/pull
r12303 (run 'hg update' to get a working copy)
$ hg bookmarks
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969 Y 0:4e3505fd9583
$ hg debugpushkey ../a namespaces
bookmarks
namespaces
$ 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
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
$ 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
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
$ hg book -f X
$ hg book
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
$ echo c2 > f2
$ hg ci -Am2
adding f2
$ hg book -f X
$ hg book
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
foo -1:000000000000
foobar -1:000000000000
$ hg pull ../a
pulling from ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
not updating divergent bookmark X
(run 'hg heads' to see heads, 'hg merge' to merge)
$ hg book
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
foo -1:000000000000
foobar -1:000000000000
$ 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 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
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
$ hg debugpushkey http://localhost:$HGPORT/ namespaces
bookmarks
namespaces
$ hg debugpushkey http://localhost:$HGPORT/ bookmarks
Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
X 9b140be1080824d768c5a4691a564088eede71f9
foo 0000000000000000000000000000000000000000
foobar 0000000000000000000000000000000000000000
$ hg out -B http://localhost:$HGPORT/
comparing with http://localhost:$HGPORT/
searching for changed bookmarks
Z 0d2164f0ce0d
$ hg push -B Z http://localhost:$HGPORT/
pushing to http://localhost:$HGPORT/
searching for changes
no changes found
exporting bookmark Z
$ hg book -d Z
$ hg in -B http://localhost:$HGPORT/
comparing with http://localhost:$HGPORT/
searching for changed bookmarks
Z 0d2164f0ce0d
foo 000000000000
foobar 000000000000
$ hg pull -B Z http://localhost:$HGPORT/
pulling from http://localhost:$HGPORT/
no changes found
not updating divergent bookmark X
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
added 3 changesets with 3 changes to 3 files (+1 heads)
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R cloned-bookmarks bookmarks
X 1:9b140be10808
Y 0:4e3505fd9583
Z 2:0d2164f0ce0d
foo -1:000000000000
foobar -1:000000000000
Matt Mackall
pushkey: force HTTP POST on push and add tests (issue2489)
r12969
$ kill `cat ../hg.pid`