Mercurial > hg
annotate tests/test-identify.t @ 12010:ce818cf215dc
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 21 Aug 2010 10:48:49 -0500 |
parents | 141e2e964705 |
children | fddacca3202e |
rev | line source |
---|---|
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
1 $ "$TESTDIR/hghave" no-outer-repo || exit 80 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
2 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
3 no repo |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
4 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
5 $ hg id |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
6 abort: There is no Mercurial repository here (.hg not found) |
7830
55bd03e2e13c
test-identify: require no-outer-repo
Mads Kiilerich <mads@kiilerich.com>
parents:
7759
diff
changeset
|
7 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
8 create repo |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
9 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
10 $ hg init test |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
11 $ cd test |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
12 $ echo a > a |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
13 $ hg ci -Ama |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
14 adding a |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
15 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
16 basic id usage |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
17 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
18 $ hg id |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
19 cb9a9f314b8b tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
20 $ hg id --debug |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
21 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
22 $ hg id -q |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
23 cb9a9f314b8b |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
24 $ hg id -v |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
25 cb9a9f314b8b tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
26 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
27 with options |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
28 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
29 $ hg id -r. |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
30 cb9a9f314b8b tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
31 $ hg id -n |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
32 0 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
33 $ hg id -t |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
34 tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
35 $ hg id -b |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
36 default |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
37 $ hg id -i |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
38 cb9a9f314b8b |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
39 $ hg id -n -t -b -i |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
40 cb9a9f314b8b 0 default tip |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
41 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
42 with modifications |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
43 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
44 $ echo b > a |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
45 $ hg id -n -t -b -i |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
46 cb9a9f314b8b+ 0+ default tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
47 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
48 other local repo |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
49 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
50 $ cd .. |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
51 $ hg -R test id |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
52 cb9a9f314b8b+ tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
53 $ hg id test |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
54 cb9a9f314b8b+ tip |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
55 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
56 with remote http repo |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
57 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
58 $ cd test |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
59 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
60 $ cat hg.pid >> $DAEMON_PIDS |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
61 $ hg id http://localhost:$HGPORT1/ |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
62 cb9a9f314b8b |
7757
af6a63438a8a
identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
63 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
64 remote with tags? |
7759
50baf8215942
tests: fix for test-identify returning 255
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7757
diff
changeset
|
65 |
11796
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
66 $ hg id -t http://localhost:$HGPORT1/ |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
67 abort: can't query remote revision number, branch, or tags |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
68 |
141e2e964705
tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
7830
diff
changeset
|
69 $ true # ends with util.Abort -> returns 255 |