##// END OF EJS Templates
tests: add tests for bookmarks support in hg identify
David Soria Parra -
r13645:3786b810 default
parent child Browse files
Show More
@@ -1,94 +1,117
1 $ "$TESTDIR/hghave" no-outer-repo || exit 80
1 $ "$TESTDIR/hghave" no-outer-repo || exit 80
2
2
3 no repo
3 no repo
4
4
5 $ hg id
5 $ hg id
6 abort: there is no Mercurial repository here (.hg not found)
6 abort: there is no Mercurial repository here (.hg not found)
7 [255]
7 [255]
8
8
9 create repo
9 create repo
10
10
11 $ hg init test
11 $ hg init test
12 $ cd test
12 $ cd test
13 $ echo a > a
13 $ echo a > a
14 $ hg ci -Ama
14 $ hg ci -Ama
15 adding a
15 adding a
16
16
17 basic id usage
17 basic id usage
18
18
19 $ hg id
19 $ hg id
20 cb9a9f314b8b tip
20 cb9a9f314b8b tip
21 $ hg id --debug
21 $ hg id --debug
22 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip
22 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip
23 $ hg id -q
23 $ hg id -q
24 cb9a9f314b8b
24 cb9a9f314b8b
25 $ hg id -v
25 $ hg id -v
26 cb9a9f314b8b tip
26 cb9a9f314b8b tip
27
27
28 with options
28 with options
29
29
30 $ hg id -r.
30 $ hg id -r.
31 cb9a9f314b8b tip
31 cb9a9f314b8b tip
32 $ hg id -n
32 $ hg id -n
33 0
33 0
34 $ hg id -t
34 $ hg id -t
35 tip
35 tip
36 $ hg id -b
36 $ hg id -b
37 default
37 default
38 $ hg id -i
38 $ hg id -i
39 cb9a9f314b8b
39 cb9a9f314b8b
40 $ hg id -n -t -b -i
40 $ hg id -n -t -b -i
41 cb9a9f314b8b 0 default tip
41 cb9a9f314b8b 0 default tip
42
42
43 with modifications
43 with modifications
44
44
45 $ echo b > a
45 $ echo b > a
46 $ hg id -n -t -b -i
46 $ hg id -n -t -b -i
47 cb9a9f314b8b+ 0+ default tip
47 cb9a9f314b8b+ 0+ default tip
48
48
49 other local repo
49 other local repo
50
50
51 $ cd ..
51 $ cd ..
52 $ hg -R test id
52 $ hg -R test id
53 cb9a9f314b8b+ tip
53 cb9a9f314b8b+ tip
54 $ hg id test
54 $ hg id test
55 cb9a9f314b8b+ tip
55 cb9a9f314b8b+ tip
56
56
57 with remote http repo
57 with remote http repo
58
58
59 $ cd test
59 $ cd test
60 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid
60 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid
61 $ cat hg.pid >> $DAEMON_PIDS
61 $ cat hg.pid >> $DAEMON_PIDS
62 $ hg id http://localhost:$HGPORT1/
62 $ hg id http://localhost:$HGPORT1/
63 cb9a9f314b8b
63 cb9a9f314b8b
64
64
65 remote with rev number?
65 remote with rev number?
66
66
67 $ hg id -n http://localhost:$HGPORT1/
67 $ hg id -n http://localhost:$HGPORT1/
68 abort: can't query remote revision number, branch, or tags
68 abort: can't query remote revision number, branch, or tags
69 [255]
69 [255]
70
70
71 remote with tags?
71 remote with tags?
72
72
73 $ hg id -t http://localhost:$HGPORT1/
73 $ hg id -t http://localhost:$HGPORT1/
74 abort: can't query remote revision number, branch, or tags
74 abort: can't query remote revision number, branch, or tags
75 [255]
75 [255]
76
76
77 remote with branch?
77 remote with branch?
78
78
79 $ hg id -b http://localhost:$HGPORT1/
79 $ hg id -b http://localhost:$HGPORT1/
80 abort: can't query remote revision number, branch, or tags
80 abort: can't query remote revision number, branch, or tags
81 [255]
81 [255]
82
82
83 test bookmark support
84
85 $ hg bookmark Y
86 $ hg bookmark Z
87 $ hg bookmarks
88 Y 0:cb9a9f314b8b
89 * Z 0:cb9a9f314b8b
90 $ hg id
91 cb9a9f314b8b+ tip Y/Z
92 $ hg id --bookmarks
93 Y Z
94
95 test remote identify with bookmarks
96
97 $ hg id http://localhost:$HGPORT1/
98 cb9a9f314b8b Y/Z
99 $ hg id --bookmarks http://localhost:$HGPORT1/
100 Y Z
101 $ hg id -r . http://localhost:$HGPORT1/
102 cb9a9f314b8b Y/Z
103 $ hg id --bookmarks -r . http://localhost:$HGPORT1/
104 Y Z
105
83 Make sure we do not obscure unknown requires file entries (issue2649)
106 Make sure we do not obscure unknown requires file entries (issue2649)
84
107
85 $ echo fake >> .hg/requires
108 $ echo fake >> .hg/requires
86 $ hg id
109 $ hg id
87 abort: requirement 'fake' not supported!
110 abort: requirement 'fake' not supported!
88 [255]
111 [255]
89
112
90 $ cd ..
113 $ cd ..
91 $ hg id test
114 $ hg id test
92 abort: requirement 'fake' not supported!
115 abort: requirement 'fake' not supported!
93 [255]
116 [255]
94
117
General Comments 0
You need to be logged in to leave comments. Login now