annotate tests/test-obsolete.t @ 45:d89453a10991

include hash in test.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 08 Sep 2011 14:02:29 +0200
parents b243c10a5fbe
children 3b0364fc822f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
2 > [web]
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
3 > push_ssl = false
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
4 > allow_push = *
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
5 > [extensions]
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
6 > EOF
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
7 $ echo "obsolete=$(echo $(dirname $TESTDIR))/obsolete.py" >> $HGRCPATH
32
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
8 $ mkcommit() {
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
9 > echo "$1" > "$1"
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
10 > hg add "$1"
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
11 > hg ci -m "add $1"
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
12 > }
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
13
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
14 $ alias qlog="hg log --template='{rev} {node|short}\n'"
39
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
15 $ hg init local
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
16 $ cd local
32
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
17 $ mkcommit a # 0
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
18 $ mkcommit b # 1
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
19 $ mkcommit c # 2
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
20 $ hg up 1
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
21 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
22 $ mkcommit obsol_c # 3
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
23 created new head
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
24 $ hg debugobsolete 3 2
39
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
25
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
26
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
27 Test that obsolete changeset are hidden
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
28
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
29 $ qlog
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
30 3 0d3f46688ccc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
31 1 7c3bad9141dc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
32 0 1f0dee641bb7
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
33 $ qlog --hidden
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
34 3 0d3f46688ccc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
35 2 4538525df7e2
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
36 1 7c3bad9141dc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
37 0 1f0dee641bb7
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
38 $ qlog -r 'obsolete()' --hidden
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
39 2 4538525df7e2
39
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
40
40
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
41 test obsolete changeset with no-obsolete descendant
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
42 $ hg up 1 -q
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
43 $ mkcommit "obsol_c'" # 4 (on 1)
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
44 created new head
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
45 $ hg debugobsolete 4 3
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
46 $ qlog
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
47 4 725c380fe99b
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
48 1 7c3bad9141dc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
49 0 1f0dee641bb7
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
50 $ qlog -r 'obsolete()' --hidden
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
51 2 4538525df7e2
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
52 3 0d3f46688ccc
40
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
53 $ hg up 3 -q
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
54 $ mkcommit d # 5 (on 3)
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
55 $ qlog -r 'obsolete()'
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
56 3 0d3f46688ccc
40
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
57
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
58 Test communication of obsolete relation with a compatible client
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
59
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
60 $ hg init ../other-new
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
61 $ hg push ../other-new
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
62 pushing to ../other-new
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
63 searching for changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
64 adding changesets
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
65 adding manifests
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
66 adding file changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
67 added 6 changesets with 6 changes to 6 files (+2 heads)
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
68 $ qlog -R ../other-new -r 'obsolete()'
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
69 3 0d3f46688ccc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
70 $ qlog -R ../other-new
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
71 5 a7a6f2b5d8a5
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
72 4 725c380fe99b
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
73 3 0d3f46688ccc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
74 1 7c3bad9141dc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
75 0 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
76 $ hg up 3 -q
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
77 $ mkcommit obsol_d # 6
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
78 created new head
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
79 $ hg debugobsolete 6 5
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
80 $ qlog
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
81 6 95de7fc6918d
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
82 4 725c380fe99b
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
83 3 0d3f46688ccc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
84 1 7c3bad9141dc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
85 0 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
86 $ qlog -r 'obsolete()'
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
87 3 0d3f46688ccc
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
88 $ hg push ../other-new -f # XXX should not have to use -f
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
89 pushing to ../other-new
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
90 searching for changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
91 adding changesets
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
92 adding manifests
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
93 adding file changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
94 added 1 changesets with 1 changes to 1 files (+1 heads)
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
95 $ qlog -R ../other-new
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
96 6 95de7fc6918d
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
97 4 725c380fe99b
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
98 3 0d3f46688ccc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
99 1 7c3bad9141dc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
100 0 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
101 $ qlog -R ../other-new -r 'obsolete()'
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
102 3 0d3f46688ccc
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
103 $ hg up -q .^
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
104 $ mkcommit "obsol_d'" # 7
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
105 created new head
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
106 $ hg debugobsolete 7 6
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
107 $ hg pull -R ../other-new .
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
108 pulling from .
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
109 searching for changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
110 adding changesets
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
111 adding manifests
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
112 adding file changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
113 added 1 changesets with 1 changes to 1 files (+1 heads)
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
114 (run 'hg heads .' to see heads, 'hg merge' to merge)
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
115 $ qlog -R ../other-new
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
116 7 909a0fb57e5d
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
117 4 725c380fe99b
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
118 3 0d3f46688ccc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
119 1 7c3bad9141dc
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
120 0 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
121
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
122
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
123