comparison tests/test-bookmarks-pushpull.t @ 12303:4ab87473029d

tests: add test for bookmark push/pull
author Will Maier <willmaier@ml1.net>
date Tue, 14 Sep 2010 22:26:43 -0500
parents
children 4134686b83e1
comparison
equal deleted inserted replaced
12302:6ad36bca3a8a 12303:4ab87473029d
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "bookmarks=" >> $HGRCPATH
3
4 $ echo "[bookmarks]" >> $HGRCPATH
5 $ echo "track.current = True" >> $HGRCPATH
6
7 initialize
8
9 $ hg init a
10 $ cd a
11 $ echo 'test' > test
12 $ hg commit -Am'test'
13 adding test
14
15 set bookmarks
16
17 $ hg bookmark X
18 $ hg bookmark Y
19 $ hg bookmark Z
20
21 import bookmark by name
22
23 $ hg init ../b
24 $ cd ../b
25 $ hg pull ../a
26 pulling from ../a
27 requesting all changes
28 adding changesets
29 adding manifests
30 adding file changes
31 added 1 changesets with 1 changes to 1 files
32 (run 'hg update' to get a working copy)
33 $ hg bookmarks
34 no bookmarks set
35 $ hg pull -B X ../a
36 pulling from ../a
37 searching for changes
38 no changes found
39 importing bookmark X
40 $ hg bookmark
41 X 0:4e3505fd9583
42
43 export bookmark by name
44
45 $ hg bookmark W
46 $ hg bookmark foo
47 $ hg bookmark foobar
48 $ hg push -B W ../a
49 pushing to ../a
50 searching for changes
51 no changes found
52 exporting bookmark W
53 $ hg -R ../a bookmarks
54 Y 0:4e3505fd9583
55 X 0:4e3505fd9583
56 * Z 0:4e3505fd9583
57 W -1:000000000000
58
59 push/pull name that doesn't exist
60
61 $ hg push -B badname ../a
62 bookmark badname does not exist on the local or remote repository!
63 $ hg pull -B anotherbadname ../a
64 abort: remote bookmark anotherbadname not found!
65 $ true