comparison tests/test-identify.t @ 11796:141e2e964705

tests: unify test-identify
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Thu, 12 Aug 2010 19:49:58 +0900
parents tests/test-identify@55bd03e2e13c
children fddacca3202e
comparison
equal deleted inserted replaced
11795:06793ad30575 11796:141e2e964705
1 $ "$TESTDIR/hghave" no-outer-repo || exit 80
2
3 no repo
4
5 $ hg id
6 abort: There is no Mercurial repository here (.hg not found)
7
8 create repo
9
10 $ hg init test
11 $ cd test
12 $ echo a > a
13 $ hg ci -Ama
14 adding a
15
16 basic id usage
17
18 $ hg id
19 cb9a9f314b8b tip
20 $ hg id --debug
21 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip
22 $ hg id -q
23 cb9a9f314b8b
24 $ hg id -v
25 cb9a9f314b8b tip
26
27 with options
28
29 $ hg id -r.
30 cb9a9f314b8b tip
31 $ hg id -n
32 0
33 $ hg id -t
34 tip
35 $ hg id -b
36 default
37 $ hg id -i
38 cb9a9f314b8b
39 $ hg id -n -t -b -i
40 cb9a9f314b8b 0 default tip
41
42 with modifications
43
44 $ echo b > a
45 $ hg id -n -t -b -i
46 cb9a9f314b8b+ 0+ default tip
47
48 other local repo
49
50 $ cd ..
51 $ hg -R test id
52 cb9a9f314b8b+ tip
53 $ hg id test
54 cb9a9f314b8b+ tip
55
56 with remote http repo
57
58 $ cd test
59 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid
60 $ cat hg.pid >> $DAEMON_PIDS
61 $ hg id http://localhost:$HGPORT1/
62 cb9a9f314b8b
63
64 remote with tags?
65
66 $ hg id -t http://localhost:$HGPORT1/
67 abort: can't query remote revision number, branch, or tags
68
69 $ true # ends with util.Abort -> returns 255