2014-02-19 03:59:46 +04:00
|
|
|
$ . "$TESTDIR/library.sh"
|
|
|
|
|
|
|
|
# Populate the db with an initial commit
|
|
|
|
|
|
|
|
$ initclient client
|
|
|
|
$ cd client
|
|
|
|
$ echo x > x
|
|
|
|
$ hg commit -qAm x
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
$ initserver master masterrepo
|
|
|
|
$ cd master
|
2014-08-26 14:51:11 +04:00
|
|
|
$ printf '[phases]\npublish=True\n' >> .hg/hgrc
|
2014-02-19 03:59:46 +04:00
|
|
|
$ hg log
|
|
|
|
$ hg pull -q ../client
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
# Verify local pushes work
|
|
|
|
|
|
|
|
$ cd client
|
|
|
|
$ echo y > y
|
|
|
|
$ hg commit -qAm y
|
2014-08-26 14:51:11 +04:00
|
|
|
$ hg phase -p -r 'all()'
|
2014-02-19 03:59:46 +04:00
|
|
|
$ hg push ../master --traceback
|
|
|
|
pushing to ../master
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 1 changes to 1 files
|
|
|
|
|
|
|
|
# Verify local pulls work
|
|
|
|
$ hg strip -q -r tip
|
|
|
|
$ hg pull ../master
|
|
|
|
pulling from ../master
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 1 changes to 1 files
|
|
|
|
(run 'hg update' to get a working copy)
|
|
|
|
$ hg log --template '{rev} {desc}\n'
|
|
|
|
1 y
|
|
|
|
0 x
|
2014-02-19 05:16:45 +04:00
|
|
|
|
|
|
|
# Verify local bookmark pull
|
|
|
|
|
|
|
|
$ cd ../master
|
|
|
|
$ hg book foo -r 0
|
|
|
|
$ hg book
|
|
|
|
foo 0:b292c1e3311f
|
|
|
|
$ cd ../client
|
|
|
|
$ hg pull -q ../master
|
|
|
|
$ hg book
|
|
|
|
foo 0:b292c1e3311f
|
|
|
|
|
|
|
|
# Verify local bookmark push
|
|
|
|
|
|
|
|
$ hg book -r tip foo
|
|
|
|
moving bookmark 'foo' forward from b292c1e3311f
|
|
|
|
$ hg push ../master
|
|
|
|
pushing to ../master
|
|
|
|
searching for changes
|
|
|
|
no changes found
|
|
|
|
updating bookmark foo
|
|
|
|
[1]
|
|
|
|
$ hg book -R ../master
|
|
|
|
foo 1:d34c38483be9
|
2014-03-11 22:25:23 +04:00
|
|
|
|
|
|
|
# Verify explicit bookmark pulls work
|
|
|
|
|
|
|
|
$ hg up tip
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ echo z > z
|
|
|
|
$ hg commit -qAm z
|
|
|
|
$ hg book foo
|
|
|
|
moving bookmark 'foo' forward from d34c38483be9
|
|
|
|
$ cd ../master
|
|
|
|
$ hg pull -B foo ../client
|
|
|
|
pulling from ../client
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 1 changes to 1 files
|
|
|
|
updating bookmark foo
|
|
|
|
(run 'hg update' to get a working copy)
|
|
|
|
$ hg log -l 1 --template '{rev} {bookmarks}\n'
|
|
|
|
2 foo
|
2014-08-26 14:51:11 +04:00
|
|
|
|
|
|
|
# Push from hgsql to other repo
|
|
|
|
|
|
|
|
$ hg up -q tip
|
|
|
|
$ echo zz > z
|
|
|
|
$ hg commit -m z2
|
|
|
|
$ hg push ../client
|
|
|
|
pushing to ../client
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 1 changes to 1 files
|