##// END OF EJS Templates
tests: conditionalize tests for various repo features...
Gregory Szorc -
r37434:7542e97c default
parent child Browse files
Show More
@@ -1,186 +1,188 b''
1 #require test-repo
1 #require test-repo
2
2
3 Set vars:
3 Set vars:
4
4
5 $ . "$TESTDIR/helpers-testrepo.sh"
5 $ . "$TESTDIR/helpers-testrepo.sh"
6 $ CONTRIBDIR="$TESTDIR/../contrib"
6 $ CONTRIBDIR="$TESTDIR/../contrib"
7
7
8 Prepare repo:
8 Prepare repo:
9
9
10 $ hg init
10 $ hg init
11
11
12 $ echo this is file a > a
12 $ echo this is file a > a
13 $ hg add a
13 $ hg add a
14 $ hg commit -m first
14 $ hg commit -m first
15
15
16 $ echo adding to file a >> a
16 $ echo adding to file a >> a
17 $ hg commit -m second
17 $ hg commit -m second
18
18
19 $ echo adding more to file a >> a
19 $ echo adding more to file a >> a
20 $ hg commit -m third
20 $ hg commit -m third
21
21
22 $ hg up -r 0
22 $ hg up -r 0
23 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
24 $ echo merge-this >> a
24 $ echo merge-this >> a
25 $ hg commit -m merge-able
25 $ hg commit -m merge-able
26 created new head
26 created new head
27
27
28 $ hg up -r 2
28 $ hg up -r 2
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
30
30
31 perfstatus
31 perfstatus
32
32
33 $ cat >> $HGRCPATH << EOF
33 $ cat >> $HGRCPATH << EOF
34 > [extensions]
34 > [extensions]
35 > perfstatusext=$CONTRIBDIR/perf.py
35 > perfstatusext=$CONTRIBDIR/perf.py
36 > [perf]
36 > [perf]
37 > presleep=0
37 > presleep=0
38 > stub=on
38 > stub=on
39 > parentscount=1
39 > parentscount=1
40 > EOF
40 > EOF
41 $ hg help perfstatusext
41 $ hg help perfstatusext
42 perfstatusext extension - helper extension to measure performance
42 perfstatusext extension - helper extension to measure performance
43
43
44 list of commands:
44 list of commands:
45
45
46 perfaddremove
46 perfaddremove
47 (no help text available)
47 (no help text available)
48 perfancestors
48 perfancestors
49 (no help text available)
49 (no help text available)
50 perfancestorset
50 perfancestorset
51 (no help text available)
51 (no help text available)
52 perfannotate (no help text available)
52 perfannotate (no help text available)
53 perfbdiff benchmark a bdiff between revisions
53 perfbdiff benchmark a bdiff between revisions
54 perfbookmarks
54 perfbookmarks
55 benchmark parsing bookmarks from disk to memory
55 benchmark parsing bookmarks from disk to memory
56 perfbranchmap
56 perfbranchmap
57 benchmark the update of a branchmap
57 benchmark the update of a branchmap
58 perfbundleread
58 perfbundleread
59 Benchmark reading of bundle files.
59 Benchmark reading of bundle files.
60 perfcca (no help text available)
60 perfcca (no help text available)
61 perfchangegroupchangelog
61 perfchangegroupchangelog
62 Benchmark producing a changelog group for a changegroup.
62 Benchmark producing a changelog group for a changegroup.
63 perfchangeset
63 perfchangeset
64 (no help text available)
64 (no help text available)
65 perfctxfiles (no help text available)
65 perfctxfiles (no help text available)
66 perfdiffwd Profile diff of working directory changes
66 perfdiffwd Profile diff of working directory changes
67 perfdirfoldmap
67 perfdirfoldmap
68 (no help text available)
68 (no help text available)
69 perfdirs (no help text available)
69 perfdirs (no help text available)
70 perfdirstate (no help text available)
70 perfdirstate (no help text available)
71 perfdirstatedirs
71 perfdirstatedirs
72 (no help text available)
72 (no help text available)
73 perfdirstatefoldmap
73 perfdirstatefoldmap
74 (no help text available)
74 (no help text available)
75 perfdirstatewrite
75 perfdirstatewrite
76 (no help text available)
76 (no help text available)
77 perffncacheencode
77 perffncacheencode
78 (no help text available)
78 (no help text available)
79 perffncacheload
79 perffncacheload
80 (no help text available)
80 (no help text available)
81 perffncachewrite
81 perffncachewrite
82 (no help text available)
82 (no help text available)
83 perfheads (no help text available)
83 perfheads (no help text available)
84 perfindex (no help text available)
84 perfindex (no help text available)
85 perfloadmarkers
85 perfloadmarkers
86 benchmark the time to parse the on-disk markers for a repo
86 benchmark the time to parse the on-disk markers for a repo
87 perflog (no help text available)
87 perflog (no help text available)
88 perflookup (no help text available)
88 perflookup (no help text available)
89 perflrucachedict
89 perflrucachedict
90 (no help text available)
90 (no help text available)
91 perfmanifest (no help text available)
91 perfmanifest (no help text available)
92 perfmergecalculate
92 perfmergecalculate
93 (no help text available)
93 (no help text available)
94 perfmoonwalk benchmark walking the changelog backwards
94 perfmoonwalk benchmark walking the changelog backwards
95 perfnodelookup
95 perfnodelookup
96 (no help text available)
96 (no help text available)
97 perfparents (no help text available)
97 perfparents (no help text available)
98 perfpathcopies
98 perfpathcopies
99 (no help text available)
99 (no help text available)
100 perfphases benchmark phasesets computation
100 perfphases benchmark phasesets computation
101 perfrawfiles (no help text available)
101 perfrawfiles (no help text available)
102 perfrevlogchunks
102 perfrevlogchunks
103 Benchmark operations on revlog chunks.
103 Benchmark operations on revlog chunks.
104 perfrevlogindex
104 perfrevlogindex
105 Benchmark operations against a revlog index.
105 Benchmark operations against a revlog index.
106 perfrevlogrevision
106 perfrevlogrevision
107 Benchmark obtaining a revlog revision.
107 Benchmark obtaining a revlog revision.
108 perfrevlogrevisions
108 perfrevlogrevisions
109 Benchmark reading a series of revisions from a revlog.
109 Benchmark reading a series of revisions from a revlog.
110 perfrevrange (no help text available)
110 perfrevrange (no help text available)
111 perfrevset benchmark the execution time of a revset
111 perfrevset benchmark the execution time of a revset
112 perfstartup (no help text available)
112 perfstartup (no help text available)
113 perfstatus (no help text available)
113 perfstatus (no help text available)
114 perftags (no help text available)
114 perftags (no help text available)
115 perftemplating
115 perftemplating
116 (no help text available)
116 (no help text available)
117 perfunidiff benchmark a unified diff between revisions
117 perfunidiff benchmark a unified diff between revisions
118 perfvolatilesets
118 perfvolatilesets
119 benchmark the computation of various volatile set
119 benchmark the computation of various volatile set
120 perfwalk (no help text available)
120 perfwalk (no help text available)
121 perfwrite microbenchmark ui.write
121 perfwrite microbenchmark ui.write
122
122
123 (use 'hg help -v perfstatusext' to show built-in aliases and global options)
123 (use 'hg help -v perfstatusext' to show built-in aliases and global options)
124 $ hg perfaddremove
124 $ hg perfaddremove
125 $ hg perfancestors
125 $ hg perfancestors
126 $ hg perfancestorset 2
126 $ hg perfancestorset 2
127 $ hg perfannotate a
127 $ hg perfannotate a
128 $ hg perfbdiff -c 1
128 $ hg perfbdiff -c 1
129 $ hg perfbdiff --alldata 1
129 $ hg perfbdiff --alldata 1
130 $ hg perfunidiff -c 1
130 $ hg perfunidiff -c 1
131 $ hg perfunidiff --alldata 1
131 $ hg perfunidiff --alldata 1
132 $ hg perfbookmarks
132 $ hg perfbookmarks
133 $ hg perfbranchmap
133 $ hg perfbranchmap
134 $ hg perfcca
134 $ hg perfcca
135 $ hg perfchangegroupchangelog
135 $ hg perfchangegroupchangelog
136 $ hg perfchangeset 2
136 $ hg perfchangeset 2
137 $ hg perfctxfiles 2
137 $ hg perfctxfiles 2
138 $ hg perfdiffwd
138 $ hg perfdiffwd
139 $ hg perfdirfoldmap
139 $ hg perfdirfoldmap
140 $ hg perfdirs
140 $ hg perfdirs
141 $ hg perfdirstate
141 $ hg perfdirstate
142 $ hg perfdirstatedirs
142 $ hg perfdirstatedirs
143 $ hg perfdirstatefoldmap
143 $ hg perfdirstatefoldmap
144 $ hg perfdirstatewrite
144 $ hg perfdirstatewrite
145 #if repofncache
145 $ hg perffncacheencode
146 $ hg perffncacheencode
146 $ hg perffncacheload
147 $ hg perffncacheload
147 $ hg perffncachewrite
148 $ hg perffncachewrite
149 #endif
148 $ hg perfheads
150 $ hg perfheads
149 $ hg perfindex
151 $ hg perfindex
150 $ hg perfloadmarkers
152 $ hg perfloadmarkers
151 $ hg perflog
153 $ hg perflog
152 $ hg perflookup 2
154 $ hg perflookup 2
153 $ hg perflrucache
155 $ hg perflrucache
154 $ hg perfmanifest 2
156 $ hg perfmanifest 2
155 $ hg perfmergecalculate -r 3
157 $ hg perfmergecalculate -r 3
156 $ hg perfmoonwalk
158 $ hg perfmoonwalk
157 $ hg perfnodelookup 2
159 $ hg perfnodelookup 2
158 $ hg perfpathcopies 1 2
160 $ hg perfpathcopies 1 2
159 $ hg perfrawfiles 2
161 $ hg perfrawfiles 2
160 $ hg perfrevlogindex -c
162 $ hg perfrevlogindex -c
161 #if reporevlogstore
163 #if reporevlogstore
162 $ hg perfrevlogrevisions .hg/store/data/a.i
164 $ hg perfrevlogrevisions .hg/store/data/a.i
163 #endif
165 #endif
164 $ hg perfrevlogrevision -m 0
166 $ hg perfrevlogrevision -m 0
165 $ hg perfrevlogchunks -c
167 $ hg perfrevlogchunks -c
166 $ hg perfrevrange
168 $ hg perfrevrange
167 $ hg perfrevset 'all()'
169 $ hg perfrevset 'all()'
168 $ hg perfstartup
170 $ hg perfstartup
169 $ hg perfstatus
171 $ hg perfstatus
170 $ hg perftags
172 $ hg perftags
171 $ hg perftemplating
173 $ hg perftemplating
172 $ hg perfvolatilesets
174 $ hg perfvolatilesets
173 $ hg perfwalk
175 $ hg perfwalk
174 $ hg perfparents
176 $ hg perfparents
175
177
176 Check perf.py for historical portability
178 Check perf.py for historical portability
177
179
178 $ cd "$TESTDIR/.."
180 $ cd "$TESTDIR/.."
179
181
180 $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py;
182 $ (testrepohg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py;
181 > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) |
183 > testrepohg files -r tip glob:mercurial/*.c glob:mercurial/*.py) |
182 > "$TESTDIR"/check-perf-code.py contrib/perf.py
184 > "$TESTDIR"/check-perf-code.py contrib/perf.py
183 contrib/perf.py:\d+: (re)
185 contrib/perf.py:\d+: (re)
184 > from mercurial import (
186 > from mercurial import (
185 import newer module separately in try clause for early Mercurial
187 import newer module separately in try clause for early Mercurial
186 [1]
188 [1]
@@ -1,207 +1,208 b''
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
2 > [extensions]
3 > convert=
3 > convert=
4 > [convert]
4 > [convert]
5 > hg.saverev=False
5 > hg.saverev=False
6 > EOF
6 > EOF
7 $ hg init orig
7 $ hg init orig
8 $ cd orig
8 $ cd orig
9 $ echo foo > foo
9 $ echo foo > foo
10 $ echo bar > bar
10 $ echo bar > bar
11 $ hg ci -qAm 'add foo bar' -d '0 0'
11 $ hg ci -qAm 'add foo bar' -d '0 0'
12 $ echo >> foo
12 $ echo >> foo
13 $ hg ci -m 'change foo' -d '1 0'
13 $ hg ci -m 'change foo' -d '1 0'
14 $ hg up -qC 0
14 $ hg up -qC 0
15 $ hg copy --after --force foo bar
15 $ hg copy --after --force foo bar
16 $ hg copy foo baz
16 $ hg copy foo baz
17 $ hg ci -m 'make bar and baz copies of foo' -d '2 0'
17 $ hg ci -m 'make bar and baz copies of foo' -d '2 0'
18 created new head
18 created new head
19
19
20 Test that template can print all file copies (issue4362)
20 Test that template can print all file copies (issue4362)
21 $ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}"
21 $ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}"
22 File: bar (foo)
22 File: bar (foo)
23 File: baz (foo)
23 File: baz (foo)
24
24
25 $ hg bookmark premerge1
25 $ hg bookmark premerge1
26 $ hg merge -r 1
26 $ hg merge -r 1
27 merging baz and foo to baz
27 merging baz and foo to baz
28 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
28 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
29 (branch merge, don't forget to commit)
29 (branch merge, don't forget to commit)
30 $ hg ci -m 'merge local copy' -d '3 0'
30 $ hg ci -m 'merge local copy' -d '3 0'
31 $ hg up -C 1
31 $ hg up -C 1
32 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
32 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
33 (leaving bookmark premerge1)
33 (leaving bookmark premerge1)
34 $ hg bookmark premerge2
34 $ hg bookmark premerge2
35 $ hg merge 2
35 $ hg merge 2
36 merging foo and baz to baz
36 merging foo and baz to baz
37 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
37 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
38 (branch merge, don't forget to commit)
38 (branch merge, don't forget to commit)
39 $ hg ci -m 'merge remote copy' -d '4 0'
39 $ hg ci -m 'merge remote copy' -d '4 0'
40 created new head
40 created new head
41
41
42 Make and delete some tags
42 Make and delete some tags
43
43
44 $ hg tag that
44 $ hg tag that
45 $ hg tag --remove that
45 $ hg tag --remove that
46 $ hg tag this
46 $ hg tag this
47
47
48 #if execbit
48 #if execbit
49 $ chmod +x baz
49 $ chmod +x baz
50 #else
50 #else
51 $ echo some other change to make sure we get a rev 5 > baz
51 $ echo some other change to make sure we get a rev 5 > baz
52 #endif
52 #endif
53 $ hg ci -m 'mark baz executable' -d '5 0'
53 $ hg ci -m 'mark baz executable' -d '5 0'
54 $ cd ..
54 $ cd ..
55 $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
55 $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
56 initializing destination new repository
56 initializing destination new repository
57 scanning source...
57 scanning source...
58 sorting...
58 sorting...
59 converting...
59 converting...
60 8 add foo bar
60 8 add foo bar
61 7 change foo
61 7 change foo
62 6 make bar and baz copies of foo
62 6 make bar and baz copies of foo
63 5 merge local copy
63 5 merge local copy
64 4 merge remote copy
64 4 merge remote copy
65 3 Added tag that for changeset 88586c4e9f02
65 3 Added tag that for changeset 88586c4e9f02
66 2 Removed tag that
66 2 Removed tag that
67 1 Added tag this for changeset c56a7f387039
67 1 Added tag this for changeset c56a7f387039
68 0 mark baz executable
68 0 mark baz executable
69 updating bookmarks
69 updating bookmarks
70 $ cd new
70 $ cd new
71 $ hg out ../orig
71 $ hg out ../orig
72 comparing with ../orig
72 comparing with ../orig
73 searching for changes
73 searching for changes
74 no changes found
74 no changes found
75 [1]
75 [1]
76 #if execbit
76 #if execbit
77 $ hg bookmarks
77 $ hg bookmarks
78 premerge1 3:973ef48a98a4
78 premerge1 3:973ef48a98a4
79 premerge2 8:91d107c423ba
79 premerge2 8:91d107c423ba
80 #else
80 #else
81 Different hash because no x bit
81 Different hash because no x bit
82 $ hg bookmarks
82 $ hg bookmarks
83 premerge1 3:973ef48a98a4
83 premerge1 3:973ef48a98a4
84 premerge2 8:3537b15eaaca
84 premerge2 8:3537b15eaaca
85 #endif
85 #endif
86
86
87 Test that redoing a convert results in an identical graph
87 Test that redoing a convert results in an identical graph
88 $ cd ../
88 $ cd ../
89 $ rm new/.hg/shamap
89 $ rm new/.hg/shamap
90 $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
90 $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
91 scanning source...
91 scanning source...
92 sorting...
92 sorting...
93 converting...
93 converting...
94 8 add foo bar
94 8 add foo bar
95 7 change foo
95 7 change foo
96 6 make bar and baz copies of foo
96 6 make bar and baz copies of foo
97 5 merge local copy
97 5 merge local copy
98 4 merge remote copy
98 4 merge remote copy
99 3 Added tag that for changeset 88586c4e9f02
99 3 Added tag that for changeset 88586c4e9f02
100 2 Removed tag that
100 2 Removed tag that
101 1 Added tag this for changeset c56a7f387039
101 1 Added tag this for changeset c56a7f387039
102 0 mark baz executable
102 0 mark baz executable
103 updating bookmarks
103 updating bookmarks
104 $ hg -R new log -G -T '{rev} {desc}'
104 $ hg -R new log -G -T '{rev} {desc}'
105 o 8 mark baz executable
105 o 8 mark baz executable
106 |
106 |
107 o 7 Added tag this for changeset c56a7f387039
107 o 7 Added tag this for changeset c56a7f387039
108 |
108 |
109 o 6 Removed tag that
109 o 6 Removed tag that
110 |
110 |
111 o 5 Added tag that for changeset 88586c4e9f02
111 o 5 Added tag that for changeset 88586c4e9f02
112 |
112 |
113 o 4 merge remote copy
113 o 4 merge remote copy
114 |\
114 |\
115 +---o 3 merge local copy
115 +---o 3 merge local copy
116 | |/
116 | |/
117 | o 2 make bar and baz copies of foo
117 | o 2 make bar and baz copies of foo
118 | |
118 | |
119 o | 1 change foo
119 o | 1 change foo
120 |/
120 |/
121 o 0 add foo bar
121 o 0 add foo bar
122
122
123
123
124 check shamap LF and CRLF handling
124 check shamap LF and CRLF handling
125
125
126 $ cat > rewrite.py <<EOF
126 $ cat > rewrite.py <<EOF
127 > import sys
127 > import sys
128 > # Interlace LF and CRLF
128 > # Interlace LF and CRLF
129 > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n'))
129 > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n'))
130 > for i, l in enumerate(open(sys.argv[1], 'rb'))]
130 > for i, l in enumerate(open(sys.argv[1], 'rb'))]
131 > open(sys.argv[1], 'wb').write(b''.join(lines))
131 > open(sys.argv[1], 'wb').write(b''.join(lines))
132 > EOF
132 > EOF
133 $ $PYTHON rewrite.py new/.hg/shamap
133 $ $PYTHON rewrite.py new/.hg/shamap
134 $ cd orig
134 $ cd orig
135 $ hg up -qC 1
135 $ hg up -qC 1
136 $ echo foo >> foo
136 $ echo foo >> foo
137 $ hg ci -qm 'change foo again'
137 $ hg ci -qm 'change foo again'
138 $ hg up -qC 2
138 $ hg up -qC 2
139 $ echo foo >> foo
139 $ echo foo >> foo
140 $ hg ci -qm 'change foo again again'
140 $ hg ci -qm 'change foo again again'
141 $ cd ..
141 $ cd ..
142 $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
142 $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
143 scanning source...
143 scanning source...
144 sorting...
144 sorting...
145 converting...
145 converting...
146 1 change foo again again
146 1 change foo again again
147 0 change foo again
147 0 change foo again
148 updating bookmarks
148 updating bookmarks
149
149
150 init broken repository
150 init broken repository
151
151
152 $ hg init broken
152 $ hg init broken
153 $ cd broken
153 $ cd broken
154 $ echo a >> a
154 $ echo a >> a
155 $ echo b >> b
155 $ echo b >> b
156 $ hg ci -qAm init
156 $ hg ci -qAm init
157 $ echo a >> a
157 $ echo a >> a
158 $ echo b >> b
158 $ echo b >> b
159 $ hg copy b c
159 $ hg copy b c
160 $ hg ci -qAm changeall
160 $ hg ci -qAm changeall
161 $ hg up -qC 0
161 $ hg up -qC 0
162 $ echo bc >> b
162 $ echo bc >> b
163 $ hg ci -m changebagain
163 $ hg ci -m changebagain
164 created new head
164 created new head
165 $ HGMERGE=internal:local hg -q merge
165 $ HGMERGE=internal:local hg -q merge
166 $ hg ci -m merge
166 $ hg ci -m merge
167 $ hg mv b d
167 $ hg mv b d
168 $ hg ci -m moveb
168 $ hg ci -m moveb
169
169
170 break it
170 break it
171
171
172 #if reporevlogstore
172 #if reporevlogstore
173 $ rm .hg/store/data/b.*
173 $ rm .hg/store/data/b.*
174 #endif
174 #endif
175 #if reposimplestore
175 #if reposimplestore
176 $ rm .hg/store/data/b/*
176 $ rm .hg/store/data/b/*
177 #endif
177 #endif
178 $ cd ..
178 $ cd ..
179 $ hg --config convert.hg.ignoreerrors=True convert broken fixed
179 $ hg --config convert.hg.ignoreerrors=True convert broken fixed
180 initializing destination fixed repository
180 initializing destination fixed repository
181 scanning source...
181 scanning source...
182 sorting...
182 sorting...
183 converting...
183 converting...
184 4 init
184 4 init
185 ignoring: data/b.i@1e88685f5dde: no match found
185 ignoring: data/b.i@1e88685f5dde: no match found (reporevlogstore !)
186 ignoring: data/b/index@1e88685f5dde: no node (reposimplestore !)
186 3 changeall
187 3 changeall
187 2 changebagain
188 2 changebagain
188 1 merge
189 1 merge
189 0 moveb
190 0 moveb
190 $ hg -R fixed verify
191 $ hg -R fixed verify
191 checking changesets
192 checking changesets
192 checking manifests
193 checking manifests
193 crosschecking files in changesets and manifests
194 crosschecking files in changesets and manifests
194 checking files
195 checking files
195 3 files, 5 changesets, 5 total revisions
196 3 files, 5 changesets, 5 total revisions
196
197
197 manifest -r 0
198 manifest -r 0
198
199
199 $ hg -R fixed manifest -r 0
200 $ hg -R fixed manifest -r 0
200 a
201 a
201
202
202 manifest -r tip
203 manifest -r tip
203
204
204 $ hg -R fixed manifest -r tip
205 $ hg -R fixed manifest -r tip
205 a
206 a
206 c
207 c
207 d
208 d
@@ -1,418 +1,427 b''
1 $ cat << EOF >> $HGRCPATH
1 $ cat << EOF >> $HGRCPATH
2 > [ui]
2 > [ui]
3 > interactive=yes
3 > interactive=yes
4 > EOF
4 > EOF
5
5
6 $ hg init debugrevlog
6 $ hg init debugrevlog
7 $ cd debugrevlog
7 $ cd debugrevlog
8 $ echo a > a
8 $ echo a > a
9 $ hg ci -Am adda
9 $ hg ci -Am adda
10 adding a
10 adding a
11 #if reporevlogstore
11 $ hg debugrevlog -m
12 $ hg debugrevlog -m
12 format : 1
13 format : 1
13 flags : inline, generaldelta
14 flags : inline, generaldelta
14
15
15 revisions : 1
16 revisions : 1
16 merges : 0 ( 0.00%)
17 merges : 0 ( 0.00%)
17 normal : 1 (100.00%)
18 normal : 1 (100.00%)
18 revisions : 1
19 revisions : 1
19 full : 1 (100.00%)
20 full : 1 (100.00%)
20 deltas : 0 ( 0.00%)
21 deltas : 0 ( 0.00%)
21 revision size : 44
22 revision size : 44
22 full : 44 (100.00%)
23 full : 44 (100.00%)
23 deltas : 0 ( 0.00%)
24 deltas : 0 ( 0.00%)
24
25
25 chunks : 1
26 chunks : 1
26 0x75 (u) : 1 (100.00%)
27 0x75 (u) : 1 (100.00%)
27 chunks size : 44
28 chunks size : 44
28 0x75 (u) : 44 (100.00%)
29 0x75 (u) : 44 (100.00%)
29
30
30 avg chain length : 0
31 avg chain length : 0
31 max chain length : 0
32 max chain length : 0
32 max chain reach : 44
33 max chain reach : 44
33 compression ratio : 0
34 compression ratio : 0
34
35
35 uncompressed data size (min/max/avg) : 43 / 43 / 43
36 uncompressed data size (min/max/avg) : 43 / 43 / 43
36 full revision size (min/max/avg) : 44 / 44 / 44
37 full revision size (min/max/avg) : 44 / 44 / 44
37 delta size (min/max/avg) : 0 / 0 / 0
38 delta size (min/max/avg) : 0 / 0 / 0
39 #endif
38
40
39 Test debugindex, with and without the --verbose/--debug flag
41 Test debugindex, with and without the --verbose/--debug flag
40 $ hg debugindex a
42 $ hg debugindex a
41 rev linkrev nodeid p1 p2
43 rev linkrev nodeid p1 p2
42 0 0 b789fdd96dc2 000000000000 000000000000
44 0 0 b789fdd96dc2 000000000000 000000000000
43
45
46 #if no-reposimplestore
44 $ hg --verbose debugindex a
47 $ hg --verbose debugindex a
45 rev offset length linkrev nodeid p1 p2
48 rev offset length linkrev nodeid p1 p2
46 0 0 3 0 b789fdd96dc2 000000000000 000000000000
49 0 0 3 0 b789fdd96dc2 000000000000 000000000000
47
50
48 $ hg --debug debugindex a
51 $ hg --debug debugindex a
49 rev offset length linkrev nodeid p1 p2
52 rev offset length linkrev nodeid p1 p2
50 0 0 3 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
53 0 0 3 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
54 #endif
51
55
52 $ hg debugindex -f 1 a
56 $ hg debugindex -f 1 a
53 rev flag size link p1 p2 nodeid
57 rev flag size link p1 p2 nodeid
54 0 0000 2 0 -1 -1 b789fdd96dc2
58 0 0000 2 0 -1 -1 b789fdd96dc2
55
59
60 #if no-reposimplestore
56 $ hg --verbose debugindex -f 1 a
61 $ hg --verbose debugindex -f 1 a
57 rev flag offset length size link p1 p2 nodeid
62 rev flag offset length size link p1 p2 nodeid
58 0 0000 0 3 2 0 -1 -1 b789fdd96dc2
63 0 0000 0 3 2 0 -1 -1 b789fdd96dc2
59
64
60 $ hg --debug debugindex -f 1 a
65 $ hg --debug debugindex -f 1 a
61 rev flag offset length size link p1 p2 nodeid
66 rev flag offset length size link p1 p2 nodeid
62 0 0000 0 3 2 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
67 0 0000 0 3 2 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
68 #endif
63
69
64 debugdelta chain basic output
70 debugdelta chain basic output
65
71
72 #if reporevlogstore
66 $ hg debugdeltachain -m
73 $ hg debugdeltachain -m
67 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
74 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
68 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000
75 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000
69
76
70 $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n'
77 $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n'
71 0 1 1
78 0 1 1
72
79
73 $ hg debugdeltachain -m -Tjson
80 $ hg debugdeltachain -m -Tjson
74 [
81 [
75 {
82 {
76 "chainid": 1,
83 "chainid": 1,
77 "chainlen": 1,
84 "chainlen": 1,
78 "chainratio": 1.02325581395,
85 "chainratio": 1.02325581395,
79 "chainsize": 44,
86 "chainsize": 44,
80 "compsize": 44,
87 "compsize": 44,
81 "deltatype": "base",
88 "deltatype": "base",
82 "extradist": 0,
89 "extradist": 0,
83 "extraratio": 0.0,
90 "extraratio": 0.0,
84 "lindist": 44,
91 "lindist": 44,
85 "prevrev": -1,
92 "prevrev": -1,
86 "rev": 0,
93 "rev": 0,
87 "uncompsize": 43
94 "uncompsize": 43
88 }
95 }
89 ]
96 ]
90
97
91 debugdelta chain with sparse read enabled
98 debugdelta chain with sparse read enabled
92
99
93 $ cat >> $HGRCPATH <<EOF
100 $ cat >> $HGRCPATH <<EOF
94 > [experimental]
101 > [experimental]
95 > sparse-read = True
102 > sparse-read = True
96 > EOF
103 > EOF
97 $ hg debugdeltachain -m
104 $ hg debugdeltachain -m
98 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
105 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
99 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
106 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1
100
107
101 $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n'
108 $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n'
102 0 1 1 44 44 1.0
109 0 1 1 44 44 1.0
103
110
104 $ hg debugdeltachain -m -Tjson
111 $ hg debugdeltachain -m -Tjson
105 [
112 [
106 {
113 {
107 "chainid": 1,
114 "chainid": 1,
108 "chainlen": 1,
115 "chainlen": 1,
109 "chainratio": 1.02325581395,
116 "chainratio": 1.02325581395,
110 "chainsize": 44,
117 "chainsize": 44,
111 "compsize": 44,
118 "compsize": 44,
112 "deltatype": "base",
119 "deltatype": "base",
113 "extradist": 0,
120 "extradist": 0,
114 "extraratio": 0.0,
121 "extraratio": 0.0,
115 "largestblock": 44,
122 "largestblock": 44,
116 "lindist": 44,
123 "lindist": 44,
117 "prevrev": -1,
124 "prevrev": -1,
118 "readdensity": 1.0,
125 "readdensity": 1.0,
119 "readsize": 44,
126 "readsize": 44,
120 "rev": 0,
127 "rev": 0,
121 "srchunks": 1,
128 "srchunks": 1,
122 "uncompsize": 43
129 "uncompsize": 43
123 }
130 }
124 ]
131 ]
125
132
126 $ printf "This test checks things.\n" >> a
133 $ printf "This test checks things.\n" >> a
127 $ hg ci -m a
134 $ hg ci -m a
128 $ hg branch other
135 $ hg branch other
129 marked working directory as branch other
136 marked working directory as branch other
130 (branches are permanent and global, did you want a bookmark?)
137 (branches are permanent and global, did you want a bookmark?)
131 $ for i in `$TESTDIR/seq.py 5`; do
138 $ for i in `$TESTDIR/seq.py 5`; do
132 > printf "shorter ${i}" >> a
139 > printf "shorter ${i}" >> a
133 > hg ci -m "a other:$i"
140 > hg ci -m "a other:$i"
134 > hg up -q default
141 > hg up -q default
135 > printf "for the branch default we want longer chains: ${i}" >> a
142 > printf "for the branch default we want longer chains: ${i}" >> a
136 > hg ci -m "a default:$i"
143 > hg ci -m "a default:$i"
137 > hg up -q other
144 > hg up -q other
138 > done
145 > done
139 $ hg debugdeltachain a -T '{rev} {srchunks}\n' \
146 $ hg debugdeltachain a -T '{rev} {srchunks}\n' \
140 > --config experimental.sparse-read.density-threshold=0.50 \
147 > --config experimental.sparse-read.density-threshold=0.50 \
141 > --config experimental.sparse-read.min-gap-size=0
148 > --config experimental.sparse-read.min-gap-size=0
142 0 1
149 0 1
143 1 1
150 1 1
144 2 1
151 2 1
145 3 1
152 3 1
146 4 1
153 4 1
147 5 1
154 5 1
148 6 1
155 6 1
149 7 1
156 7 1
150 8 1
157 8 1
151 9 1
158 9 1
152 10 2
159 10 2
153 11 1
160 11 1
154 $ hg --config extensions.strip= strip --no-backup -r 1
161 $ hg --config extensions.strip= strip --no-backup -r 1
155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
156
163
157 Test max chain len
164 Test max chain len
158 $ cat >> $HGRCPATH << EOF
165 $ cat >> $HGRCPATH << EOF
159 > [format]
166 > [format]
160 > maxchainlen=4
167 > maxchainlen=4
161 > EOF
168 > EOF
162
169
163 $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a
170 $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a
164 $ hg ci -m a
171 $ hg ci -m a
165 $ printf "b\n" >> a
172 $ printf "b\n" >> a
166 $ hg ci -m a
173 $ hg ci -m a
167 $ printf "c\n" >> a
174 $ printf "c\n" >> a
168 $ hg ci -m a
175 $ hg ci -m a
169 $ printf "d\n" >> a
176 $ printf "d\n" >> a
170 $ hg ci -m a
177 $ hg ci -m a
171 $ printf "e\n" >> a
178 $ printf "e\n" >> a
172 $ hg ci -m a
179 $ hg ci -m a
173 $ printf "f\n" >> a
180 $ printf "f\n" >> a
174 $ hg ci -m a
181 $ hg ci -m a
175 $ printf 'g\n' >> a
182 $ printf 'g\n' >> a
176 $ hg ci -m a
183 $ hg ci -m a
177 $ printf 'h\n' >> a
184 $ printf 'h\n' >> a
178 $ hg ci -m a
185 $ hg ci -m a
186
179 $ hg debugrevlog -d a
187 $ hg debugrevlog -d a
180 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
188 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
181 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob)
189 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob)
182 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob)
190 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob)
183 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
191 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
184 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
192 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
185 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob)
193 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob)
186 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob)
194 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob)
187 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob)
195 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob)
188 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
196 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
189 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
197 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
198 #endif
190
199
191 Test debuglocks command:
200 Test debuglocks command:
192
201
193 $ hg debuglocks
202 $ hg debuglocks
194 lock: free
203 lock: free
195 wlock: free
204 wlock: free
196
205
197 * Test setting the lock
206 * Test setting the lock
198
207
199 waitlock <file> will wait for file to be created. If it isn't in a reasonable
208 waitlock <file> will wait for file to be created. If it isn't in a reasonable
200 amount of time, displays error message and returns 1
209 amount of time, displays error message and returns 1
201 $ waitlock() {
210 $ waitlock() {
202 > start=`date +%s`
211 > start=`date +%s`
203 > timeout=5
212 > timeout=5
204 > while [ \( ! -f $1 \) -a \( ! -L $1 \) ]; do
213 > while [ \( ! -f $1 \) -a \( ! -L $1 \) ]; do
205 > now=`date +%s`
214 > now=`date +%s`
206 > if [ "`expr $now - $start`" -gt $timeout ]; then
215 > if [ "`expr $now - $start`" -gt $timeout ]; then
207 > echo "timeout: $1 was not created in $timeout seconds"
216 > echo "timeout: $1 was not created in $timeout seconds"
208 > return 1
217 > return 1
209 > fi
218 > fi
210 > sleep 0.1
219 > sleep 0.1
211 > done
220 > done
212 > }
221 > }
213 $ dolock() {
222 $ dolock() {
214 > {
223 > {
215 > waitlock .hg/unlock
224 > waitlock .hg/unlock
216 > rm -f .hg/unlock
225 > rm -f .hg/unlock
217 > echo y
226 > echo y
218 > } | hg debuglocks "$@" > /dev/null
227 > } | hg debuglocks "$@" > /dev/null
219 > }
228 > }
220 $ dolock -s &
229 $ dolock -s &
221 $ waitlock .hg/store/lock
230 $ waitlock .hg/store/lock
222
231
223 $ hg debuglocks
232 $ hg debuglocks
224 lock: user *, process * (*s) (glob)
233 lock: user *, process * (*s) (glob)
225 wlock: free
234 wlock: free
226 [1]
235 [1]
227 $ touch .hg/unlock
236 $ touch .hg/unlock
228 $ wait
237 $ wait
229 $ [ -f .hg/store/lock ] || echo "There is no lock"
238 $ [ -f .hg/store/lock ] || echo "There is no lock"
230 There is no lock
239 There is no lock
231
240
232 * Test setting the wlock
241 * Test setting the wlock
233
242
234 $ dolock -S &
243 $ dolock -S &
235 $ waitlock .hg/wlock
244 $ waitlock .hg/wlock
236
245
237 $ hg debuglocks
246 $ hg debuglocks
238 lock: free
247 lock: free
239 wlock: user *, process * (*s) (glob)
248 wlock: user *, process * (*s) (glob)
240 [1]
249 [1]
241 $ touch .hg/unlock
250 $ touch .hg/unlock
242 $ wait
251 $ wait
243 $ [ -f .hg/wlock ] || echo "There is no wlock"
252 $ [ -f .hg/wlock ] || echo "There is no wlock"
244 There is no wlock
253 There is no wlock
245
254
246 * Test setting both locks
255 * Test setting both locks
247
256
248 $ dolock -Ss &
257 $ dolock -Ss &
249 $ waitlock .hg/wlock && waitlock .hg/store/lock
258 $ waitlock .hg/wlock && waitlock .hg/store/lock
250
259
251 $ hg debuglocks
260 $ hg debuglocks
252 lock: user *, process * (*s) (glob)
261 lock: user *, process * (*s) (glob)
253 wlock: user *, process * (*s) (glob)
262 wlock: user *, process * (*s) (glob)
254 [2]
263 [2]
255
264
256 * Test failing to set a lock
265 * Test failing to set a lock
257
266
258 $ hg debuglocks -s
267 $ hg debuglocks -s
259 abort: lock is already held
268 abort: lock is already held
260 [255]
269 [255]
261
270
262 $ hg debuglocks -S
271 $ hg debuglocks -S
263 abort: wlock is already held
272 abort: wlock is already held
264 [255]
273 [255]
265
274
266 $ touch .hg/unlock
275 $ touch .hg/unlock
267 $ wait
276 $ wait
268
277
269 $ hg debuglocks
278 $ hg debuglocks
270 lock: free
279 lock: free
271 wlock: free
280 wlock: free
272
281
273 * Test forcing the lock
282 * Test forcing the lock
274
283
275 $ dolock -s &
284 $ dolock -s &
276 $ waitlock .hg/store/lock
285 $ waitlock .hg/store/lock
277
286
278 $ hg debuglocks
287 $ hg debuglocks
279 lock: user *, process * (*s) (glob)
288 lock: user *, process * (*s) (glob)
280 wlock: free
289 wlock: free
281 [1]
290 [1]
282
291
283 $ hg debuglocks -L
292 $ hg debuglocks -L
284
293
285 $ hg debuglocks
294 $ hg debuglocks
286 lock: free
295 lock: free
287 wlock: free
296 wlock: free
288
297
289 $ touch .hg/unlock
298 $ touch .hg/unlock
290 $ wait
299 $ wait
291
300
292 * Test forcing the wlock
301 * Test forcing the wlock
293
302
294 $ dolock -S &
303 $ dolock -S &
295 $ waitlock .hg/wlock
304 $ waitlock .hg/wlock
296
305
297 $ hg debuglocks
306 $ hg debuglocks
298 lock: free
307 lock: free
299 wlock: user *, process * (*s) (glob)
308 wlock: user *, process * (*s) (glob)
300 [1]
309 [1]
301
310
302 $ hg debuglocks -W
311 $ hg debuglocks -W
303
312
304 $ hg debuglocks
313 $ hg debuglocks
305 lock: free
314 lock: free
306 wlock: free
315 wlock: free
307
316
308 $ touch .hg/unlock
317 $ touch .hg/unlock
309 $ wait
318 $ wait
310
319
311 Test WdirUnsupported exception
320 Test WdirUnsupported exception
312
321
313 $ hg debugdata -c ffffffffffffffffffffffffffffffffffffffff
322 $ hg debugdata -c ffffffffffffffffffffffffffffffffffffffff
314 abort: working directory revision cannot be specified
323 abort: working directory revision cannot be specified
315 [255]
324 [255]
316
325
317 Test cache warming command
326 Test cache warming command
318
327
319 $ rm -rf .hg/cache/
328 $ rm -rf .hg/cache/
320 $ hg debugupdatecaches --debug
329 $ hg debugupdatecaches --debug
321 updating the branch cache
330 updating the branch cache
322 $ ls -r .hg/cache/*
331 $ ls -r .hg/cache/*
323 .hg/cache/rbc-revs-v1
332 .hg/cache/rbc-revs-v1
324 .hg/cache/rbc-names-v1
333 .hg/cache/rbc-names-v1
325 .hg/cache/branch2-served
334 .hg/cache/branch2-served
326
335
327 $ cd ..
336 $ cd ..
328
337
329 Test internal debugstacktrace command
338 Test internal debugstacktrace command
330
339
331 $ cat > debugstacktrace.py << EOF
340 $ cat > debugstacktrace.py << EOF
332 > from __future__ import absolute_import
341 > from __future__ import absolute_import
333 > import sys
342 > import sys
334 > from mercurial import util
343 > from mercurial import util
335 > def f():
344 > def f():
336 > util.debugstacktrace(f=sys.stdout)
345 > util.debugstacktrace(f=sys.stdout)
337 > g()
346 > g()
338 > def g():
347 > def g():
339 > util.dst('hello from g\\n', skip=1)
348 > util.dst('hello from g\\n', skip=1)
340 > h()
349 > h()
341 > def h():
350 > def h():
342 > util.dst('hi ...\\nfrom h hidden in g', 1, depth=2)
351 > util.dst('hi ...\\nfrom h hidden in g', 1, depth=2)
343 > f()
352 > f()
344 > EOF
353 > EOF
345 $ $PYTHON debugstacktrace.py
354 $ $PYTHON debugstacktrace.py
346 stacktrace at:
355 stacktrace at:
347 debugstacktrace.py:12 in * (glob)
356 debugstacktrace.py:12 in * (glob)
348 debugstacktrace.py:5 in f
357 debugstacktrace.py:5 in f
349 hello from g at:
358 hello from g at:
350 debugstacktrace.py:12 in * (glob)
359 debugstacktrace.py:12 in * (glob)
351 debugstacktrace.py:6 in f
360 debugstacktrace.py:6 in f
352 hi ...
361 hi ...
353 from h hidden in g at:
362 from h hidden in g at:
354 debugstacktrace.py:6 in f
363 debugstacktrace.py:6 in f
355 debugstacktrace.py:9 in g
364 debugstacktrace.py:9 in g
356
365
357 Test debugcapabilities command:
366 Test debugcapabilities command:
358
367
359 $ hg debugcapabilities ./debugrevlog/
368 $ hg debugcapabilities ./debugrevlog/
360 Main capabilities:
369 Main capabilities:
361 branchmap
370 branchmap
362 $USUAL_BUNDLE2_CAPS$
371 $USUAL_BUNDLE2_CAPS$
363 getbundle
372 getbundle
364 known
373 known
365 lookup
374 lookup
366 pushkey
375 pushkey
367 unbundle
376 unbundle
368 Bundle2 capabilities:
377 Bundle2 capabilities:
369 HG20
378 HG20
370 bookmarks
379 bookmarks
371 changegroup
380 changegroup
372 01
381 01
373 02
382 02
374 digests
383 digests
375 md5
384 md5
376 sha1
385 sha1
377 sha512
386 sha512
378 error
387 error
379 abort
388 abort
380 unsupportedcontent
389 unsupportedcontent
381 pushraced
390 pushraced
382 pushkey
391 pushkey
383 hgtagsfnodes
392 hgtagsfnodes
384 listkeys
393 listkeys
385 phases
394 phases
386 heads
395 heads
387 pushkey
396 pushkey
388 remote-changegroup
397 remote-changegroup
389 http
398 http
390 https
399 https
391 rev-branch-cache
400 rev-branch-cache
392 stream
401 stream
393 v2
402 v2
394
403
395 Test debugpeer
404 Test debugpeer
396
405
397 $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" debugpeer ssh://user@dummy/debugrevlog
406 $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" debugpeer ssh://user@dummy/debugrevlog
398 url: ssh://user@dummy/debugrevlog
407 url: ssh://user@dummy/debugrevlog
399 local: no
408 local: no
400 pushable: yes
409 pushable: yes
401
410
402 $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" --debug debugpeer ssh://user@dummy/debugrevlog
411 $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" --debug debugpeer ssh://user@dummy/debugrevlog
403 running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob) (no-windows !)
412 running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob) (no-windows !)
404 running "*" "*\tests/dummyssh" "user@dummy" "hg -R debugrevlog serve --stdio" (glob) (windows !)
413 running "*" "*\tests/dummyssh" "user@dummy" "hg -R debugrevlog serve --stdio" (glob) (windows !)
405 devel-peer-request: hello
414 devel-peer-request: hello
406 sending hello command
415 sending hello command
407 devel-peer-request: between
416 devel-peer-request: between
408 devel-peer-request: pairs: 81 bytes
417 devel-peer-request: pairs: 81 bytes
409 sending between command
418 sending between command
410 remote: 413
419 remote: 413
411 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
420 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
412 remote: 1
421 remote: 1
413 devel-peer-request: protocaps
422 devel-peer-request: protocaps
414 devel-peer-request: caps: * bytes (glob)
423 devel-peer-request: caps: * bytes (glob)
415 sending protocaps command
424 sending protocaps command
416 url: ssh://user@dummy/debugrevlog
425 url: ssh://user@dummy/debugrevlog
417 local: no
426 local: no
418 pushable: yes
427 pushable: yes
@@ -1,561 +1,563 b''
1 #require killdaemons serve
1 #require killdaemons serve
2
2
3 $ hg init test
3 $ hg init test
4 $ cd test
4 $ cd test
5 $ echo foo>foo
5 $ echo foo>foo
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
7 $ echo foo>foo.d/foo
7 $ echo foo>foo.d/foo
8 $ echo bar>foo.d/bAr.hg.d/BaR
8 $ echo bar>foo.d/bAr.hg.d/BaR
9 $ echo bar>foo.d/baR.d.hg/bAR
9 $ echo bar>foo.d/baR.d.hg/bAR
10 $ hg commit -A -m 1
10 $ hg commit -A -m 1
11 adding foo
11 adding foo
12 adding foo.d/bAr.hg.d/BaR
12 adding foo.d/bAr.hg.d/BaR
13 adding foo.d/baR.d.hg/bAR
13 adding foo.d/baR.d.hg/bAR
14 adding foo.d/foo
14 adding foo.d/foo
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
17
17
18 Test server address cannot be reused
18 Test server address cannot be reused
19
19
20 $ hg serve -p $HGPORT1 2>&1
20 $ hg serve -p $HGPORT1 2>&1
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
22 [255]
22 [255]
23
23
24 $ cd ..
24 $ cd ..
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
26
26
27 clone via stream
27 clone via stream
28
28
29 #if no-reposimplestore
29 #if no-reposimplestore
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
31 streaming all changes
31 streaming all changes
32 6 files to transfer, 606 bytes of data
32 6 files to transfer, 606 bytes of data
33 transferred * bytes in * seconds (*/sec) (glob)
33 transferred * bytes in * seconds (*/sec) (glob)
34 searching for changes
34 searching for changes
35 no changes found
35 no changes found
36 updating to branch default
36 updating to branch default
37 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 $ hg verify -R copy
38 $ hg verify -R copy
39 checking changesets
39 checking changesets
40 checking manifests
40 checking manifests
41 crosschecking files in changesets and manifests
41 crosschecking files in changesets and manifests
42 checking files
42 checking files
43 4 files, 1 changesets, 4 total revisions
43 4 files, 1 changesets, 4 total revisions
44 #endif
44 #endif
45
45
46 try to clone via stream, should use pull instead
46 try to clone via stream, should use pull instead
47
47
48 $ hg clone --stream http://localhost:$HGPORT1/ copy2
48 $ hg clone --stream http://localhost:$HGPORT1/ copy2
49 warning: stream clone requested but server has them disabled
49 warning: stream clone requested but server has them disabled
50 requesting all changes
50 requesting all changes
51 adding changesets
51 adding changesets
52 adding manifests
52 adding manifests
53 adding file changes
53 adding file changes
54 added 1 changesets with 4 changes to 4 files
54 added 1 changesets with 4 changes to 4 files
55 new changesets 8b6053c928fe
55 new changesets 8b6053c928fe
56 updating to branch default
56 updating to branch default
57 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
58
58
59 try to clone via stream but missing requirements, so should use pull instead
59 try to clone via stream but missing requirements, so should use pull instead
60
60
61 $ cat > $TESTTMP/removesupportedformat.py << EOF
61 $ cat > $TESTTMP/removesupportedformat.py << EOF
62 > from mercurial import localrepo
62 > from mercurial import localrepo
63 > def extsetup(ui):
63 > def extsetup(ui):
64 > localrepo.localrepository.supportedformats.remove('generaldelta')
64 > localrepo.localrepository.supportedformats.remove('generaldelta')
65 > EOF
65 > EOF
66
66
67 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
67 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
68 warning: stream clone requested but client is missing requirements: generaldelta
68 warning: stream clone requested but client is missing requirements: generaldelta
69 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
69 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
70 requesting all changes
70 requesting all changes
71 adding changesets
71 adding changesets
72 adding manifests
72 adding manifests
73 adding file changes
73 adding file changes
74 added 1 changesets with 4 changes to 4 files
74 added 1 changesets with 4 changes to 4 files
75 new changesets 8b6053c928fe
75 new changesets 8b6053c928fe
76 updating to branch default
76 updating to branch default
77 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
78
78
79 clone via pull
79 clone via pull
80
80
81 $ hg clone http://localhost:$HGPORT1/ copy-pull
81 $ hg clone http://localhost:$HGPORT1/ copy-pull
82 requesting all changes
82 requesting all changes
83 adding changesets
83 adding changesets
84 adding manifests
84 adding manifests
85 adding file changes
85 adding file changes
86 added 1 changesets with 4 changes to 4 files
86 added 1 changesets with 4 changes to 4 files
87 new changesets 8b6053c928fe
87 new changesets 8b6053c928fe
88 updating to branch default
88 updating to branch default
89 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 $ hg verify -R copy-pull
90 $ hg verify -R copy-pull
91 checking changesets
91 checking changesets
92 checking manifests
92 checking manifests
93 crosschecking files in changesets and manifests
93 crosschecking files in changesets and manifests
94 checking files
94 checking files
95 4 files, 1 changesets, 4 total revisions
95 4 files, 1 changesets, 4 total revisions
96 $ cd test
96 $ cd test
97 $ echo bar > bar
97 $ echo bar > bar
98 $ hg commit -A -d '1 0' -m 2
98 $ hg commit -A -d '1 0' -m 2
99 adding bar
99 adding bar
100 $ cd ..
100 $ cd ..
101
101
102 clone over http with --update
102 clone over http with --update
103
103
104 $ hg clone http://localhost:$HGPORT1/ updated --update 0
104 $ hg clone http://localhost:$HGPORT1/ updated --update 0
105 requesting all changes
105 requesting all changes
106 adding changesets
106 adding changesets
107 adding manifests
107 adding manifests
108 adding file changes
108 adding file changes
109 added 2 changesets with 5 changes to 5 files
109 added 2 changesets with 5 changes to 5 files
110 new changesets 8b6053c928fe:5fed3813f7f5
110 new changesets 8b6053c928fe:5fed3813f7f5
111 updating to branch default
111 updating to branch default
112 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 $ hg log -r . -R updated
113 $ hg log -r . -R updated
114 changeset: 0:8b6053c928fe
114 changeset: 0:8b6053c928fe
115 user: test
115 user: test
116 date: Thu Jan 01 00:00:00 1970 +0000
116 date: Thu Jan 01 00:00:00 1970 +0000
117 summary: 1
117 summary: 1
118
118
119 $ rm -rf updated
119 $ rm -rf updated
120
120
121 incoming via HTTP
121 incoming via HTTP
122
122
123 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
123 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
124 adding changesets
124 adding changesets
125 adding manifests
125 adding manifests
126 adding file changes
126 adding file changes
127 added 1 changesets with 4 changes to 4 files
127 added 1 changesets with 4 changes to 4 files
128 new changesets 8b6053c928fe
128 new changesets 8b6053c928fe
129 updating to branch default
129 updating to branch default
130 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
130 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 $ cd partial
131 $ cd partial
132 $ touch LOCAL
132 $ touch LOCAL
133 $ hg ci -qAm LOCAL
133 $ hg ci -qAm LOCAL
134 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
134 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
135 comparing with http://localhost:$HGPORT1/
135 comparing with http://localhost:$HGPORT1/
136 searching for changes
136 searching for changes
137 2
137 2
138 $ cd ..
138 $ cd ..
139
139
140 pull
140 pull
141
141
142 $ cd copy-pull
142 $ cd copy-pull
143 $ cat >> .hg/hgrc <<EOF
143 $ cat >> .hg/hgrc <<EOF
144 > [hooks]
144 > [hooks]
145 > changegroup = sh -c "printenv.py changegroup"
145 > changegroup = sh -c "printenv.py changegroup"
146 > EOF
146 > EOF
147 $ hg pull
147 $ hg pull
148 pulling from http://localhost:$HGPORT1/
148 pulling from http://localhost:$HGPORT1/
149 searching for changes
149 searching for changes
150 adding changesets
150 adding changesets
151 adding manifests
151 adding manifests
152 adding file changes
152 adding file changes
153 added 1 changesets with 1 changes to 1 files
153 added 1 changesets with 1 changes to 1 files
154 new changesets 5fed3813f7f5
154 new changesets 5fed3813f7f5
155 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
155 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
156 (run 'hg update' to get a working copy)
156 (run 'hg update' to get a working copy)
157 $ cd ..
157 $ cd ..
158
158
159 clone from invalid URL
159 clone from invalid URL
160
160
161 $ hg clone http://localhost:$HGPORT/bad
161 $ hg clone http://localhost:$HGPORT/bad
162 abort: HTTP Error 404: Not Found
162 abort: HTTP Error 404: Not Found
163 [255]
163 [255]
164
164
165 test http authentication
165 test http authentication
166 + use the same server to test server side streaming preference
166 + use the same server to test server side streaming preference
167
167
168 $ cd test
168 $ cd test
169 $ cat << EOT > userpass.py
169 $ cat << EOT > userpass.py
170 > import base64
170 > import base64
171 > from mercurial.hgweb import common
171 > from mercurial.hgweb import common
172 > def perform_authentication(hgweb, req, op):
172 > def perform_authentication(hgweb, req, op):
173 > auth = req.headers.get('Authorization')
173 > auth = req.headers.get('Authorization')
174 > if not auth:
174 > if not auth:
175 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
175 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
176 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
176 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
177 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
177 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
178 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
178 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
179 > def extsetup():
179 > def extsetup():
180 > common.permhooks.insert(0, perform_authentication)
180 > common.permhooks.insert(0, perform_authentication)
181 > EOT
181 > EOT
182 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
182 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
183 > --config server.preferuncompressed=True \
183 > --config server.preferuncompressed=True \
184 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
184 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
185 $ cat pid >> $DAEMON_PIDS
185 $ cat pid >> $DAEMON_PIDS
186
186
187 $ cat << EOF > get_pass.py
187 $ cat << EOF > get_pass.py
188 > import getpass
188 > import getpass
189 > def newgetpass(arg):
189 > def newgetpass(arg):
190 > return "pass"
190 > return "pass"
191 > getpass.getpass = newgetpass
191 > getpass.getpass = newgetpass
192 > EOF
192 > EOF
193
193
194 $ hg id http://localhost:$HGPORT2/
194 $ hg id http://localhost:$HGPORT2/
195 abort: http authorization required for http://localhost:$HGPORT2/
195 abort: http authorization required for http://localhost:$HGPORT2/
196 [255]
196 [255]
197 $ hg id http://localhost:$HGPORT2/
197 $ hg id http://localhost:$HGPORT2/
198 abort: http authorization required for http://localhost:$HGPORT2/
198 abort: http authorization required for http://localhost:$HGPORT2/
199 [255]
199 [255]
200 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
200 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
201 http authorization required for http://localhost:$HGPORT2/
201 http authorization required for http://localhost:$HGPORT2/
202 realm: mercurial
202 realm: mercurial
203 user: user
203 user: user
204 password: 5fed3813f7f5
204 password: 5fed3813f7f5
205 $ hg id http://user:pass@localhost:$HGPORT2/
205 $ hg id http://user:pass@localhost:$HGPORT2/
206 5fed3813f7f5
206 5fed3813f7f5
207 $ echo '[auth]' >> .hg/hgrc
207 $ echo '[auth]' >> .hg/hgrc
208 $ echo 'l.schemes=http' >> .hg/hgrc
208 $ echo 'l.schemes=http' >> .hg/hgrc
209 $ echo 'l.prefix=lo' >> .hg/hgrc
209 $ echo 'l.prefix=lo' >> .hg/hgrc
210 $ echo 'l.username=user' >> .hg/hgrc
210 $ echo 'l.username=user' >> .hg/hgrc
211 $ echo 'l.password=pass' >> .hg/hgrc
211 $ echo 'l.password=pass' >> .hg/hgrc
212 $ hg id http://localhost:$HGPORT2/
212 $ hg id http://localhost:$HGPORT2/
213 5fed3813f7f5
213 5fed3813f7f5
214 $ hg id http://localhost:$HGPORT2/
214 $ hg id http://localhost:$HGPORT2/
215 5fed3813f7f5
215 5fed3813f7f5
216 $ hg id http://user@localhost:$HGPORT2/
216 $ hg id http://user@localhost:$HGPORT2/
217 5fed3813f7f5
217 5fed3813f7f5
218
218
219 #if no-reposimplestore
219 #if no-reposimplestore
220 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
220 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
221 streaming all changes
221 streaming all changes
222 7 files to transfer, 916 bytes of data
222 7 files to transfer, 916 bytes of data
223 transferred * bytes in * seconds (*/sec) (glob)
223 transferred * bytes in * seconds (*/sec) (glob)
224 searching for changes
224 searching for changes
225 no changes found
225 no changes found
226 updating to branch default
226 updating to branch default
227 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
227 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 #endif
228 #endif
229
229
230 --pull should override server's preferuncompressed
230 --pull should override server's preferuncompressed
231 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
231 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
232 requesting all changes
232 requesting all changes
233 adding changesets
233 adding changesets
234 adding manifests
234 adding manifests
235 adding file changes
235 adding file changes
236 added 2 changesets with 5 changes to 5 files
236 added 2 changesets with 5 changes to 5 files
237 new changesets 8b6053c928fe:5fed3813f7f5
237 new changesets 8b6053c928fe:5fed3813f7f5
238 updating to branch default
238 updating to branch default
239 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
239 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
240
240
241 $ hg id http://user2@localhost:$HGPORT2/
241 $ hg id http://user2@localhost:$HGPORT2/
242 abort: http authorization required for http://localhost:$HGPORT2/
242 abort: http authorization required for http://localhost:$HGPORT2/
243 [255]
243 [255]
244 $ hg id http://user:pass2@localhost:$HGPORT2/
244 $ hg id http://user:pass2@localhost:$HGPORT2/
245 abort: HTTP Error 403: no
245 abort: HTTP Error 403: no
246 [255]
246 [255]
247
247
248 $ hg -R dest-pull tag -r tip top
248 $ hg -R dest-pull tag -r tip top
249 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
249 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
250 pushing to http://user:***@localhost:$HGPORT2/
250 pushing to http://user:***@localhost:$HGPORT2/
251 searching for changes
251 searching for changes
252 remote: adding changesets
252 remote: adding changesets
253 remote: adding manifests
253 remote: adding manifests
254 remote: adding file changes
254 remote: adding file changes
255 remote: added 1 changesets with 1 changes to 1 files
255 remote: added 1 changesets with 1 changes to 1 files
256 $ hg rollback -q
256 $ hg rollback -q
257 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
257 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
258 pushing to http://user:***@localhost:$HGPORT2/
258 pushing to http://user:***@localhost:$HGPORT2/
259 using http://localhost:$HGPORT2/
259 using http://localhost:$HGPORT2/
260 http auth: user user, password ****
260 http auth: user user, password ****
261 sending capabilities command
261 sending capabilities command
262 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
262 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
263 http auth: user user, password ****
263 http auth: user user, password ****
264 devel-peer-request: finished in *.???? seconds (200) (glob)
264 devel-peer-request: finished in *.???? seconds (200) (glob)
265 query 1; heads
265 query 1; heads
266 devel-peer-request: batched-content
266 devel-peer-request: batched-content
267 devel-peer-request: - heads (0 arguments)
267 devel-peer-request: - heads (0 arguments)
268 devel-peer-request: - known (1 arguments)
268 devel-peer-request: - known (1 arguments)
269 sending batch command
269 sending batch command
270 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
270 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
271 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
271 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
272 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
272 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
273 devel-peer-request: 68 bytes of commands arguments in headers
273 devel-peer-request: 68 bytes of commands arguments in headers
274 devel-peer-request: finished in *.???? seconds (200) (glob)
274 devel-peer-request: finished in *.???? seconds (200) (glob)
275 searching for changes
275 searching for changes
276 all remote heads known locally
276 all remote heads known locally
277 preparing listkeys for "phases"
277 preparing listkeys for "phases"
278 sending listkeys command
278 sending listkeys command
279 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
279 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
280 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
280 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
281 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
281 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
282 devel-peer-request: 16 bytes of commands arguments in headers
282 devel-peer-request: 16 bytes of commands arguments in headers
283 devel-peer-request: finished in *.???? seconds (200) (glob)
283 devel-peer-request: finished in *.???? seconds (200) (glob)
284 received listkey for "phases": 58 bytes
284 received listkey for "phases": 58 bytes
285 checking for updated bookmarks
285 checking for updated bookmarks
286 preparing listkeys for "bookmarks"
286 preparing listkeys for "bookmarks"
287 sending listkeys command
287 sending listkeys command
288 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
288 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
289 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
289 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
290 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
290 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
291 devel-peer-request: 19 bytes of commands arguments in headers
291 devel-peer-request: 19 bytes of commands arguments in headers
292 devel-peer-request: finished in *.???? seconds (200) (glob)
292 devel-peer-request: finished in *.???? seconds (200) (glob)
293 received listkey for "bookmarks": 0 bytes
293 received listkey for "bookmarks": 0 bytes
294 sending branchmap command
294 sending branchmap command
295 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
295 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
296 devel-peer-request: Vary X-HgProto-1
296 devel-peer-request: Vary X-HgProto-1
297 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
297 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
298 devel-peer-request: finished in *.???? seconds (200) (glob)
298 devel-peer-request: finished in *.???? seconds (200) (glob)
299 sending branchmap command
299 sending branchmap command
300 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
300 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
301 devel-peer-request: Vary X-HgProto-1
301 devel-peer-request: Vary X-HgProto-1
302 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
302 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
303 devel-peer-request: finished in *.???? seconds (200) (glob)
303 devel-peer-request: finished in *.???? seconds (200) (glob)
304 preparing listkeys for "bookmarks"
304 preparing listkeys for "bookmarks"
305 sending listkeys command
305 sending listkeys command
306 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
306 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
307 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
307 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
308 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
308 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
309 devel-peer-request: 19 bytes of commands arguments in headers
309 devel-peer-request: 19 bytes of commands arguments in headers
310 devel-peer-request: finished in *.???? seconds (200) (glob)
310 devel-peer-request: finished in *.???? seconds (200) (glob)
311 received listkey for "bookmarks": 0 bytes
311 received listkey for "bookmarks": 0 bytes
312 1 changesets found
312 1 changesets found
313 list of changesets:
313 list of changesets:
314 7f4e523d01f2cc3765ac8934da3d14db775ff872
314 7f4e523d01f2cc3765ac8934da3d14db775ff872
315 bundle2-output-bundle: "HG20", 5 parts total
315 bundle2-output-bundle: "HG20", 5 parts total
316 bundle2-output-part: "replycaps" 205 bytes payload
316 bundle2-output-part: "replycaps" 205 bytes payload
317 bundle2-output-part: "check:phases" 24 bytes payload
317 bundle2-output-part: "check:phases" 24 bytes payload
318 bundle2-output-part: "check:heads" streamed payload
318 bundle2-output-part: "check:heads" streamed payload
319 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
319 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
320 bundle2-output-part: "phase-heads" 24 bytes payload
320 bundle2-output-part: "phase-heads" 24 bytes payload
321 sending unbundle command
321 sending unbundle command
322 sending 1013 bytes
322 sending 1013 bytes
323 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
323 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
324 devel-peer-request: Content-length 1013
324 devel-peer-request: Content-length 1013
325 devel-peer-request: Content-type application/mercurial-0.1
325 devel-peer-request: Content-type application/mercurial-0.1
326 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
326 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
327 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
327 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
328 devel-peer-request: 16 bytes of commands arguments in headers
328 devel-peer-request: 16 bytes of commands arguments in headers
329 devel-peer-request: 1013 bytes of data
329 devel-peer-request: 1013 bytes of data
330 devel-peer-request: finished in *.???? seconds (200) (glob)
330 devel-peer-request: finished in *.???? seconds (200) (glob)
331 bundle2-input-bundle: no-transaction
331 bundle2-input-bundle: no-transaction
332 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
332 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
333 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
333 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
334 bundle2-input-part: total payload size 100
334 bundle2-input-part: total payload size 100
335 remote: adding changesets
335 remote: adding changesets
336 remote: adding manifests
336 remote: adding manifests
337 remote: adding file changes
337 remote: adding file changes
338 remote: added 1 changesets with 1 changes to 1 files
338 remote: added 1 changesets with 1 changes to 1 files
339 bundle2-input-part: "output" (advisory) supported
339 bundle2-input-part: "output" (advisory) supported
340 bundle2-input-bundle: 2 parts total
340 bundle2-input-bundle: 2 parts total
341 preparing listkeys for "phases"
341 preparing listkeys for "phases"
342 sending listkeys command
342 sending listkeys command
343 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
343 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
344 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
344 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
345 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
345 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$
346 devel-peer-request: 16 bytes of commands arguments in headers
346 devel-peer-request: 16 bytes of commands arguments in headers
347 devel-peer-request: finished in *.???? seconds (200) (glob)
347 devel-peer-request: finished in *.???? seconds (200) (glob)
348 received listkey for "phases": 15 bytes
348 received listkey for "phases": 15 bytes
349 $ hg rollback -q
349 $ hg rollback -q
350
350
351 $ sed 's/.*] "/"/' < ../access.log
351 $ sed 's/.*] "/"/' < ../access.log
352 "GET /?cmd=capabilities HTTP/1.1" 401 -
352 "GET /?cmd=capabilities HTTP/1.1" 401 -
353 "GET /?cmd=capabilities HTTP/1.1" 401 -
353 "GET /?cmd=capabilities HTTP/1.1" 401 -
354 "GET /?cmd=capabilities HTTP/1.1" 401 -
354 "GET /?cmd=capabilities HTTP/1.1" 401 -
355 "GET /?cmd=capabilities HTTP/1.1" 200 -
355 "GET /?cmd=capabilities HTTP/1.1" 200 -
356 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
356 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
357 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
357 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
358 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
358 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
359 "GET /?cmd=capabilities HTTP/1.1" 401 -
359 "GET /?cmd=capabilities HTTP/1.1" 401 -
360 "GET /?cmd=capabilities HTTP/1.1" 200 -
360 "GET /?cmd=capabilities HTTP/1.1" 200 -
361 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
361 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
362 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
362 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
363 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
363 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
364 "GET /?cmd=capabilities HTTP/1.1" 401 -
364 "GET /?cmd=capabilities HTTP/1.1" 401 -
365 "GET /?cmd=capabilities HTTP/1.1" 200 -
365 "GET /?cmd=capabilities HTTP/1.1" 200 -
366 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
366 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
367 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
367 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
368 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
368 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
369 "GET /?cmd=capabilities HTTP/1.1" 401 -
369 "GET /?cmd=capabilities HTTP/1.1" 401 -
370 "GET /?cmd=capabilities HTTP/1.1" 200 -
370 "GET /?cmd=capabilities HTTP/1.1" 200 -
371 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
371 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
372 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
372 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
373 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
373 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
374 "GET /?cmd=capabilities HTTP/1.1" 401 -
374 "GET /?cmd=capabilities HTTP/1.1" 401 -
375 "GET /?cmd=capabilities HTTP/1.1" 200 -
375 "GET /?cmd=capabilities HTTP/1.1" 200 -
376 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
376 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
377 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
377 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
378 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
378 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
379 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
379 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
380 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
380 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
381 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
381 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
382 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
382 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
383 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
383 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
384 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
384 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (no-reposimplestore !)
385 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
385 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
386 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
386 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
387 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
387 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
388 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
388 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
389 "GET /?cmd=capabilities HTTP/1.1" 401 -
389 "GET /?cmd=capabilities HTTP/1.1" 401 -
390 "GET /?cmd=capabilities HTTP/1.1" 401 -
390 "GET /?cmd=capabilities HTTP/1.1" 401 -
391 "GET /?cmd=capabilities HTTP/1.1" 403 -
391 "GET /?cmd=capabilities HTTP/1.1" 403 -
392 "GET /?cmd=capabilities HTTP/1.1" 401 -
392 "GET /?cmd=capabilities HTTP/1.1" 401 -
393 "GET /?cmd=capabilities HTTP/1.1" 200 -
393 "GET /?cmd=capabilities HTTP/1.1" 200 -
394 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
394 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
395 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
395 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
396 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
396 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
397 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
397 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
398 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
398 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
399 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
399 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
400 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
400 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
401 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
401 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
402 "GET /?cmd=capabilities HTTP/1.1" 401 -
402 "GET /?cmd=capabilities HTTP/1.1" 401 -
403 "GET /?cmd=capabilities HTTP/1.1" 200 -
403 "GET /?cmd=capabilities HTTP/1.1" 200 -
404 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
404 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
405 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
405 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
406 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
406 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
407 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
407 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
408 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
408 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
409 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
409 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
410 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
410 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
411 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
411 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$
412
412
413 $ cd ..
413 $ cd ..
414
414
415 clone of serve with repo in root and unserved subrepo (issue2970)
415 clone of serve with repo in root and unserved subrepo (issue2970)
416
416
417 $ hg --cwd test init sub
417 $ hg --cwd test init sub
418 $ echo empty > test/sub/empty
418 $ echo empty > test/sub/empty
419 $ hg --cwd test/sub add empty
419 $ hg --cwd test/sub add empty
420 $ hg --cwd test/sub commit -qm 'add empty'
420 $ hg --cwd test/sub commit -qm 'add empty'
421 $ hg --cwd test/sub tag -r 0 something
421 $ hg --cwd test/sub tag -r 0 something
422 $ echo sub = sub > test/.hgsub
422 $ echo sub = sub > test/.hgsub
423 $ hg --cwd test add .hgsub
423 $ hg --cwd test add .hgsub
424 $ hg --cwd test commit -qm 'add subrepo'
424 $ hg --cwd test commit -qm 'add subrepo'
425 $ hg clone http://localhost:$HGPORT noslash-clone
425 $ hg clone http://localhost:$HGPORT noslash-clone
426 requesting all changes
426 requesting all changes
427 adding changesets
427 adding changesets
428 adding manifests
428 adding manifests
429 adding file changes
429 adding file changes
430 added 3 changesets with 7 changes to 7 files
430 added 3 changesets with 7 changes to 7 files
431 new changesets 8b6053c928fe:56f9bc90cce6
431 new changesets 8b6053c928fe:56f9bc90cce6
432 updating to branch default
432 updating to branch default
433 abort: HTTP Error 404: Not Found
433 abort: HTTP Error 404: Not Found
434 [255]
434 [255]
435 $ hg clone http://localhost:$HGPORT/ slash-clone
435 $ hg clone http://localhost:$HGPORT/ slash-clone
436 requesting all changes
436 requesting all changes
437 adding changesets
437 adding changesets
438 adding manifests
438 adding manifests
439 adding file changes
439 adding file changes
440 added 3 changesets with 7 changes to 7 files
440 added 3 changesets with 7 changes to 7 files
441 new changesets 8b6053c928fe:56f9bc90cce6
441 new changesets 8b6053c928fe:56f9bc90cce6
442 updating to branch default
442 updating to branch default
443 abort: HTTP Error 404: Not Found
443 abort: HTTP Error 404: Not Found
444 [255]
444 [255]
445
445
446 check error log
446 check error log
447
447
448 $ cat error.log
448 $ cat error.log
449
449
450 check abort error reporting while pulling/cloning
450 check abort error reporting while pulling/cloning
451
451
452 $ $RUNTESTDIR/killdaemons.py
452 $ $RUNTESTDIR/killdaemons.py
453 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
453 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
454 $ cat hg3.pid >> $DAEMON_PIDS
454 $ cat hg3.pid >> $DAEMON_PIDS
455 $ hg clone http://localhost:$HGPORT/ abort-clone
455 $ hg clone http://localhost:$HGPORT/ abort-clone
456 requesting all changes
456 requesting all changes
457 remote: abort: this is an exercise
457 remote: abort: this is an exercise
458 abort: pull failed on remote
458 abort: pull failed on remote
459 [255]
459 [255]
460 $ cat error.log
460 $ cat error.log
461
461
462 disable pull-based clones
462 disable pull-based clones
463
463
464 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
464 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
465 $ cat hg4.pid >> $DAEMON_PIDS
465 $ cat hg4.pid >> $DAEMON_PIDS
466 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
466 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
467 requesting all changes
467 requesting all changes
468 remote: abort: server has pull-based clones disabled
468 remote: abort: server has pull-based clones disabled
469 abort: pull failed on remote
469 abort: pull failed on remote
470 (remove --pull if specified or upgrade Mercurial)
470 (remove --pull if specified or upgrade Mercurial)
471 [255]
471 [255]
472
472
473 #if no-reposimplestore
473 ... but keep stream clones working
474 ... but keep stream clones working
474
475
475 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
476 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
476 streaming all changes
477 streaming all changes
477 * files to transfer, * of data (glob)
478 * files to transfer, * of data (glob)
478 transferred * in * seconds (*/sec) (glob)
479 transferred * in * seconds (*/sec) (glob)
479 searching for changes
480 searching for changes
480 no changes found
481 no changes found
481 $ cat error.log
482 $ cat error.log
483 #endif
482
484
483 ... and also keep partial clones and pulls working
485 ... and also keep partial clones and pulls working
484 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
486 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
485 adding changesets
487 adding changesets
486 adding manifests
488 adding manifests
487 adding file changes
489 adding file changes
488 added 1 changesets with 4 changes to 4 files
490 added 1 changesets with 4 changes to 4 files
489 new changesets 8b6053c928fe
491 new changesets 8b6053c928fe
490 updating to branch default
492 updating to branch default
491 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
493 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
492 $ hg pull -R test-partial-clone
494 $ hg pull -R test-partial-clone
493 pulling from http://localhost:$HGPORT1/
495 pulling from http://localhost:$HGPORT1/
494 searching for changes
496 searching for changes
495 adding changesets
497 adding changesets
496 adding manifests
498 adding manifests
497 adding file changes
499 adding file changes
498 added 2 changesets with 3 changes to 3 files
500 added 2 changesets with 3 changes to 3 files
499 new changesets 5fed3813f7f5:56f9bc90cce6
501 new changesets 5fed3813f7f5:56f9bc90cce6
500 (run 'hg update' to get a working copy)
502 (run 'hg update' to get a working copy)
501
503
502 corrupt cookies file should yield a warning
504 corrupt cookies file should yield a warning
503
505
504 $ cat > $TESTTMP/cookies.txt << EOF
506 $ cat > $TESTTMP/cookies.txt << EOF
505 > bad format
507 > bad format
506 > EOF
508 > EOF
507
509
508 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
510 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
509 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
511 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
510 56f9bc90cce6
512 56f9bc90cce6
511
513
512 $ killdaemons.py
514 $ killdaemons.py
513
515
514 Create dummy authentication handler that looks for cookies. It doesn't do anything
516 Create dummy authentication handler that looks for cookies. It doesn't do anything
515 useful. It just raises an HTTP 500 with details about the Cookie request header.
517 useful. It just raises an HTTP 500 with details about the Cookie request header.
516 We raise HTTP 500 because its message is printed in the abort message.
518 We raise HTTP 500 because its message is printed in the abort message.
517
519
518 $ cat > cookieauth.py << EOF
520 $ cat > cookieauth.py << EOF
519 > from mercurial import util
521 > from mercurial import util
520 > from mercurial.hgweb import common
522 > from mercurial.hgweb import common
521 > def perform_authentication(hgweb, req, op):
523 > def perform_authentication(hgweb, req, op):
522 > cookie = req.headers.get('Cookie')
524 > cookie = req.headers.get('Cookie')
523 > if not cookie:
525 > if not cookie:
524 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie')
526 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie')
525 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie)
527 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie)
526 > def extsetup():
528 > def extsetup():
527 > common.permhooks.insert(0, perform_authentication)
529 > common.permhooks.insert(0, perform_authentication)
528 > EOF
530 > EOF
529
531
530 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
532 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
531 $ cat pid > $DAEMON_PIDS
533 $ cat pid > $DAEMON_PIDS
532
534
533 Request without cookie sent should fail due to lack of cookie
535 Request without cookie sent should fail due to lack of cookie
534
536
535 $ hg id http://localhost:$HGPORT
537 $ hg id http://localhost:$HGPORT
536 abort: HTTP Error 500: no-cookie
538 abort: HTTP Error 500: no-cookie
537 [255]
539 [255]
538
540
539 Populate a cookies file
541 Populate a cookies file
540
542
541 $ cat > cookies.txt << EOF
543 $ cat > cookies.txt << EOF
542 > # HTTP Cookie File
544 > # HTTP Cookie File
543 > # Expiration is 2030-01-01 at midnight
545 > # Expiration is 2030-01-01 at midnight
544 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
546 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
545 > EOF
547 > EOF
546
548
547 Should not send a cookie for another domain
549 Should not send a cookie for another domain
548
550
549 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
551 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
550 abort: HTTP Error 500: no-cookie
552 abort: HTTP Error 500: no-cookie
551 [255]
553 [255]
552
554
553 Add a cookie entry for our test server and verify it is sent
555 Add a cookie entry for our test server and verify it is sent
554
556
555 $ cat >> cookies.txt << EOF
557 $ cat >> cookies.txt << EOF
556 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
558 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
557 > EOF
559 > EOF
558
560
559 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
561 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
560 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
562 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
561 [255]
563 [255]
@@ -1,160 +1,172 b''
1 #require unix-permissions
1 #require unix-permissions
2
2
3 test that new files created in .hg inherit the permissions from .hg/store
3 test that new files created in .hg inherit the permissions from .hg/store
4
4
5 $ mkdir dir
5 $ mkdir dir
6
6
7 just in case somebody has a strange $TMPDIR
7 just in case somebody has a strange $TMPDIR
8
8
9 $ chmod g-s dir
9 $ chmod g-s dir
10 $ cd dir
10 $ cd dir
11
11
12 $ cat >printmodes.py <<EOF
12 $ cat >printmodes.py <<EOF
13 > from __future__ import absolute_import, print_function
13 > from __future__ import absolute_import, print_function
14 > import os
14 > import os
15 > import sys
15 > import sys
16 >
16 >
17 > allnames = []
17 > allnames = []
18 > isdir = {}
18 > isdir = {}
19 > for root, dirs, files in os.walk(sys.argv[1]):
19 > for root, dirs, files in os.walk(sys.argv[1]):
20 > for d in dirs:
20 > for d in dirs:
21 > name = os.path.join(root, d)
21 > name = os.path.join(root, d)
22 > isdir[name] = 1
22 > isdir[name] = 1
23 > allnames.append(name)
23 > allnames.append(name)
24 > for f in files:
24 > for f in files:
25 > name = os.path.join(root, f)
25 > name = os.path.join(root, f)
26 > allnames.append(name)
26 > allnames.append(name)
27 > allnames.sort()
27 > allnames.sort()
28 > for name in allnames:
28 > for name in allnames:
29 > suffix = name in isdir and '/' or ''
29 > suffix = name in isdir and '/' or ''
30 > print('%05o %s%s' % (os.lstat(name).st_mode & 0o7777, name, suffix))
30 > print('%05o %s%s' % (os.lstat(name).st_mode & 0o7777, name, suffix))
31 > EOF
31 > EOF
32
32
33 $ cat >mode.py <<EOF
33 $ cat >mode.py <<EOF
34 > from __future__ import absolute_import, print_function
34 > from __future__ import absolute_import, print_function
35 > import os
35 > import os
36 > import sys
36 > import sys
37 > print('%05o' % os.lstat(sys.argv[1]).st_mode)
37 > print('%05o' % os.lstat(sys.argv[1]).st_mode)
38 > EOF
38 > EOF
39
39
40 $ umask 077
40 $ umask 077
41
41
42 $ hg init repo
42 $ hg init repo
43 $ cd repo
43 $ cd repo
44
44
45 $ chmod 0770 .hg/store
45 $ chmod 0770 .hg/store
46
46
47 before commit
47 before commit
48 store can be written by the group, other files cannot
48 store can be written by the group, other files cannot
49 store is setgid
49 store is setgid
50
50
51 $ $PYTHON ../printmodes.py .
51 $ $PYTHON ../printmodes.py .
52 00700 ./.hg/
52 00700 ./.hg/
53 00600 ./.hg/00changelog.i
53 00600 ./.hg/00changelog.i
54 00600 ./.hg/requires
54 00600 ./.hg/requires
55 00770 ./.hg/store/
55 00770 ./.hg/store/
56
56
57 $ mkdir dir
57 $ mkdir dir
58 $ touch foo dir/bar
58 $ touch foo dir/bar
59 $ hg ci -qAm 'add files'
59 $ hg ci -qAm 'add files'
60
60
61 after commit
61 after commit
62 working dir files can only be written by the owner
62 working dir files can only be written by the owner
63 files created in .hg can be written by the group
63 files created in .hg can be written by the group
64 (in particular, store/**, dirstate, branch cache file, undo files)
64 (in particular, store/**, dirstate, branch cache file, undo files)
65 new directories are setgid
65 new directories are setgid
66
66
67 $ $PYTHON ../printmodes.py .
67 $ $PYTHON ../printmodes.py .
68 00700 ./.hg/
68 00700 ./.hg/
69 00600 ./.hg/00changelog.i
69 00600 ./.hg/00changelog.i
70 00770 ./.hg/cache/
70 00770 ./.hg/cache/
71 00660 ./.hg/cache/branch2-served
71 00660 ./.hg/cache/branch2-served
72 00660 ./.hg/cache/rbc-names-v1
72 00660 ./.hg/cache/rbc-names-v1
73 00660 ./.hg/cache/rbc-revs-v1
73 00660 ./.hg/cache/rbc-revs-v1
74 00660 ./.hg/dirstate
74 00660 ./.hg/dirstate
75 00660 ./.hg/fsmonitor.state (fsmonitor !)
75 00660 ./.hg/fsmonitor.state (fsmonitor !)
76 00660 ./.hg/last-message.txt
76 00660 ./.hg/last-message.txt
77 00600 ./.hg/requires
77 00600 ./.hg/requires
78 00770 ./.hg/store/
78 00770 ./.hg/store/
79 00660 ./.hg/store/00changelog.i
79 00660 ./.hg/store/00changelog.i
80 00660 ./.hg/store/00manifest.i
80 00660 ./.hg/store/00manifest.i
81 00770 ./.hg/store/data/
81 00770 ./.hg/store/data/
82 00770 ./.hg/store/data/dir/
82 00770 ./.hg/store/data/dir/
83 00660 ./.hg/store/data/dir/bar.i
83 00660 ./.hg/store/data/dir/bar.i (reporevlogstore !)
84 00660 ./.hg/store/data/foo.i
84 00660 ./.hg/store/data/foo.i (reporevlogstore !)
85 00770 ./.hg/store/data/dir/bar/ (reposimplestore !)
86 00660 ./.hg/store/data/dir/bar/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
87 00660 ./.hg/store/data/dir/bar/index (reposimplestore !)
88 00770 ./.hg/store/data/foo/ (reposimplestore !)
89 00660 ./.hg/store/data/foo/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
90 00660 ./.hg/store/data/foo/index (reposimplestore !)
85 00660 ./.hg/store/fncache (repofncache !)
91 00660 ./.hg/store/fncache (repofncache !)
86 00660 ./.hg/store/phaseroots
92 00660 ./.hg/store/phaseroots
87 00660 ./.hg/store/undo
93 00660 ./.hg/store/undo
88 00660 ./.hg/store/undo.backupfiles
94 00660 ./.hg/store/undo.backupfiles
89 00660 ./.hg/store/undo.phaseroots
95 00660 ./.hg/store/undo.phaseroots
90 00660 ./.hg/undo.backup.dirstate
96 00660 ./.hg/undo.backup.dirstate
91 00660 ./.hg/undo.bookmarks
97 00660 ./.hg/undo.bookmarks
92 00660 ./.hg/undo.branch
98 00660 ./.hg/undo.branch
93 00660 ./.hg/undo.desc
99 00660 ./.hg/undo.desc
94 00660 ./.hg/undo.dirstate
100 00660 ./.hg/undo.dirstate
95 00700 ./dir/
101 00700 ./dir/
96 00600 ./dir/bar
102 00600 ./dir/bar
97 00600 ./foo
103 00600 ./foo
98
104
99 $ umask 007
105 $ umask 007
100 $ hg init ../push
106 $ hg init ../push
101
107
102 before push
108 before push
103 group can write everything
109 group can write everything
104
110
105 $ $PYTHON ../printmodes.py ../push
111 $ $PYTHON ../printmodes.py ../push
106 00770 ../push/.hg/
112 00770 ../push/.hg/
107 00660 ../push/.hg/00changelog.i
113 00660 ../push/.hg/00changelog.i
108 00660 ../push/.hg/requires
114 00660 ../push/.hg/requires
109 00770 ../push/.hg/store/
115 00770 ../push/.hg/store/
110
116
111 $ umask 077
117 $ umask 077
112 $ hg -q push ../push
118 $ hg -q push ../push
113
119
114 after push
120 after push
115 group can still write everything
121 group can still write everything
116
122
117 $ $PYTHON ../printmodes.py ../push
123 $ $PYTHON ../printmodes.py ../push
118 00770 ../push/.hg/
124 00770 ../push/.hg/
119 00660 ../push/.hg/00changelog.i
125 00660 ../push/.hg/00changelog.i
120 00770 ../push/.hg/cache/
126 00770 ../push/.hg/cache/
121 00660 ../push/.hg/cache/branch2-base
127 00660 ../push/.hg/cache/branch2-base
122 00660 ../push/.hg/dirstate
128 00660 ../push/.hg/dirstate
123 00660 ../push/.hg/requires
129 00660 ../push/.hg/requires
124 00770 ../push/.hg/store/
130 00770 ../push/.hg/store/
125 00660 ../push/.hg/store/00changelog.i
131 00660 ../push/.hg/store/00changelog.i
126 00660 ../push/.hg/store/00manifest.i
132 00660 ../push/.hg/store/00manifest.i
127 00770 ../push/.hg/store/data/
133 00770 ../push/.hg/store/data/
128 00770 ../push/.hg/store/data/dir/
134 00770 ../push/.hg/store/data/dir/
129 00660 ../push/.hg/store/data/dir/bar.i
135 00660 ../push/.hg/store/data/dir/bar.i (reporevlogstore !)
130 00660 ../push/.hg/store/data/foo.i
136 00660 ../push/.hg/store/data/foo.i (reporevlogstore !)
137 00770 ../push/.hg/store/data/dir/bar/ (reposimplestore !)
138 00660 ../push/.hg/store/data/dir/bar/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
139 00660 ../push/.hg/store/data/dir/bar/index (reposimplestore !)
140 00770 ../push/.hg/store/data/foo/ (reposimplestore !)
141 00660 ../push/.hg/store/data/foo/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
142 00660 ../push/.hg/store/data/foo/index (reposimplestore !)
131 00660 ../push/.hg/store/fncache (repofncache !)
143 00660 ../push/.hg/store/fncache (repofncache !)
132 00660 ../push/.hg/store/undo
144 00660 ../push/.hg/store/undo
133 00660 ../push/.hg/store/undo.backupfiles
145 00660 ../push/.hg/store/undo.backupfiles
134 00660 ../push/.hg/store/undo.phaseroots
146 00660 ../push/.hg/store/undo.phaseroots
135 00660 ../push/.hg/undo.bookmarks
147 00660 ../push/.hg/undo.bookmarks
136 00660 ../push/.hg/undo.branch
148 00660 ../push/.hg/undo.branch
137 00660 ../push/.hg/undo.desc
149 00660 ../push/.hg/undo.desc
138 00660 ../push/.hg/undo.dirstate
150 00660 ../push/.hg/undo.dirstate
139
151
140
152
141 Test that we don't lose the setgid bit when we call chmod.
153 Test that we don't lose the setgid bit when we call chmod.
142 Not all systems support setgid directories (e.g. HFS+), so
154 Not all systems support setgid directories (e.g. HFS+), so
143 just check that directories have the same mode.
155 just check that directories have the same mode.
144
156
145 $ cd ..
157 $ cd ..
146 $ hg init setgid
158 $ hg init setgid
147 $ cd setgid
159 $ cd setgid
148 $ chmod g+rwx .hg/store
160 $ chmod g+rwx .hg/store
149 $ chmod g+s .hg/store 2> /dev/null || true
161 $ chmod g+s .hg/store 2> /dev/null || true
150 $ mkdir dir
162 $ mkdir dir
151 $ touch dir/file
163 $ touch dir/file
152 $ hg ci -qAm 'add dir/file'
164 $ hg ci -qAm 'add dir/file'
153 $ storemode=`$PYTHON ../mode.py .hg/store`
165 $ storemode=`$PYTHON ../mode.py .hg/store`
154 $ dirmode=`$PYTHON ../mode.py .hg/store/data/dir`
166 $ dirmode=`$PYTHON ../mode.py .hg/store/data/dir`
155 $ if [ "$storemode" != "$dirmode" ]; then
167 $ if [ "$storemode" != "$dirmode" ]; then
156 > echo "$storemode != $dirmode"
168 > echo "$storemode != $dirmode"
157 > fi
169 > fi
158 $ cd ..
170 $ cd ..
159
171
160 $ cd .. # g-s dir
172 $ cd .. # g-s dir
@@ -1,209 +1,210 b''
1
1
2 $ . "$TESTDIR/narrow-library.sh"
2 $ . "$TESTDIR/narrow-library.sh"
3
3
4 create full repo
4 create full repo
5
5
6 $ hg init master
6 $ hg init master
7 $ cd master
7 $ cd master
8 $ cat >> .hg/hgrc <<EOF
8 $ cat >> .hg/hgrc <<EOF
9 > [narrow]
9 > [narrow]
10 > serveellipses=True
10 > serveellipses=True
11 > EOF
11 > EOF
12
12
13 $ mkdir inside
13 $ mkdir inside
14 $ echo 1 > inside/f
14 $ echo 1 > inside/f
15 $ mkdir inside2
15 $ mkdir inside2
16 $ echo 1 > inside2/f
16 $ echo 1 > inside2/f
17 $ mkdir outside
17 $ mkdir outside
18 $ echo 1 > outside/f
18 $ echo 1 > outside/f
19 $ hg ci -Aqm 'initial'
19 $ hg ci -Aqm 'initial'
20
20
21 $ echo 2 > inside/f
21 $ echo 2 > inside/f
22 $ hg ci -qm 'inside 2'
22 $ hg ci -qm 'inside 2'
23
23
24 $ echo 2 > inside2/f
24 $ echo 2 > inside2/f
25 $ hg ci -qm 'inside2 2'
25 $ hg ci -qm 'inside2 2'
26
26
27 $ echo 2 > outside/f
27 $ echo 2 > outside/f
28 $ hg ci -qm 'outside 2'
28 $ hg ci -qm 'outside 2'
29
29
30 $ cd ..
30 $ cd ..
31
31
32 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
32 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
33 requesting all changes
33 requesting all changes
34 adding changesets
34 adding changesets
35 adding manifests
35 adding manifests
36 adding file changes
36 adding file changes
37 added 3 changesets with 2 changes to 1 files
37 added 3 changesets with 2 changes to 1 files
38 new changesets *:* (glob)
38 new changesets *:* (glob)
39 updating to branch default
39 updating to branch default
40 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
40 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41
41
42 $ hg clone --narrow ssh://user@dummy/master narrow2 --include inside --include inside2
42 $ hg clone --narrow ssh://user@dummy/master narrow2 --include inside --include inside2
43 requesting all changes
43 requesting all changes
44 adding changesets
44 adding changesets
45 adding manifests
45 adding manifests
46 adding file changes
46 adding file changes
47 added 4 changesets with 4 changes to 2 files
47 added 4 changesets with 4 changes to 2 files
48 new changesets *:* (glob)
48 new changesets *:* (glob)
49 updating to branch default
49 updating to branch default
50 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
50 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
51
51
52 Can push to wider repo if change does not affect paths in wider repo that are
52 Can push to wider repo if change does not affect paths in wider repo that are
53 not also in narrower repo
53 not also in narrower repo
54
54
55 $ cd narrow
55 $ cd narrow
56 $ echo 3 > inside/f
56 $ echo 3 > inside/f
57 $ hg ci -m 'inside 3'
57 $ hg ci -m 'inside 3'
58 $ hg push ssh://user@dummy/narrow2
58 $ hg push ssh://user@dummy/narrow2
59 pushing to ssh://user@dummy/narrow2
59 pushing to ssh://user@dummy/narrow2
60 searching for changes
60 searching for changes
61 remote: adding changesets
61 remote: adding changesets
62 remote: adding manifests
62 remote: adding manifests
63 remote: adding file changes
63 remote: adding file changes
64 remote: added 1 changesets with 1 changes to 1 files
64 remote: added 1 changesets with 1 changes to 1 files
65
65
66 Can push to narrower repo if change affects only paths within remote's
66 Can push to narrower repo if change affects only paths within remote's
67 narrow spec
67 narrow spec
68
68
69 $ cd ../narrow2
69 $ cd ../narrow2
70 $ cat >> .hg/hgrc <<EOF
70 $ cat >> .hg/hgrc <<EOF
71 > [narrow]
71 > [narrow]
72 > serveellipses=True
72 > serveellipses=True
73 > EOF
73 > EOF
74 $ hg co -r 'desc("inside 3")'
74 $ hg co -r 'desc("inside 3")'
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 $ echo 4 > inside/f
76 $ echo 4 > inside/f
77 $ hg ci -m 'inside 4'
77 $ hg ci -m 'inside 4'
78 $ hg push ssh://user@dummy/narrow
78 $ hg push ssh://user@dummy/narrow
79 pushing to ssh://user@dummy/narrow
79 pushing to ssh://user@dummy/narrow
80 searching for changes
80 searching for changes
81 remote: adding changesets
81 remote: adding changesets
82 remote: adding manifests
82 remote: adding manifests
83 remote: adding file changes
83 remote: adding file changes
84 remote: added 1 changesets with 1 changes to 1 files
84 remote: added 1 changesets with 1 changes to 1 files
85
85
86 Can push to narrow repo if change affects only paths outside remote's
86 Can push to narrow repo if change affects only paths outside remote's
87 narrow spec
87 narrow spec
88
88
89 $ echo 3 > inside2/f
89 $ echo 3 > inside2/f
90 $ hg ci -m 'inside2 3'
90 $ hg ci -m 'inside2 3'
91 TODO: this should be successful
91 TODO: this should be successful
92 $ hg push ssh://user@dummy/narrow
92 $ hg push ssh://user@dummy/narrow
93 pushing to ssh://user@dummy/narrow
93 pushing to ssh://user@dummy/narrow
94 searching for changes
94 searching for changes
95 remote: adding changesets
95 remote: adding changesets
96 remote: adding manifests
96 remote: adding manifests
97 remote: adding file changes
97 remote: adding file changes
98 remote: transaction abort!
98 remote: transaction abort!
99 remote: rollback completed
99 remote: rollback completed
100 remote: abort: data/inside2/f.i@4a1aa07735e6: unknown parent!
100 remote: abort: data/inside2/f.i@4a1aa07735e6: unknown parent! (reporevlogstore !)
101 remote: abort: data/inside2/f/index@4a1aa07735e6: no node! (reposimplestore !)
101 abort: stream ended unexpectedly (got 0 bytes, expected 4)
102 abort: stream ended unexpectedly (got 0 bytes, expected 4)
102 [255]
103 [255]
103
104
104 Can pull from wider repo if change affects only paths outside remote's
105 Can pull from wider repo if change affects only paths outside remote's
105 narrow spec
106 narrow spec
106 $ echo 4 > inside2/f
107 $ echo 4 > inside2/f
107 $ hg ci -m 'inside2 4'
108 $ hg ci -m 'inside2 4'
108 $ hg log -G -T '{rev} {node|short} {files}\n'
109 $ hg log -G -T '{rev} {node|short} {files}\n'
109 @ 7 d78a96df731d inside2/f
110 @ 7 d78a96df731d inside2/f
110 |
111 |
111 o 6 8c26f5218962 inside2/f
112 o 6 8c26f5218962 inside2/f
112 |
113 |
113 o 5 ba3480e2f9de inside/f
114 o 5 ba3480e2f9de inside/f
114 |
115 |
115 o 4 4e5edd526618 inside/f
116 o 4 4e5edd526618 inside/f
116 |
117 |
117 o 3 81e7e07b7ab0 outside/f
118 o 3 81e7e07b7ab0 outside/f
118 |
119 |
119 o 2 f3993b8c0c2b inside2/f
120 o 2 f3993b8c0c2b inside2/f
120 |
121 |
121 o 1 8cd66ca966b4 inside/f
122 o 1 8cd66ca966b4 inside/f
122 |
123 |
123 o 0 c8057d6f53ab inside/f inside2/f outside/f
124 o 0 c8057d6f53ab inside/f inside2/f outside/f
124
125
125 $ cd ../narrow
126 $ cd ../narrow
126 $ hg log -G -T '{rev} {node|short} {files}\n'
127 $ hg log -G -T '{rev} {node|short} {files}\n'
127 o 4 ba3480e2f9de inside/f
128 o 4 ba3480e2f9de inside/f
128 |
129 |
129 @ 3 4e5edd526618 inside/f
130 @ 3 4e5edd526618 inside/f
130 |
131 |
131 o 2 81e7e07b7ab0 outside/f
132 o 2 81e7e07b7ab0 outside/f
132 |
133 |
133 o 1 8cd66ca966b4 inside/f
134 o 1 8cd66ca966b4 inside/f
134 |
135 |
135 o 0 c8057d6f53ab inside/f inside2/f outside/f
136 o 0 c8057d6f53ab inside/f inside2/f outside/f
136
137
137 $ hg pull ssh://user@dummy/narrow2
138 $ hg pull ssh://user@dummy/narrow2
138 pulling from ssh://user@dummy/narrow2
139 pulling from ssh://user@dummy/narrow2
139 searching for changes
140 searching for changes
140 adding changesets
141 adding changesets
141 adding manifests
142 adding manifests
142 adding file changes
143 adding file changes
143 added 1 changesets with 0 changes to 0 files
144 added 1 changesets with 0 changes to 0 files
144 new changesets d78a96df731d
145 new changesets d78a96df731d
145 (run 'hg update' to get a working copy)
146 (run 'hg update' to get a working copy)
146
147
147 Check that the resulting history is valid in the full repo
148 Check that the resulting history is valid in the full repo
148
149
149 $ cd ../narrow2
150 $ cd ../narrow2
150 $ hg push ssh://user@dummy/master
151 $ hg push ssh://user@dummy/master
151 pushing to ssh://user@dummy/master
152 pushing to ssh://user@dummy/master
152 searching for changes
153 searching for changes
153 remote: adding changesets
154 remote: adding changesets
154 remote: adding manifests
155 remote: adding manifests
155 remote: adding file changes
156 remote: adding file changes
156 remote: added 4 changesets with 4 changes to 2 files
157 remote: added 4 changesets with 4 changes to 2 files
157 $ cd ../master
158 $ cd ../master
158 $ hg verify
159 $ hg verify
159 checking changesets
160 checking changesets
160 checking manifests
161 checking manifests
161 crosschecking files in changesets and manifests
162 crosschecking files in changesets and manifests
162 checking files
163 checking files
163 3 files, 8 changesets, 10 total revisions
164 3 files, 8 changesets, 10 total revisions
164
165
165 Can not push to wider repo if change affects paths in wider repo that are
166 Can not push to wider repo if change affects paths in wider repo that are
166 not also in narrower repo
167 not also in narrower repo
167 $ cd ../master
168 $ cd ../master
168 $ hg co -r 'desc("inside2 4")'
169 $ hg co -r 'desc("inside2 4")'
169 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 $ echo 5 > inside2/f
171 $ echo 5 > inside2/f
171 $ hg ci -m 'inside2 5'
172 $ hg ci -m 'inside2 5'
172 $ hg log -G -T '{rev} {node|short} {files}\n'
173 $ hg log -G -T '{rev} {node|short} {files}\n'
173 @ 8 5970befb64ba inside2/f
174 @ 8 5970befb64ba inside2/f
174 |
175 |
175 o 7 d78a96df731d inside2/f
176 o 7 d78a96df731d inside2/f
176 |
177 |
177 o 6 8c26f5218962 inside2/f
178 o 6 8c26f5218962 inside2/f
178 |
179 |
179 o 5 ba3480e2f9de inside/f
180 o 5 ba3480e2f9de inside/f
180 |
181 |
181 o 4 4e5edd526618 inside/f
182 o 4 4e5edd526618 inside/f
182 |
183 |
183 o 3 81e7e07b7ab0 outside/f
184 o 3 81e7e07b7ab0 outside/f
184 |
185 |
185 o 2 f3993b8c0c2b inside2/f
186 o 2 f3993b8c0c2b inside2/f
186 |
187 |
187 o 1 8cd66ca966b4 inside/f
188 o 1 8cd66ca966b4 inside/f
188 |
189 |
189 o 0 c8057d6f53ab inside/f inside2/f outside/f
190 o 0 c8057d6f53ab inside/f inside2/f outside/f
190
191
191 $ cd ../narrow
192 $ cd ../narrow
192 $ hg pull
193 $ hg pull
193 pulling from ssh://user@dummy/master
194 pulling from ssh://user@dummy/master
194 searching for changes
195 searching for changes
195 adding changesets
196 adding changesets
196 adding manifests
197 adding manifests
197 adding file changes
198 adding file changes
198 added 1 changesets with 0 changes to 0 files
199 added 1 changesets with 0 changes to 0 files
199 new changesets * (glob)
200 new changesets * (glob)
200 (run 'hg update' to get a working copy)
201 (run 'hg update' to get a working copy)
201 TODO: this should tell the user that their narrow clone does not have the
202 TODO: this should tell the user that their narrow clone does not have the
202 necessary content to be able to push to the target
203 necessary content to be able to push to the target
203 $ hg push ssh://user@dummy/narrow2
204 $ hg push ssh://user@dummy/narrow2
204 pushing to ssh://user@dummy/narrow2
205 pushing to ssh://user@dummy/narrow2
205 searching for changes
206 searching for changes
206 remote: adding changesets
207 remote: adding changesets
207 remote: adding manifests
208 remote: adding manifests
208 remote: adding file changes
209 remote: adding file changes
209 remote: added 1 changesets with 0 changes to 0 files
210 remote: added 1 changesets with 0 changes to 0 files
@@ -1,435 +1,439 b''
1 $ . "$TESTDIR/narrow-library.sh"
1 $ . "$TESTDIR/narrow-library.sh"
2
2
3 initialize nested directories to validate complex include/exclude patterns
3 initialize nested directories to validate complex include/exclude patterns
4
4
5 $ hg init master
5 $ hg init master
6 $ cd master
6 $ cd master
7 $ cat >> .hg/hgrc <<EOF
7 $ cat >> .hg/hgrc <<EOF
8 > [narrow]
8 > [narrow]
9 > serveellipses=True
9 > serveellipses=True
10 > EOF
10 > EOF
11
11
12 $ echo root > root
12 $ echo root > root
13 $ hg add root
13 $ hg add root
14 $ hg commit -m 'add root'
14 $ hg commit -m 'add root'
15
15
16 $ for d in dir1 dir2 dir1/dirA dir1/dirB dir2/dirA dir2/dirB
16 $ for d in dir1 dir2 dir1/dirA dir1/dirB dir2/dirA dir2/dirB
17 > do
17 > do
18 > mkdir -p $d
18 > mkdir -p $d
19 > echo $d/foo > $d/foo
19 > echo $d/foo > $d/foo
20 > hg add $d/foo
20 > hg add $d/foo
21 > hg commit -m "add $d/foo"
21 > hg commit -m "add $d/foo"
22 > echo $d/bar > $d/bar
22 > echo $d/bar > $d/bar
23 > hg add $d/bar
23 > hg add $d/bar
24 > hg commit -m "add $d/bar"
24 > hg commit -m "add $d/bar"
25 > done
25 > done
26 #if execbit
26 #if execbit
27 $ chmod +x dir1/dirA/foo
27 $ chmod +x dir1/dirA/foo
28 $ hg commit -m "make dir1/dirA/foo executable"
28 $ hg commit -m "make dir1/dirA/foo executable"
29 #else
29 #else
30 $ hg import --bypass - <<EOF
30 $ hg import --bypass - <<EOF
31 > # HG changeset patch
31 > # HG changeset patch
32 > make dir1/dirA/foo executable
32 > make dir1/dirA/foo executable
33 >
33 >
34 > diff --git a/dir1/dirA/foo b/dir1/dirA/foo
34 > diff --git a/dir1/dirA/foo b/dir1/dirA/foo
35 > old mode 100644
35 > old mode 100644
36 > new mode 100755
36 > new mode 100755
37 > EOF
37 > EOF
38 applying patch from stdin
38 applying patch from stdin
39 $ hg update -qr tip
39 $ hg update -qr tip
40 #endif
40 #endif
41 $ hg log -G -T '{rev} {node|short} {files}\n'
41 $ hg log -G -T '{rev} {node|short} {files}\n'
42 @ 13 c87ca422d521 dir1/dirA/foo
42 @ 13 c87ca422d521 dir1/dirA/foo
43 |
43 |
44 o 12 951b8a83924e dir2/dirB/bar
44 o 12 951b8a83924e dir2/dirB/bar
45 |
45 |
46 o 11 01ae5a51b563 dir2/dirB/foo
46 o 11 01ae5a51b563 dir2/dirB/foo
47 |
47 |
48 o 10 5eababdf0ac5 dir2/dirA/bar
48 o 10 5eababdf0ac5 dir2/dirA/bar
49 |
49 |
50 o 9 99d690663739 dir2/dirA/foo
50 o 9 99d690663739 dir2/dirA/foo
51 |
51 |
52 o 8 8e80155d5445 dir1/dirB/bar
52 o 8 8e80155d5445 dir1/dirB/bar
53 |
53 |
54 o 7 406760310428 dir1/dirB/foo
54 o 7 406760310428 dir1/dirB/foo
55 |
55 |
56 o 6 623466a5f475 dir1/dirA/bar
56 o 6 623466a5f475 dir1/dirA/bar
57 |
57 |
58 o 5 06ff3a5be997 dir1/dirA/foo
58 o 5 06ff3a5be997 dir1/dirA/foo
59 |
59 |
60 o 4 33227af02764 dir2/bar
60 o 4 33227af02764 dir2/bar
61 |
61 |
62 o 3 5e1f9d8d7c69 dir2/foo
62 o 3 5e1f9d8d7c69 dir2/foo
63 |
63 |
64 o 2 594bc4b13d4a dir1/bar
64 o 2 594bc4b13d4a dir1/bar
65 |
65 |
66 o 1 47f480a08324 dir1/foo
66 o 1 47f480a08324 dir1/foo
67 |
67 |
68 o 0 2a4f0c3b67da root
68 o 0 2a4f0c3b67da root
69
69
70 $ cd ..
70 $ cd ..
71
71
72 clone a narrow portion of the master, such that we can widen it later
72 clone a narrow portion of the master, such that we can widen it later
73
73
74 $ hg clone --narrow ssh://user@dummy/master narrow \
74 $ hg clone --narrow ssh://user@dummy/master narrow \
75 > --include dir1 \
75 > --include dir1 \
76 > --include dir2 \
76 > --include dir2 \
77 > --exclude dir1/dirA \
77 > --exclude dir1/dirA \
78 > --exclude dir1/dirB \
78 > --exclude dir1/dirB \
79 > --exclude dir2/dirA \
79 > --exclude dir2/dirA \
80 > --exclude dir2/dirB
80 > --exclude dir2/dirB
81 requesting all changes
81 requesting all changes
82 adding changesets
82 adding changesets
83 adding manifests
83 adding manifests
84 adding file changes
84 adding file changes
85 added 6 changesets with 4 changes to 4 files
85 added 6 changesets with 4 changes to 4 files
86 new changesets *:* (glob)
86 new changesets *:* (glob)
87 updating to branch default
87 updating to branch default
88 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
89
89
90 $ cd narrow
90 $ cd narrow
91 $ cat .hg/narrowspec
91 $ cat .hg/narrowspec
92 [includes]
92 [includes]
93 path:dir1
93 path:dir1
94 path:dir2
94 path:dir2
95 [excludes]
95 [excludes]
96 path:dir1/dirA
96 path:dir1/dirA
97 path:dir1/dirB
97 path:dir1/dirB
98 path:dir2/dirA
98 path:dir2/dirA
99 path:dir2/dirB
99 path:dir2/dirB
100 $ hg manifest -r tip
100 $ hg manifest -r tip
101 dir1/bar
101 dir1/bar
102 dir1/dirA/bar
102 dir1/dirA/bar
103 dir1/dirA/foo
103 dir1/dirA/foo
104 dir1/dirB/bar
104 dir1/dirB/bar
105 dir1/dirB/foo
105 dir1/dirB/foo
106 dir1/foo
106 dir1/foo
107 dir2/bar
107 dir2/bar
108 dir2/dirA/bar
108 dir2/dirA/bar
109 dir2/dirA/foo
109 dir2/dirA/foo
110 dir2/dirB/bar
110 dir2/dirB/bar
111 dir2/dirB/foo
111 dir2/dirB/foo
112 dir2/foo
112 dir2/foo
113 root
113 root
114 $ find * | sort
114 $ find * | sort
115 dir1
115 dir1
116 dir1/bar
116 dir1/bar
117 dir1/foo
117 dir1/foo
118 dir2
118 dir2
119 dir2/bar
119 dir2/bar
120 dir2/foo
120 dir2/foo
121 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
121 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
122 @ 5 c87ca422d521... dir1/dirA/foo
122 @ 5 c87ca422d521... dir1/dirA/foo
123 |
123 |
124 o 4 33227af02764 dir2/bar
124 o 4 33227af02764 dir2/bar
125 |
125 |
126 o 3 5e1f9d8d7c69 dir2/foo
126 o 3 5e1f9d8d7c69 dir2/foo
127 |
127 |
128 o 2 594bc4b13d4a dir1/bar
128 o 2 594bc4b13d4a dir1/bar
129 |
129 |
130 o 1 47f480a08324 dir1/foo
130 o 1 47f480a08324 dir1/foo
131 |
131 |
132 o 0 2a4f0c3b67da... root
132 o 0 2a4f0c3b67da... root
133
133
134
134
135 widen the narrow checkout
135 widen the narrow checkout
136
136
137 $ hg tracked --removeexclude dir1/dirA
137 $ hg tracked --removeexclude dir1/dirA
138 comparing with ssh://user@dummy/master
138 comparing with ssh://user@dummy/master
139 searching for changes
139 searching for changes
140 no changes found
140 no changes found
141 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
141 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
142 adding changesets
142 adding changesets
143 adding manifests
143 adding manifests
144 adding file changes
144 adding file changes
145 added 9 changesets with 6 changes to 6 files
145 added 9 changesets with 6 changes to 6 files
146 new changesets *:* (glob)
146 new changesets *:* (glob)
147 $ cat .hg/narrowspec
147 $ cat .hg/narrowspec
148 [includes]
148 [includes]
149 path:dir1
149 path:dir1
150 path:dir2
150 path:dir2
151 [excludes]
151 [excludes]
152 path:dir1/dirB
152 path:dir1/dirB
153 path:dir2/dirA
153 path:dir2/dirA
154 path:dir2/dirB
154 path:dir2/dirB
155 $ find * | sort
155 $ find * | sort
156 dir1
156 dir1
157 dir1/bar
157 dir1/bar
158 dir1/dirA
158 dir1/dirA
159 dir1/dirA/bar
159 dir1/dirA/bar
160 dir1/dirA/foo
160 dir1/dirA/foo
161 dir1/foo
161 dir1/foo
162 dir2
162 dir2
163 dir2/bar
163 dir2/bar
164 dir2/foo
164 dir2/foo
165
165
166 #if execbit
166 #if execbit
167 $ test -x dir1/dirA/foo && echo executable
167 $ test -x dir1/dirA/foo && echo executable
168 executable
168 executable
169 $ test -x dir1/dirA/bar || echo not executable
169 $ test -x dir1/dirA/bar || echo not executable
170 not executable
170 not executable
171 #endif
171 #endif
172
172
173 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
173 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
174 @ 8 c87ca422d521 dir1/dirA/foo
174 @ 8 c87ca422d521 dir1/dirA/foo
175 |
175 |
176 o 7 951b8a83924e... dir2/dirB/bar
176 o 7 951b8a83924e... dir2/dirB/bar
177 |
177 |
178 o 6 623466a5f475 dir1/dirA/bar
178 o 6 623466a5f475 dir1/dirA/bar
179 |
179 |
180 o 5 06ff3a5be997 dir1/dirA/foo
180 o 5 06ff3a5be997 dir1/dirA/foo
181 |
181 |
182 o 4 33227af02764 dir2/bar
182 o 4 33227af02764 dir2/bar
183 |
183 |
184 o 3 5e1f9d8d7c69 dir2/foo
184 o 3 5e1f9d8d7c69 dir2/foo
185 |
185 |
186 o 2 594bc4b13d4a dir1/bar
186 o 2 594bc4b13d4a dir1/bar
187 |
187 |
188 o 1 47f480a08324 dir1/foo
188 o 1 47f480a08324 dir1/foo
189 |
189 |
190 o 0 2a4f0c3b67da... root
190 o 0 2a4f0c3b67da... root
191
191
192
192
193 widen narrow spec again, but exclude a file in previously included spec
193 widen narrow spec again, but exclude a file in previously included spec
194
194
195 $ hg tracked --removeexclude dir2/dirB --addexclude dir1/dirA/bar
195 $ hg tracked --removeexclude dir2/dirB --addexclude dir1/dirA/bar
196 comparing with ssh://user@dummy/master
196 comparing with ssh://user@dummy/master
197 searching for changes
197 searching for changes
198 looking for local changes to affected paths
198 looking for local changes to affected paths
199 deleting data/dir1/dirA/bar.i
199 deleting data/dir1/dirA/bar.i (reporevlogstore !)
200 deleting data/dir1/dirA/bar/0eca1d0cbdaea4651d1d04d71976a6d2d9bfaae5 (reposimplestore !)
201 deleting data/dir1/dirA/bar/index (reposimplestore !)
200 no changes found
202 no changes found
201 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
203 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
202 adding changesets
204 adding changesets
203 adding manifests
205 adding manifests
204 adding file changes
206 adding file changes
205 added 11 changesets with 7 changes to 7 files
207 added 11 changesets with 7 changes to 7 files
206 new changesets *:* (glob)
208 new changesets *:* (glob)
207 $ cat .hg/narrowspec
209 $ cat .hg/narrowspec
208 [includes]
210 [includes]
209 path:dir1
211 path:dir1
210 path:dir2
212 path:dir2
211 [excludes]
213 [excludes]
212 path:dir1/dirA/bar
214 path:dir1/dirA/bar
213 path:dir1/dirB
215 path:dir1/dirB
214 path:dir2/dirA
216 path:dir2/dirA
215 $ find * | sort
217 $ find * | sort
216 dir1
218 dir1
217 dir1/bar
219 dir1/bar
218 dir1/dirA
220 dir1/dirA
219 dir1/dirA/foo
221 dir1/dirA/foo
220 dir1/foo
222 dir1/foo
221 dir2
223 dir2
222 dir2/bar
224 dir2/bar
223 dir2/dirB
225 dir2/dirB
224 dir2/dirB/bar
226 dir2/dirB/bar
225 dir2/dirB/foo
227 dir2/dirB/foo
226 dir2/foo
228 dir2/foo
227 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
229 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
228 @ 10 c87ca422d521 dir1/dirA/foo
230 @ 10 c87ca422d521 dir1/dirA/foo
229 |
231 |
230 o 9 951b8a83924e dir2/dirB/bar
232 o 9 951b8a83924e dir2/dirB/bar
231 |
233 |
232 o 8 01ae5a51b563 dir2/dirB/foo
234 o 8 01ae5a51b563 dir2/dirB/foo
233 |
235 |
234 o 7 5eababdf0ac5... dir2/dirA/bar
236 o 7 5eababdf0ac5... dir2/dirA/bar
235 |
237 |
236 o 6 623466a5f475... dir1/dirA/bar
238 o 6 623466a5f475... dir1/dirA/bar
237 |
239 |
238 o 5 06ff3a5be997 dir1/dirA/foo
240 o 5 06ff3a5be997 dir1/dirA/foo
239 |
241 |
240 o 4 33227af02764 dir2/bar
242 o 4 33227af02764 dir2/bar
241 |
243 |
242 o 3 5e1f9d8d7c69 dir2/foo
244 o 3 5e1f9d8d7c69 dir2/foo
243 |
245 |
244 o 2 594bc4b13d4a dir1/bar
246 o 2 594bc4b13d4a dir1/bar
245 |
247 |
246 o 1 47f480a08324 dir1/foo
248 o 1 47f480a08324 dir1/foo
247 |
249 |
248 o 0 2a4f0c3b67da... root
250 o 0 2a4f0c3b67da... root
249
251
250
252
251 widen narrow spec yet again, excluding a directory in previous spec
253 widen narrow spec yet again, excluding a directory in previous spec
252
254
253 $ hg tracked --removeexclude dir2/dirA --addexclude dir1/dirA
255 $ hg tracked --removeexclude dir2/dirA --addexclude dir1/dirA
254 comparing with ssh://user@dummy/master
256 comparing with ssh://user@dummy/master
255 searching for changes
257 searching for changes
256 looking for local changes to affected paths
258 looking for local changes to affected paths
257 deleting data/dir1/dirA/foo.i
259 deleting data/dir1/dirA/foo.i (reporevlogstore !)
260 deleting data/dir1/dirA/foo/162caeb3d55dceb1fee793aa631ac8c73fcb8b5e (reposimplestore !)
261 deleting data/dir1/dirA/foo/index (reposimplestore !)
258 no changes found
262 no changes found
259 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
263 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
260 adding changesets
264 adding changesets
261 adding manifests
265 adding manifests
262 adding file changes
266 adding file changes
263 added 13 changesets with 8 changes to 8 files
267 added 13 changesets with 8 changes to 8 files
264 new changesets *:* (glob)
268 new changesets *:* (glob)
265 $ cat .hg/narrowspec
269 $ cat .hg/narrowspec
266 [includes]
270 [includes]
267 path:dir1
271 path:dir1
268 path:dir2
272 path:dir2
269 [excludes]
273 [excludes]
270 path:dir1/dirA
274 path:dir1/dirA
271 path:dir1/dirA/bar
275 path:dir1/dirA/bar
272 path:dir1/dirB
276 path:dir1/dirB
273 $ find * | sort
277 $ find * | sort
274 dir1
278 dir1
275 dir1/bar
279 dir1/bar
276 dir1/foo
280 dir1/foo
277 dir2
281 dir2
278 dir2/bar
282 dir2/bar
279 dir2/dirA
283 dir2/dirA
280 dir2/dirA/bar
284 dir2/dirA/bar
281 dir2/dirA/foo
285 dir2/dirA/foo
282 dir2/dirB
286 dir2/dirB
283 dir2/dirB/bar
287 dir2/dirB/bar
284 dir2/dirB/foo
288 dir2/dirB/foo
285 dir2/foo
289 dir2/foo
286 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
290 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
287 @ 12 c87ca422d521... dir1/dirA/foo
291 @ 12 c87ca422d521... dir1/dirA/foo
288 |
292 |
289 o 11 951b8a83924e dir2/dirB/bar
293 o 11 951b8a83924e dir2/dirB/bar
290 |
294 |
291 o 10 01ae5a51b563 dir2/dirB/foo
295 o 10 01ae5a51b563 dir2/dirB/foo
292 |
296 |
293 o 9 5eababdf0ac5 dir2/dirA/bar
297 o 9 5eababdf0ac5 dir2/dirA/bar
294 |
298 |
295 o 8 99d690663739 dir2/dirA/foo
299 o 8 99d690663739 dir2/dirA/foo
296 |
300 |
297 o 7 8e80155d5445... dir1/dirB/bar
301 o 7 8e80155d5445... dir1/dirB/bar
298 |
302 |
299 o 6 623466a5f475... dir1/dirA/bar
303 o 6 623466a5f475... dir1/dirA/bar
300 |
304 |
301 o 5 06ff3a5be997... dir1/dirA/foo
305 o 5 06ff3a5be997... dir1/dirA/foo
302 |
306 |
303 o 4 33227af02764 dir2/bar
307 o 4 33227af02764 dir2/bar
304 |
308 |
305 o 3 5e1f9d8d7c69 dir2/foo
309 o 3 5e1f9d8d7c69 dir2/foo
306 |
310 |
307 o 2 594bc4b13d4a dir1/bar
311 o 2 594bc4b13d4a dir1/bar
308 |
312 |
309 o 1 47f480a08324 dir1/foo
313 o 1 47f480a08324 dir1/foo
310 |
314 |
311 o 0 2a4f0c3b67da... root
315 o 0 2a4f0c3b67da... root
312
316
313
317
314 include a directory that was previously explicitly excluded
318 include a directory that was previously explicitly excluded
315
319
316 $ hg tracked --removeexclude dir1/dirA
320 $ hg tracked --removeexclude dir1/dirA
317 comparing with ssh://user@dummy/master
321 comparing with ssh://user@dummy/master
318 searching for changes
322 searching for changes
319 no changes found
323 no changes found
320 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
324 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
321 adding changesets
325 adding changesets
322 adding manifests
326 adding manifests
323 adding file changes
327 adding file changes
324 added 13 changesets with 9 changes to 9 files
328 added 13 changesets with 9 changes to 9 files
325 new changesets *:* (glob)
329 new changesets *:* (glob)
326 $ cat .hg/narrowspec
330 $ cat .hg/narrowspec
327 [includes]
331 [includes]
328 path:dir1
332 path:dir1
329 path:dir2
333 path:dir2
330 [excludes]
334 [excludes]
331 path:dir1/dirA/bar
335 path:dir1/dirA/bar
332 path:dir1/dirB
336 path:dir1/dirB
333 $ find * | sort
337 $ find * | sort
334 dir1
338 dir1
335 dir1/bar
339 dir1/bar
336 dir1/dirA
340 dir1/dirA
337 dir1/dirA/foo
341 dir1/dirA/foo
338 dir1/foo
342 dir1/foo
339 dir2
343 dir2
340 dir2/bar
344 dir2/bar
341 dir2/dirA
345 dir2/dirA
342 dir2/dirA/bar
346 dir2/dirA/bar
343 dir2/dirA/foo
347 dir2/dirA/foo
344 dir2/dirB
348 dir2/dirB
345 dir2/dirB/bar
349 dir2/dirB/bar
346 dir2/dirB/foo
350 dir2/dirB/foo
347 dir2/foo
351 dir2/foo
348 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
352 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
349 @ 12 c87ca422d521 dir1/dirA/foo
353 @ 12 c87ca422d521 dir1/dirA/foo
350 |
354 |
351 o 11 951b8a83924e dir2/dirB/bar
355 o 11 951b8a83924e dir2/dirB/bar
352 |
356 |
353 o 10 01ae5a51b563 dir2/dirB/foo
357 o 10 01ae5a51b563 dir2/dirB/foo
354 |
358 |
355 o 9 5eababdf0ac5 dir2/dirA/bar
359 o 9 5eababdf0ac5 dir2/dirA/bar
356 |
360 |
357 o 8 99d690663739 dir2/dirA/foo
361 o 8 99d690663739 dir2/dirA/foo
358 |
362 |
359 o 7 8e80155d5445... dir1/dirB/bar
363 o 7 8e80155d5445... dir1/dirB/bar
360 |
364 |
361 o 6 623466a5f475... dir1/dirA/bar
365 o 6 623466a5f475... dir1/dirA/bar
362 |
366 |
363 o 5 06ff3a5be997 dir1/dirA/foo
367 o 5 06ff3a5be997 dir1/dirA/foo
364 |
368 |
365 o 4 33227af02764 dir2/bar
369 o 4 33227af02764 dir2/bar
366 |
370 |
367 o 3 5e1f9d8d7c69 dir2/foo
371 o 3 5e1f9d8d7c69 dir2/foo
368 |
372 |
369 o 2 594bc4b13d4a dir1/bar
373 o 2 594bc4b13d4a dir1/bar
370 |
374 |
371 o 1 47f480a08324 dir1/foo
375 o 1 47f480a08324 dir1/foo
372 |
376 |
373 o 0 2a4f0c3b67da... root
377 o 0 2a4f0c3b67da... root
374
378
375
379
376 $ cd ..
380 $ cd ..
377
381
378 clone a narrow portion of the master, such that we can widen it later
382 clone a narrow portion of the master, such that we can widen it later
379
383
380 $ hg clone --narrow ssh://user@dummy/master narrow2 --include dir1/dirA
384 $ hg clone --narrow ssh://user@dummy/master narrow2 --include dir1/dirA
381 requesting all changes
385 requesting all changes
382 adding changesets
386 adding changesets
383 adding manifests
387 adding manifests
384 adding file changes
388 adding file changes
385 added 5 changesets with 2 changes to 2 files
389 added 5 changesets with 2 changes to 2 files
386 new changesets *:* (glob)
390 new changesets *:* (glob)
387 updating to branch default
391 updating to branch default
388 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
392 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
389 $ cd narrow2
393 $ cd narrow2
390 $ find * | sort
394 $ find * | sort
391 dir1
395 dir1
392 dir1/dirA
396 dir1/dirA
393 dir1/dirA/bar
397 dir1/dirA/bar
394 dir1/dirA/foo
398 dir1/dirA/foo
395 $ hg tracked --addinclude dir1
399 $ hg tracked --addinclude dir1
396 comparing with ssh://user@dummy/master
400 comparing with ssh://user@dummy/master
397 searching for changes
401 searching for changes
398 no changes found
402 no changes found
399 saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob)
403 saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob)
400 adding changesets
404 adding changesets
401 adding manifests
405 adding manifests
402 adding file changes
406 adding file changes
403 added 10 changesets with 6 changes to 6 files
407 added 10 changesets with 6 changes to 6 files
404 new changesets *:* (glob)
408 new changesets *:* (glob)
405 $ find * | sort
409 $ find * | sort
406 dir1
410 dir1
407 dir1/bar
411 dir1/bar
408 dir1/dirA
412 dir1/dirA
409 dir1/dirA/bar
413 dir1/dirA/bar
410 dir1/dirA/foo
414 dir1/dirA/foo
411 dir1/dirB
415 dir1/dirB
412 dir1/dirB/bar
416 dir1/dirB/bar
413 dir1/dirB/foo
417 dir1/dirB/foo
414 dir1/foo
418 dir1/foo
415 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
419 $ hg log -G -T '{rev} {node|short}{if(ellipsis, "...")} {files}\n'
416 @ 9 c87ca422d521 dir1/dirA/foo
420 @ 9 c87ca422d521 dir1/dirA/foo
417 |
421 |
418 o 8 951b8a83924e... dir2/dirB/bar
422 o 8 951b8a83924e... dir2/dirB/bar
419 |
423 |
420 o 7 8e80155d5445 dir1/dirB/bar
424 o 7 8e80155d5445 dir1/dirB/bar
421 |
425 |
422 o 6 406760310428 dir1/dirB/foo
426 o 6 406760310428 dir1/dirB/foo
423 |
427 |
424 o 5 623466a5f475 dir1/dirA/bar
428 o 5 623466a5f475 dir1/dirA/bar
425 |
429 |
426 o 4 06ff3a5be997 dir1/dirA/foo
430 o 4 06ff3a5be997 dir1/dirA/foo
427 |
431 |
428 o 3 33227af02764... dir2/bar
432 o 3 33227af02764... dir2/bar
429 |
433 |
430 o 2 594bc4b13d4a dir1/bar
434 o 2 594bc4b13d4a dir1/bar
431 |
435 |
432 o 1 47f480a08324 dir1/foo
436 o 1 47f480a08324 dir1/foo
433 |
437 |
434 o 0 2a4f0c3b67da... root
438 o 0 2a4f0c3b67da... root
435
439
@@ -1,166 +1,166 b''
1 #testcases flat tree
1 #testcases flat tree
2
2
3 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
4
4
5 #if tree
5 #if tree
6 $ cat << EOF >> $HGRCPATH
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
7 > [experimental]
8 > treemanifest = 1
8 > treemanifest = 1
9 > EOF
9 > EOF
10 #endif
10 #endif
11
11
12 create full repo
12 create full repo
13
13
14 $ hg init master
14 $ hg init master
15 $ cd master
15 $ cd master
16 $ cat >> .hg/hgrc <<EOF
16 $ cat >> .hg/hgrc <<EOF
17 > [narrow]
17 > [narrow]
18 > serveellipses=True
18 > serveellipses=True
19 > EOF
19 > EOF
20
20
21 $ mkdir inside
21 $ mkdir inside
22 $ echo inside > inside/f1
22 $ echo inside > inside/f1
23 $ mkdir outside
23 $ mkdir outside
24 $ echo outside > outside/f1
24 $ echo outside > outside/f1
25 $ hg ci -Aqm 'initial'
25 $ hg ci -Aqm 'initial'
26
26
27 $ echo modified > inside/f1
27 $ echo modified > inside/f1
28 $ hg ci -qm 'modify inside'
28 $ hg ci -qm 'modify inside'
29
29
30 $ hg co -q 0
30 $ hg co -q 0
31 $ echo modified > outside/f1
31 $ echo modified > outside/f1
32 $ hg ci -qm 'modify outside'
32 $ hg ci -qm 'modify outside'
33
33
34 $ echo modified again >> outside/f1
34 $ echo modified again >> outside/f1
35 $ hg ci -qm 'modify outside again'
35 $ hg ci -qm 'modify outside again'
36
36
37 $ cd ..
37 $ cd ..
38
38
39 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
39 $ hg clone --narrow ssh://user@dummy/master narrow --include inside
40 requesting all changes
40 requesting all changes
41 adding changesets
41 adding changesets
42 adding manifests
42 adding manifests
43 adding file changes
43 adding file changes
44 added 3 changesets with 2 changes to 1 files (+1 heads)
44 added 3 changesets with 2 changes to 1 files (+1 heads)
45 new changesets *:* (glob)
45 new changesets *:* (glob)
46 updating to branch default
46 updating to branch default
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ cd narrow
48 $ cd narrow
49 $ cat >> $HGRCPATH <<EOF
49 $ cat >> $HGRCPATH <<EOF
50 > [extensions]
50 > [extensions]
51 > strip=
51 > strip=
52 > EOF
52 > EOF
53
53
54 Can strip and recover changesets affecting only files within narrow spec
54 Can strip and recover changesets affecting only files within narrow spec
55
55
56 $ hg co -r 'desc("modify inside")'
56 $ hg co -r 'desc("modify inside")'
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 $ rm -f .hg/strip-backup/*-backup.hg
58 $ rm -f .hg/strip-backup/*-backup.hg
59 $ hg strip .
59 $ hg strip .
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
61 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
62 $ hg unbundle .hg/strip-backup/*-backup.hg
62 $ hg unbundle .hg/strip-backup/*-backup.hg
63 adding changesets
63 adding changesets
64 adding manifests
64 adding manifests
65 adding file changes
65 adding file changes
66 added 1 changesets with 1 changes to 1 files (+1 heads)
66 added 1 changesets with 1 changes to 1 files (+1 heads)
67 new changesets * (glob)
67 new changesets * (glob)
68 (run 'hg heads' to see heads, 'hg merge' to merge)
68 (run 'hg heads' to see heads, 'hg merge' to merge)
69
69
70 Can strip and recover changesets affecting files outside of narrow spec
70 Can strip and recover changesets affecting files outside of narrow spec
71
71
72 $ hg co -r 'desc("modify outside")'
72 $ hg co -r 'desc("modify outside")'
73 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
73 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
74 $ hg log -G -T '{rev} {desc}\n'
74 $ hg log -G -T '{rev} {desc}\n'
75 o 2 modify inside
75 o 2 modify inside
76 |
76 |
77 | @ 1 modify outside again
77 | @ 1 modify outside again
78 |/
78 |/
79 o 0 initial
79 o 0 initial
80
80
81 $ hg debugdata -m 1
81 $ hg debugdata -m 1
82 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
82 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
83 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
83 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
84 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
84 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
85 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
85 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
86
86
87 $ rm -f .hg/strip-backup/*-backup.hg
87 $ rm -f .hg/strip-backup/*-backup.hg
88 $ hg strip .
88 $ hg strip .
89 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
90 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
91 $ hg unbundle .hg/strip-backup/*-backup.hg
91 $ hg unbundle .hg/strip-backup/*-backup.hg
92 adding changesets
92 adding changesets
93 adding manifests
93 adding manifests
94 adding file changes
94 adding file changes
95 added 1 changesets with 0 changes to 0 files (+1 heads)
95 added 1 changesets with 0 changes to 0 files (+1 heads)
96 new changesets * (glob)
96 new changesets * (glob)
97 (run 'hg heads' to see heads, 'hg merge' to merge)
97 (run 'hg heads' to see heads, 'hg merge' to merge)
98 $ hg log -G -T '{rev} {desc}\n'
98 $ hg log -G -T '{rev} {desc}\n'
99 o 2 modify outside again
99 o 2 modify outside again
100 |
100 |
101 | o 1 modify inside
101 | o 1 modify inside
102 |/
102 |/
103 @ 0 initial
103 @ 0 initial
104
104
105 Check that hash of file outside narrow spec got restored
105 Check that hash of file outside narrow spec got restored
106 $ hg debugdata -m 2
106 $ hg debugdata -m 2
107 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
107 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
108 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
108 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
109 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
109 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
110 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
110 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
111
111
112 Also verify we can apply the bundle with 'hg pull':
112 Also verify we can apply the bundle with 'hg pull':
113 $ hg co -r 'desc("modify inside")'
113 $ hg co -r 'desc("modify inside")'
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
115 $ rm .hg/strip-backup/*-backup.hg
115 $ rm .hg/strip-backup/*-backup.hg
116 $ hg strip .
116 $ hg strip .
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
118 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
119 #if repobundlerepo
119 $ hg pull .hg/strip-backup/*-backup.hg
120 $ hg pull .hg/strip-backup/*-backup.hg
120 pulling from .hg/strip-backup/*-backup.hg (glob)
121 pulling from .hg/strip-backup/*-backup.hg (glob)
121 searching for changes
122 searching for changes
122 adding changesets
123 adding changesets
123 adding manifests
124 adding manifests
124 adding file changes
125 adding file changes
125 added 1 changesets with 1 changes to 1 files (+1 heads)
126 added 1 changesets with 1 changes to 1 files (+1 heads)
126 new changesets * (glob)
127 new changesets * (glob)
127 (run 'hg heads' to see heads, 'hg merge' to merge)
128 (run 'hg heads' to see heads, 'hg merge' to merge)
128
129
129 $ rm .hg/strip-backup/*-backup.hg
130 $ rm .hg/strip-backup/*-backup.hg
130 $ hg strip 0
131 $ hg strip 0
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
132 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
132 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
133 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
133
134
134 #if repobundlerepo
135 $ hg incoming .hg/strip-backup/*-backup.hg
135 $ hg incoming .hg/strip-backup/*-backup.hg
136 comparing with .hg/strip-backup/*-backup.hg (glob)
136 comparing with .hg/strip-backup/*-backup.hg (glob)
137 changeset: 0:* (glob)
137 changeset: 0:* (glob)
138 user: test
138 user: test
139 date: Thu Jan 01 00:00:00 1970 +0000
139 date: Thu Jan 01 00:00:00 1970 +0000
140 summary: initial
140 summary: initial
141
141
142 changeset: 1:9e48d953700d (flat !)
142 changeset: 1:9e48d953700d (flat !)
143 changeset: 1:3888164bccf0 (tree !)
143 changeset: 1:3888164bccf0 (tree !)
144 user: test
144 user: test
145 date: Thu Jan 01 00:00:00 1970 +0000
145 date: Thu Jan 01 00:00:00 1970 +0000
146 summary: modify outside again
146 summary: modify outside again
147
147
148 changeset: 2:f505d5e96aa8 (flat !)
148 changeset: 2:f505d5e96aa8 (flat !)
149 changeset: 2:40b66f95a209 (tree !)
149 changeset: 2:40b66f95a209 (tree !)
150 tag: tip
150 tag: tip
151 parent: 0:a99f4d53924d (flat !)
151 parent: 0:a99f4d53924d (flat !)
152 parent: 0:c2a5fabcca3c (tree !)
152 parent: 0:c2a5fabcca3c (tree !)
153 user: test
153 user: test
154 date: Thu Jan 01 00:00:00 1970 +0000
154 date: Thu Jan 01 00:00:00 1970 +0000
155 summary: modify inside
155 summary: modify inside
156
156
157 $ hg pull .hg/strip-backup/*-backup.hg
157 $ hg pull .hg/strip-backup/*-backup.hg
158 pulling from .hg/strip-backup/*-backup.hg (glob)
158 pulling from .hg/strip-backup/*-backup.hg (glob)
159 requesting all changes
159 requesting all changes
160 adding changesets
160 adding changesets
161 adding manifests
161 adding manifests
162 adding file changes
162 adding file changes
163 added 3 changesets with 2 changes to 1 files (+1 heads)
163 added 3 changesets with 2 changes to 1 files (+1 heads)
164 new changesets *:* (glob)
164 new changesets *:* (glob)
165 (run 'hg heads' to see heads, 'hg merge' to merge)
165 (run 'hg heads' to see heads, 'hg merge' to merge)
166 #endif
166 #endif
@@ -1,1607 +1,1609 b''
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [phases]
2 > [phases]
3 > # public changeset are not obsolete
3 > # public changeset are not obsolete
4 > publish=false
4 > publish=false
5 > [ui]
5 > [ui]
6 > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n"
6 > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n"
7 > EOF
7 > EOF
8 $ mkcommit() {
8 $ mkcommit() {
9 > echo "$1" > "$1"
9 > echo "$1" > "$1"
10 > hg add "$1"
10 > hg add "$1"
11 > hg ci -m "add $1"
11 > hg ci -m "add $1"
12 > }
12 > }
13 $ getid() {
13 $ getid() {
14 > hg log -T "{node}\n" --hidden -r "desc('$1')"
14 > hg log -T "{node}\n" --hidden -r "desc('$1')"
15 > }
15 > }
16
16
17 $ cat > debugkeys.py <<EOF
17 $ cat > debugkeys.py <<EOF
18 > def reposetup(ui, repo):
18 > def reposetup(ui, repo):
19 > class debugkeysrepo(repo.__class__):
19 > class debugkeysrepo(repo.__class__):
20 > def listkeys(self, namespace):
20 > def listkeys(self, namespace):
21 > ui.write(b'listkeys %s\n' % (namespace,))
21 > ui.write(b'listkeys %s\n' % (namespace,))
22 > return super(debugkeysrepo, self).listkeys(namespace)
22 > return super(debugkeysrepo, self).listkeys(namespace)
23 >
23 >
24 > if repo.local():
24 > if repo.local():
25 > repo.__class__ = debugkeysrepo
25 > repo.__class__ = debugkeysrepo
26 > EOF
26 > EOF
27
27
28 $ hg init tmpa
28 $ hg init tmpa
29 $ cd tmpa
29 $ cd tmpa
30 $ mkcommit kill_me
30 $ mkcommit kill_me
31
31
32 Checking that the feature is properly disabled
32 Checking that the feature is properly disabled
33
33
34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
35 abort: creating obsolete markers is not enabled on this repo
35 abort: creating obsolete markers is not enabled on this repo
36 [255]
36 [255]
37
37
38 Enabling it
38 Enabling it
39
39
40 $ cat >> $HGRCPATH << EOF
40 $ cat >> $HGRCPATH << EOF
41 > [experimental]
41 > [experimental]
42 > evolution=exchange
42 > evolution=exchange
43 > evolution.createmarkers=True
43 > evolution.createmarkers=True
44 > EOF
44 > EOF
45
45
46 Killing a single changeset without replacement
46 Killing a single changeset without replacement
47
47
48 $ hg debugobsolete 0
48 $ hg debugobsolete 0
49 abort: changeset references must be full hexadecimal node identifiers
49 abort: changeset references must be full hexadecimal node identifiers
50 [255]
50 [255]
51 $ hg debugobsolete '00'
51 $ hg debugobsolete '00'
52 abort: changeset references must be full hexadecimal node identifiers
52 abort: changeset references must be full hexadecimal node identifiers
53 [255]
53 [255]
54 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
54 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
55 obsoleted 1 changesets
55 obsoleted 1 changesets
56 $ hg debugobsolete
56 $ hg debugobsolete
57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
58
58
59 (test that mercurial is not confused)
59 (test that mercurial is not confused)
60
60
61 $ hg up null --quiet # having 0 as parent prevents it to be hidden
61 $ hg up null --quiet # having 0 as parent prevents it to be hidden
62 $ hg tip
62 $ hg tip
63 -1:000000000000 (public) [tip ]
63 -1:000000000000 (public) [tip ]
64 $ hg up --hidden tip --quiet
64 $ hg up --hidden tip --quiet
65 updating to a hidden changeset 97b7c2d76b18
65 updating to a hidden changeset 97b7c2d76b18
66 (hidden revision '97b7c2d76b18' is pruned)
66 (hidden revision '97b7c2d76b18' is pruned)
67
67
68 Killing a single changeset with itself should fail
68 Killing a single changeset with itself should fail
69 (simple local safeguard)
69 (simple local safeguard)
70
70
71 $ hg debugobsolete `getid kill_me` `getid kill_me`
71 $ hg debugobsolete `getid kill_me` `getid kill_me`
72 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
72 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
73 [255]
73 [255]
74
74
75 $ cd ..
75 $ cd ..
76
76
77 Killing a single changeset with replacement
77 Killing a single changeset with replacement
78 (and testing the format option)
78 (and testing the format option)
79
79
80 $ hg init tmpb
80 $ hg init tmpb
81 $ cd tmpb
81 $ cd tmpb
82 $ mkcommit a
82 $ mkcommit a
83 $ mkcommit b
83 $ mkcommit b
84 $ mkcommit original_c
84 $ mkcommit original_c
85 $ hg up "desc('b')"
85 $ hg up "desc('b')"
86 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
86 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
87 $ mkcommit new_c
87 $ mkcommit new_c
88 created new head
88 created new head
89 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
89 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
90 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
90 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
91 obsoleted 1 changesets
91 obsoleted 1 changesets
92 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
92 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
93 2:245bde4270cd add original_c
93 2:245bde4270cd add original_c
94 $ hg debugrevlog -cd
94 $ hg debugrevlog -cd
95 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
95 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
96 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
96 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
97 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
97 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
98 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
98 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
99 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
99 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
100 $ hg debugobsolete
100 $ hg debugobsolete
101 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
101 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
102
102
103 (check for version number of the obsstore)
103 (check for version number of the obsstore)
104
104
105 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
105 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
106 \x00 (no-eol) (esc)
106 \x00 (no-eol) (esc)
107
107
108 do it again (it read the obsstore before adding new changeset)
108 do it again (it read the obsstore before adding new changeset)
109
109
110 $ hg up '.^'
110 $ hg up '.^'
111 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
111 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
112 $ mkcommit new_2_c
112 $ mkcommit new_2_c
113 created new head
113 created new head
114 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
114 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
115 obsoleted 1 changesets
115 obsoleted 1 changesets
116 $ hg debugobsolete
116 $ hg debugobsolete
117 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
117 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
118 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
118 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
119
119
120 Register two markers with a missing node
120 Register two markers with a missing node
121
121
122 $ hg up '.^'
122 $ hg up '.^'
123 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
123 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
124 $ mkcommit new_3_c
124 $ mkcommit new_3_c
125 created new head
125 created new head
126 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
126 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
127 obsoleted 1 changesets
127 obsoleted 1 changesets
128 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
128 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
129 $ hg debugobsolete
129 $ hg debugobsolete
130 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
130 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
131 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
131 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
132 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
132 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
133 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
133 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
134
134
135 Test the --index option of debugobsolete command
135 Test the --index option of debugobsolete command
136 $ hg debugobsolete --index
136 $ hg debugobsolete --index
137 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
137 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
138 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
138 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
139 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
139 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
140 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
140 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
141
141
142 Refuse pathological nullid successors
142 Refuse pathological nullid successors
143 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
143 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
144 transaction abort!
144 transaction abort!
145 rollback completed
145 rollback completed
146 abort: bad obsolescence marker detected: invalid successors nullid
146 abort: bad obsolescence marker detected: invalid successors nullid
147 [255]
147 [255]
148
148
149 Check that graphlog detect that a changeset is obsolete:
149 Check that graphlog detect that a changeset is obsolete:
150
150
151 $ hg log -G
151 $ hg log -G
152 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
152 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
153 |
153 |
154 o 1:7c3bad9141dc (draft) [ ] add b
154 o 1:7c3bad9141dc (draft) [ ] add b
155 |
155 |
156 o 0:1f0dee641bb7 (draft) [ ] add a
156 o 0:1f0dee641bb7 (draft) [ ] add a
157
157
158
158
159 check that heads does not report them
159 check that heads does not report them
160
160
161 $ hg heads
161 $ hg heads
162 5:5601fb93a350 (draft) [tip ] add new_3_c
162 5:5601fb93a350 (draft) [tip ] add new_3_c
163 $ hg heads --hidden
163 $ hg heads --hidden
164 5:5601fb93a350 (draft) [tip ] add new_3_c
164 5:5601fb93a350 (draft) [tip ] add new_3_c
165 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
165 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
166 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
166 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
167 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163]
167 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163]
168
168
169
169
170 check that summary does not report them
170 check that summary does not report them
171
171
172 $ hg init ../sink
172 $ hg init ../sink
173 $ echo '[paths]' >> .hg/hgrc
173 $ echo '[paths]' >> .hg/hgrc
174 $ echo 'default=../sink' >> .hg/hgrc
174 $ echo 'default=../sink' >> .hg/hgrc
175 $ hg summary --remote
175 $ hg summary --remote
176 parent: 5:5601fb93a350 tip
176 parent: 5:5601fb93a350 tip
177 add new_3_c
177 add new_3_c
178 branch: default
178 branch: default
179 commit: (clean)
179 commit: (clean)
180 update: (current)
180 update: (current)
181 phases: 3 draft
181 phases: 3 draft
182 remote: 3 outgoing
182 remote: 3 outgoing
183
183
184 $ hg summary --remote --hidden
184 $ hg summary --remote --hidden
185 parent: 5:5601fb93a350 tip
185 parent: 5:5601fb93a350 tip
186 add new_3_c
186 add new_3_c
187 branch: default
187 branch: default
188 commit: (clean)
188 commit: (clean)
189 update: 3 new changesets, 4 branch heads (merge)
189 update: 3 new changesets, 4 branch heads (merge)
190 phases: 6 draft
190 phases: 6 draft
191 remote: 3 outgoing
191 remote: 3 outgoing
192
192
193 check that various commands work well with filtering
193 check that various commands work well with filtering
194
194
195 $ hg tip
195 $ hg tip
196 5:5601fb93a350 (draft) [tip ] add new_3_c
196 5:5601fb93a350 (draft) [tip ] add new_3_c
197 $ hg log -r 6
197 $ hg log -r 6
198 abort: unknown revision '6'!
198 abort: unknown revision '6'!
199 [255]
199 [255]
200 $ hg log -r 4
200 $ hg log -r 4
201 abort: hidden revision '4' was rewritten as: 5601fb93a350!
201 abort: hidden revision '4' was rewritten as: 5601fb93a350!
202 (use --hidden to access hidden revisions)
202 (use --hidden to access hidden revisions)
203 [255]
203 [255]
204 $ hg debugrevspec 'rev(6)'
204 $ hg debugrevspec 'rev(6)'
205 $ hg debugrevspec 'rev(4)'
205 $ hg debugrevspec 'rev(4)'
206 $ hg debugrevspec 'null'
206 $ hg debugrevspec 'null'
207 -1
207 -1
208
208
209 Check that public changeset are not accounted as obsolete:
209 Check that public changeset are not accounted as obsolete:
210
210
211 $ hg --hidden phase --public 2
211 $ hg --hidden phase --public 2
212 1 new phase-divergent changesets
212 1 new phase-divergent changesets
213 $ hg log -G
213 $ hg log -G
214 @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
214 @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
215 |
215 |
216 | o 2:245bde4270cd (public) [ ] add original_c
216 | o 2:245bde4270cd (public) [ ] add original_c
217 |/
217 |/
218 o 1:7c3bad9141dc (public) [ ] add b
218 o 1:7c3bad9141dc (public) [ ] add b
219 |
219 |
220 o 0:1f0dee641bb7 (public) [ ] add a
220 o 0:1f0dee641bb7 (public) [ ] add a
221
221
222
222
223 And that bumped changeset are detected
223 And that bumped changeset are detected
224 --------------------------------------
224 --------------------------------------
225
225
226 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
226 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
227 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
227 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
228 the public changeset
228 the public changeset
229
229
230 $ hg log --hidden -r 'phasedivergent()'
230 $ hg log --hidden -r 'phasedivergent()'
231 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
231 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
232
232
233 And that we can't push bumped changeset
233 And that we can't push bumped changeset
234
234
235 $ hg push ../tmpa -r 0 --force #(make repo related)
235 $ hg push ../tmpa -r 0 --force #(make repo related)
236 pushing to ../tmpa
236 pushing to ../tmpa
237 searching for changes
237 searching for changes
238 warning: repository is unrelated
238 warning: repository is unrelated
239 adding changesets
239 adding changesets
240 adding manifests
240 adding manifests
241 adding file changes
241 adding file changes
242 added 1 changesets with 1 changes to 1 files (+1 heads)
242 added 1 changesets with 1 changes to 1 files (+1 heads)
243 $ hg push ../tmpa
243 $ hg push ../tmpa
244 pushing to ../tmpa
244 pushing to ../tmpa
245 searching for changes
245 searching for changes
246 abort: push includes phase-divergent changeset: 5601fb93a350!
246 abort: push includes phase-divergent changeset: 5601fb93a350!
247 [255]
247 [255]
248
248
249 Fixing "bumped" situation
249 Fixing "bumped" situation
250 We need to create a clone of 5 and add a special marker with a flag
250 We need to create a clone of 5 and add a special marker with a flag
251
251
252 $ hg summary
252 $ hg summary
253 parent: 5:5601fb93a350 tip (phase-divergent)
253 parent: 5:5601fb93a350 tip (phase-divergent)
254 add new_3_c
254 add new_3_c
255 branch: default
255 branch: default
256 commit: (clean)
256 commit: (clean)
257 update: 1 new changesets, 2 branch heads (merge)
257 update: 1 new changesets, 2 branch heads (merge)
258 phases: 1 draft
258 phases: 1 draft
259 phase-divergent: 1 changesets
259 phase-divergent: 1 changesets
260 $ hg up '5^'
260 $ hg up '5^'
261 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
261 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
262 $ hg revert -ar 5
262 $ hg revert -ar 5
263 adding new_3_c
263 adding new_3_c
264 $ hg ci -m 'add n3w_3_c'
264 $ hg ci -m 'add n3w_3_c'
265 created new head
265 created new head
266 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
266 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
267 obsoleted 1 changesets
267 obsoleted 1 changesets
268 $ hg log -r 'phasedivergent()'
268 $ hg log -r 'phasedivergent()'
269 $ hg log -G
269 $ hg log -G
270 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
270 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
271 |
271 |
272 | o 2:245bde4270cd (public) [ ] add original_c
272 | o 2:245bde4270cd (public) [ ] add original_c
273 |/
273 |/
274 o 1:7c3bad9141dc (public) [ ] add b
274 o 1:7c3bad9141dc (public) [ ] add b
275 |
275 |
276 o 0:1f0dee641bb7 (public) [ ] add a
276 o 0:1f0dee641bb7 (public) [ ] add a
277
277
278
278
279 Basic exclusive testing
279 Basic exclusive testing
280
280
281 $ hg log -G --hidden
281 $ hg log -G --hidden
282 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
282 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
283 |
283 |
284 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
284 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
285 |/
285 |/
286 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
286 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
287 |/
287 |/
288 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
288 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
289 |/
289 |/
290 | o 2:245bde4270cd (public) [ ] add original_c
290 | o 2:245bde4270cd (public) [ ] add original_c
291 |/
291 |/
292 o 1:7c3bad9141dc (public) [ ] add b
292 o 1:7c3bad9141dc (public) [ ] add b
293 |
293 |
294 o 0:1f0dee641bb7 (public) [ ] add a
294 o 0:1f0dee641bb7 (public) [ ] add a
295
295
296 $ hg debugobsolete --rev 6f9641995072
296 $ hg debugobsolete --rev 6f9641995072
297 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
297 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
298 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
298 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
299 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
299 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
300 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
300 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
301 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
301 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
302 $ hg debugobsolete --rev 6f9641995072 --exclusive
302 $ hg debugobsolete --rev 6f9641995072 --exclusive
303 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
303 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
304 $ hg debugobsolete --rev 5601fb93a350 --hidden
304 $ hg debugobsolete --rev 5601fb93a350 --hidden
305 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
305 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
306 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
306 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
307 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
307 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
308 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
308 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
309 $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive
309 $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive
310 $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive
310 $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive
311 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
311 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
312 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
312 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
313 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
313 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
314
314
315 $ cd ..
315 $ cd ..
316
316
317 Revision 0 is hidden
317 Revision 0 is hidden
318 --------------------
318 --------------------
319
319
320 $ hg init rev0hidden
320 $ hg init rev0hidden
321 $ cd rev0hidden
321 $ cd rev0hidden
322
322
323 $ mkcommit kill0
323 $ mkcommit kill0
324 $ hg up -q null
324 $ hg up -q null
325 $ hg debugobsolete `getid kill0`
325 $ hg debugobsolete `getid kill0`
326 obsoleted 1 changesets
326 obsoleted 1 changesets
327 $ mkcommit a
327 $ mkcommit a
328 $ mkcommit b
328 $ mkcommit b
329
329
330 Should pick the first visible revision as "repo" node
330 Should pick the first visible revision as "repo" node
331
331
332 $ hg archive ../archive-null
332 $ hg archive ../archive-null
333 $ cat ../archive-null/.hg_archival.txt
333 $ cat ../archive-null/.hg_archival.txt
334 repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
334 repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
335 node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
335 node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
336 branch: default
336 branch: default
337 latesttag: null
337 latesttag: null
338 latesttagdistance: 2
338 latesttagdistance: 2
339 changessincelatesttag: 2
339 changessincelatesttag: 2
340
340
341
341
342 $ cd ..
342 $ cd ..
343
343
344 Can disable transaction summary report
344 Can disable transaction summary report
345
345
346 $ hg init transaction-summary
346 $ hg init transaction-summary
347 $ cd transaction-summary
347 $ cd transaction-summary
348 $ mkcommit a
348 $ mkcommit a
349 $ mkcommit b
349 $ mkcommit b
350 $ hg up -q null
350 $ hg up -q null
351 $ hg --config experimental.evolution.report-instabilities=false debugobsolete `getid a`
351 $ hg --config experimental.evolution.report-instabilities=false debugobsolete `getid a`
352 obsoleted 1 changesets
352 obsoleted 1 changesets
353 $ cd ..
353 $ cd ..
354
354
355 Exchange Test
355 Exchange Test
356 ============================
356 ============================
357
357
358 Destination repo does not have any data
358 Destination repo does not have any data
359 ---------------------------------------
359 ---------------------------------------
360
360
361 Simple incoming test
361 Simple incoming test
362
362
363 $ hg init tmpc
363 $ hg init tmpc
364 $ cd tmpc
364 $ cd tmpc
365 $ hg incoming ../tmpb
365 $ hg incoming ../tmpb
366 comparing with ../tmpb
366 comparing with ../tmpb
367 0:1f0dee641bb7 (public) [ ] add a
367 0:1f0dee641bb7 (public) [ ] add a
368 1:7c3bad9141dc (public) [ ] add b
368 1:7c3bad9141dc (public) [ ] add b
369 2:245bde4270cd (public) [ ] add original_c
369 2:245bde4270cd (public) [ ] add original_c
370 6:6f9641995072 (draft) [tip ] add n3w_3_c
370 6:6f9641995072 (draft) [tip ] add n3w_3_c
371
371
372 Try to pull markers
372 Try to pull markers
373 (extinct changeset are excluded but marker are pushed)
373 (extinct changeset are excluded but marker are pushed)
374
374
375 $ hg pull ../tmpb
375 $ hg pull ../tmpb
376 pulling from ../tmpb
376 pulling from ../tmpb
377 requesting all changes
377 requesting all changes
378 adding changesets
378 adding changesets
379 adding manifests
379 adding manifests
380 adding file changes
380 adding file changes
381 added 4 changesets with 4 changes to 4 files (+1 heads)
381 added 4 changesets with 4 changes to 4 files (+1 heads)
382 5 new obsolescence markers
382 5 new obsolescence markers
383 new changesets 1f0dee641bb7:6f9641995072
383 new changesets 1f0dee641bb7:6f9641995072
384 (run 'hg heads' to see heads, 'hg merge' to merge)
384 (run 'hg heads' to see heads, 'hg merge' to merge)
385 $ hg debugobsolete
385 $ hg debugobsolete
386 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
386 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
387 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
387 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
388 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
388 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
389 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
389 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
390 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
390 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
391
391
392 Rollback//Transaction support
392 Rollback//Transaction support
393
393
394 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
394 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
395 $ hg debugobsolete
395 $ hg debugobsolete
396 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
396 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
397 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
397 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
398 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
398 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
399 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
399 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
400 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
400 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
401 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
401 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
402 $ hg rollback -n
402 $ hg rollback -n
403 repository tip rolled back to revision 3 (undo debugobsolete)
403 repository tip rolled back to revision 3 (undo debugobsolete)
404 $ hg rollback
404 $ hg rollback
405 repository tip rolled back to revision 3 (undo debugobsolete)
405 repository tip rolled back to revision 3 (undo debugobsolete)
406 $ hg debugobsolete
406 $ hg debugobsolete
407 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
407 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
408 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
408 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
409 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
409 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
410 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
410 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
411 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
411 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
412
412
413 $ cd ..
413 $ cd ..
414
414
415 Try to push markers
415 Try to push markers
416
416
417 $ hg init tmpd
417 $ hg init tmpd
418 $ hg -R tmpb push tmpd
418 $ hg -R tmpb push tmpd
419 pushing to tmpd
419 pushing to tmpd
420 searching for changes
420 searching for changes
421 adding changesets
421 adding changesets
422 adding manifests
422 adding manifests
423 adding file changes
423 adding file changes
424 added 4 changesets with 4 changes to 4 files (+1 heads)
424 added 4 changesets with 4 changes to 4 files (+1 heads)
425 5 new obsolescence markers
425 5 new obsolescence markers
426 $ hg -R tmpd debugobsolete | sort
426 $ hg -R tmpd debugobsolete | sort
427 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
427 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
428 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
428 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
429 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
429 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
430 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
430 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
431 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
431 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
432
432
433 Check obsolete keys are exchanged only if source has an obsolete store
433 Check obsolete keys are exchanged only if source has an obsolete store
434
434
435 $ hg init empty
435 $ hg init empty
436 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
436 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
437 pushing to tmpd
437 pushing to tmpd
438 listkeys phases
438 listkeys phases
439 listkeys bookmarks
439 listkeys bookmarks
440 no changes found
440 no changes found
441 listkeys phases
441 listkeys phases
442 [1]
442 [1]
443
443
444 clone support
444 clone support
445 (markers are copied and extinct changesets are included to allow hardlinks)
445 (markers are copied and extinct changesets are included to allow hardlinks)
446
446
447 $ hg clone tmpb clone-dest
447 $ hg clone tmpb clone-dest
448 updating to branch default
448 updating to branch default
449 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
449 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
450 $ hg -R clone-dest log -G --hidden
450 $ hg -R clone-dest log -G --hidden
451 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
451 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
452 |
452 |
453 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
453 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
454 |/
454 |/
455 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
455 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
456 |/
456 |/
457 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
457 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
458 |/
458 |/
459 | o 2:245bde4270cd (public) [ ] add original_c
459 | o 2:245bde4270cd (public) [ ] add original_c
460 |/
460 |/
461 o 1:7c3bad9141dc (public) [ ] add b
461 o 1:7c3bad9141dc (public) [ ] add b
462 |
462 |
463 o 0:1f0dee641bb7 (public) [ ] add a
463 o 0:1f0dee641bb7 (public) [ ] add a
464
464
465 $ hg -R clone-dest debugobsolete
465 $ hg -R clone-dest debugobsolete
466 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
466 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
467 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
467 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
468 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
468 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
469 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
469 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
470 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
470 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
471
471
472
472
473 Destination repo have existing data
473 Destination repo have existing data
474 ---------------------------------------
474 ---------------------------------------
475
475
476 On pull
476 On pull
477
477
478 $ hg init tmpe
478 $ hg init tmpe
479 $ cd tmpe
479 $ cd tmpe
480 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
480 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
481 $ hg pull ../tmpb
481 $ hg pull ../tmpb
482 pulling from ../tmpb
482 pulling from ../tmpb
483 requesting all changes
483 requesting all changes
484 adding changesets
484 adding changesets
485 adding manifests
485 adding manifests
486 adding file changes
486 adding file changes
487 added 4 changesets with 4 changes to 4 files (+1 heads)
487 added 4 changesets with 4 changes to 4 files (+1 heads)
488 5 new obsolescence markers
488 5 new obsolescence markers
489 new changesets 1f0dee641bb7:6f9641995072
489 new changesets 1f0dee641bb7:6f9641995072
490 (run 'hg heads' to see heads, 'hg merge' to merge)
490 (run 'hg heads' to see heads, 'hg merge' to merge)
491 $ hg debugobsolete
491 $ hg debugobsolete
492 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
492 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
493 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
493 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
494 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
494 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
495 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
495 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
496 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
496 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
497 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
497 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
498
498
499
499
500 On push
500 On push
501
501
502 $ hg push ../tmpc
502 $ hg push ../tmpc
503 pushing to ../tmpc
503 pushing to ../tmpc
504 searching for changes
504 searching for changes
505 no changes found
505 no changes found
506 1 new obsolescence markers
506 1 new obsolescence markers
507 [1]
507 [1]
508 $ hg -R ../tmpc debugobsolete
508 $ hg -R ../tmpc debugobsolete
509 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
509 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
510 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
510 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
511 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
511 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
512 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
512 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
513 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
513 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
514 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
514 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
515
515
516 detect outgoing obsolete and unstable
516 detect outgoing obsolete and unstable
517 ---------------------------------------
517 ---------------------------------------
518
518
519
519
520 $ hg log -G
520 $ hg log -G
521 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
521 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
522 |
522 |
523 | o 2:245bde4270cd (public) [ ] add original_c
523 | o 2:245bde4270cd (public) [ ] add original_c
524 |/
524 |/
525 o 1:7c3bad9141dc (public) [ ] add b
525 o 1:7c3bad9141dc (public) [ ] add b
526 |
526 |
527 o 0:1f0dee641bb7 (public) [ ] add a
527 o 0:1f0dee641bb7 (public) [ ] add a
528
528
529 $ hg up 'desc("n3w_3_c")'
529 $ hg up 'desc("n3w_3_c")'
530 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
530 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
531 $ mkcommit original_d
531 $ mkcommit original_d
532 $ mkcommit original_e
532 $ mkcommit original_e
533 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
533 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
534 obsoleted 1 changesets
534 obsoleted 1 changesets
535 1 new orphan changesets
535 1 new orphan changesets
536 $ hg debugobsolete | grep `getid original_d`
536 $ hg debugobsolete | grep `getid original_d`
537 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
537 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
538 $ hg log -r 'obsolete()'
538 $ hg log -r 'obsolete()'
539 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
539 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
540 $ hg summary
540 $ hg summary
541 parent: 5:cda648ca50f5 tip (orphan)
541 parent: 5:cda648ca50f5 tip (orphan)
542 add original_e
542 add original_e
543 branch: default
543 branch: default
544 commit: (clean)
544 commit: (clean)
545 update: 1 new changesets, 2 branch heads (merge)
545 update: 1 new changesets, 2 branch heads (merge)
546 phases: 3 draft
546 phases: 3 draft
547 orphan: 1 changesets
547 orphan: 1 changesets
548 $ hg log -G -r '::orphan()'
548 $ hg log -G -r '::orphan()'
549 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
549 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
550 |
550 |
551 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
551 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
552 |
552 |
553 o 3:6f9641995072 (draft) [ ] add n3w_3_c
553 o 3:6f9641995072 (draft) [ ] add n3w_3_c
554 |
554 |
555 o 1:7c3bad9141dc (public) [ ] add b
555 o 1:7c3bad9141dc (public) [ ] add b
556 |
556 |
557 o 0:1f0dee641bb7 (public) [ ] add a
557 o 0:1f0dee641bb7 (public) [ ] add a
558
558
559
559
560 refuse to push obsolete changeset
560 refuse to push obsolete changeset
561
561
562 $ hg push ../tmpc/ -r 'desc("original_d")'
562 $ hg push ../tmpc/ -r 'desc("original_d")'
563 pushing to ../tmpc/
563 pushing to ../tmpc/
564 searching for changes
564 searching for changes
565 abort: push includes obsolete changeset: 94b33453f93b!
565 abort: push includes obsolete changeset: 94b33453f93b!
566 [255]
566 [255]
567
567
568 refuse to push unstable changeset
568 refuse to push unstable changeset
569
569
570 $ hg push ../tmpc/
570 $ hg push ../tmpc/
571 pushing to ../tmpc/
571 pushing to ../tmpc/
572 searching for changes
572 searching for changes
573 abort: push includes orphan changeset: cda648ca50f5!
573 abort: push includes orphan changeset: cda648ca50f5!
574 [255]
574 [255]
575
575
576 Test that extinct changeset are properly detected
576 Test that extinct changeset are properly detected
577
577
578 $ hg log -r 'extinct()'
578 $ hg log -r 'extinct()'
579
579
580 Don't try to push extinct changeset
580 Don't try to push extinct changeset
581
581
582 $ hg init ../tmpf
582 $ hg init ../tmpf
583 $ hg out ../tmpf
583 $ hg out ../tmpf
584 comparing with ../tmpf
584 comparing with ../tmpf
585 searching for changes
585 searching for changes
586 0:1f0dee641bb7 (public) [ ] add a
586 0:1f0dee641bb7 (public) [ ] add a
587 1:7c3bad9141dc (public) [ ] add b
587 1:7c3bad9141dc (public) [ ] add b
588 2:245bde4270cd (public) [ ] add original_c
588 2:245bde4270cd (public) [ ] add original_c
589 3:6f9641995072 (draft) [ ] add n3w_3_c
589 3:6f9641995072 (draft) [ ] add n3w_3_c
590 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
590 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
591 5:cda648ca50f5 (draft orphan) [tip ] add original_e
591 5:cda648ca50f5 (draft orphan) [tip ] add original_e
592 $ hg push ../tmpf -f # -f because be push unstable too
592 $ hg push ../tmpf -f # -f because be push unstable too
593 pushing to ../tmpf
593 pushing to ../tmpf
594 searching for changes
594 searching for changes
595 adding changesets
595 adding changesets
596 adding manifests
596 adding manifests
597 adding file changes
597 adding file changes
598 added 6 changesets with 6 changes to 6 files (+1 heads)
598 added 6 changesets with 6 changes to 6 files (+1 heads)
599 7 new obsolescence markers
599 7 new obsolescence markers
600 1 new orphan changesets
600 1 new orphan changesets
601
601
602 no warning displayed
602 no warning displayed
603
603
604 $ hg push ../tmpf
604 $ hg push ../tmpf
605 pushing to ../tmpf
605 pushing to ../tmpf
606 searching for changes
606 searching for changes
607 no changes found
607 no changes found
608 [1]
608 [1]
609
609
610 Do not warn about new head when the new head is a successors of a remote one
610 Do not warn about new head when the new head is a successors of a remote one
611
611
612 $ hg log -G
612 $ hg log -G
613 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
613 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
614 |
614 |
615 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
615 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
616 |
616 |
617 o 3:6f9641995072 (draft) [ ] add n3w_3_c
617 o 3:6f9641995072 (draft) [ ] add n3w_3_c
618 |
618 |
619 | o 2:245bde4270cd (public) [ ] add original_c
619 | o 2:245bde4270cd (public) [ ] add original_c
620 |/
620 |/
621 o 1:7c3bad9141dc (public) [ ] add b
621 o 1:7c3bad9141dc (public) [ ] add b
622 |
622 |
623 o 0:1f0dee641bb7 (public) [ ] add a
623 o 0:1f0dee641bb7 (public) [ ] add a
624
624
625 $ hg up -q 'desc(n3w_3_c)'
625 $ hg up -q 'desc(n3w_3_c)'
626 $ mkcommit obsolete_e
626 $ mkcommit obsolete_e
627 created new head
627 created new head
628 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \
628 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \
629 > -u 'test <test@example.net>'
629 > -u 'test <test@example.net>'
630 obsoleted 1 changesets
630 obsoleted 1 changesets
631 $ hg outgoing ../tmpf # parasite hg outgoing testin
631 $ hg outgoing ../tmpf # parasite hg outgoing testin
632 comparing with ../tmpf
632 comparing with ../tmpf
633 searching for changes
633 searching for changes
634 6:3de5eca88c00 (draft) [tip ] add obsolete_e
634 6:3de5eca88c00 (draft) [tip ] add obsolete_e
635 $ hg push ../tmpf
635 $ hg push ../tmpf
636 pushing to ../tmpf
636 pushing to ../tmpf
637 searching for changes
637 searching for changes
638 adding changesets
638 adding changesets
639 adding manifests
639 adding manifests
640 adding file changes
640 adding file changes
641 added 1 changesets with 1 changes to 1 files (+1 heads)
641 added 1 changesets with 1 changes to 1 files (+1 heads)
642 1 new obsolescence markers
642 1 new obsolescence markers
643 obsoleted 1 changesets
643 obsoleted 1 changesets
644
644
645 test relevance computation
645 test relevance computation
646 ---------------------------------------
646 ---------------------------------------
647
647
648 Checking simple case of "marker relevance".
648 Checking simple case of "marker relevance".
649
649
650
650
651 Reminder of the repo situation
651 Reminder of the repo situation
652
652
653 $ hg log --hidden --graph
653 $ hg log --hidden --graph
654 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
654 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
655 |
655 |
656 | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>]
656 | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>]
657 | |
657 | |
658 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
658 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
659 |/
659 |/
660 o 3:6f9641995072 (draft) [ ] add n3w_3_c
660 o 3:6f9641995072 (draft) [ ] add n3w_3_c
661 |
661 |
662 | o 2:245bde4270cd (public) [ ] add original_c
662 | o 2:245bde4270cd (public) [ ] add original_c
663 |/
663 |/
664 o 1:7c3bad9141dc (public) [ ] add b
664 o 1:7c3bad9141dc (public) [ ] add b
665 |
665 |
666 o 0:1f0dee641bb7 (public) [ ] add a
666 o 0:1f0dee641bb7 (public) [ ] add a
667
667
668
668
669 List of all markers
669 List of all markers
670
670
671 $ hg debugobsolete
671 $ hg debugobsolete
672 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
672 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
673 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
673 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
674 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
674 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
675 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
675 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
676 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
676 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
677 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
677 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
678 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
678 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
679 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
679 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
680
680
681 List of changesets with no chain
681 List of changesets with no chain
682
682
683 $ hg debugobsolete --hidden --rev ::2
683 $ hg debugobsolete --hidden --rev ::2
684
684
685 List of changesets that are included on marker chain
685 List of changesets that are included on marker chain
686
686
687 $ hg debugobsolete --hidden --rev 6
687 $ hg debugobsolete --hidden --rev 6
688 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
688 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
689
689
690 List of changesets with a longer chain, (including a pruned children)
690 List of changesets with a longer chain, (including a pruned children)
691
691
692 $ hg debugobsolete --hidden --rev 3
692 $ hg debugobsolete --hidden --rev 3
693 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
693 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
694 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
694 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
695 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
695 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
696 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
696 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
697 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
697 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
698 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
698 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
699 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
699 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
700
700
701 List of both
701 List of both
702
702
703 $ hg debugobsolete --hidden --rev 3::6
703 $ hg debugobsolete --hidden --rev 3::6
704 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
704 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
705 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
705 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
706 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
706 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
707 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
707 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
708 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
708 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
709 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
709 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
710 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
710 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
711 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
711 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
712
712
713 List of all markers in JSON
713 List of all markers in JSON
714
714
715 $ hg debugobsolete -Tjson
715 $ hg debugobsolete -Tjson
716 [
716 [
717 {
717 {
718 "date": [1339.0, 0],
718 "date": [1339.0, 0],
719 "flag": 0,
719 "flag": 0,
720 "metadata": {"user": "test"},
720 "metadata": {"user": "test"},
721 "prednode": "1339133913391339133913391339133913391339",
721 "prednode": "1339133913391339133913391339133913391339",
722 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
722 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
723 },
723 },
724 {
724 {
725 "date": [1339.0, 0],
725 "date": [1339.0, 0],
726 "flag": 0,
726 "flag": 0,
727 "metadata": {"user": "test"},
727 "metadata": {"user": "test"},
728 "prednode": "1337133713371337133713371337133713371337",
728 "prednode": "1337133713371337133713371337133713371337",
729 "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"]
729 "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"]
730 },
730 },
731 {
731 {
732 "date": [121.0, 120],
732 "date": [121.0, 120],
733 "flag": 12,
733 "flag": 12,
734 "metadata": {"user": "test"},
734 "metadata": {"user": "test"},
735 "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca",
735 "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca",
736 "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"]
736 "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"]
737 },
737 },
738 {
738 {
739 "date": [1338.0, 0],
739 "date": [1338.0, 0],
740 "flag": 1,
740 "flag": 1,
741 "metadata": {"user": "test"},
741 "metadata": {"user": "test"},
742 "prednode": "5601fb93a350734d935195fee37f4054c529ff39",
742 "prednode": "5601fb93a350734d935195fee37f4054c529ff39",
743 "succnodes": ["6f96419950729f3671185b847352890f074f7557"]
743 "succnodes": ["6f96419950729f3671185b847352890f074f7557"]
744 },
744 },
745 {
745 {
746 "date": [1338.0, 0],
746 "date": [1338.0, 0],
747 "flag": 0,
747 "flag": 0,
748 "metadata": {"user": "test"},
748 "metadata": {"user": "test"},
749 "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00",
749 "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00",
750 "succnodes": ["1337133713371337133713371337133713371337"]
750 "succnodes": ["1337133713371337133713371337133713371337"]
751 },
751 },
752 {
752 {
753 "date": [1337.0, 0],
753 "date": [1337.0, 0],
754 "flag": 0,
754 "flag": 0,
755 "metadata": {"user": "test"},
755 "metadata": {"user": "test"},
756 "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f",
756 "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f",
757 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
757 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
758 },
758 },
759 {
759 {
760 "date": [0.0, 0],
760 "date": [0.0, 0],
761 "flag": 0,
761 "flag": 0,
762 "metadata": {"user": "test"},
762 "metadata": {"user": "test"},
763 "parentnodes": ["6f96419950729f3671185b847352890f074f7557"],
763 "parentnodes": ["6f96419950729f3671185b847352890f074f7557"],
764 "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1",
764 "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1",
765 "succnodes": []
765 "succnodes": []
766 },
766 },
767 {
767 {
768 "date": *, (glob)
768 "date": *, (glob)
769 "flag": 0,
769 "flag": 0,
770 "metadata": {"user": "test <test@example.net>"},
770 "metadata": {"user": "test <test@example.net>"},
771 "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9",
771 "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9",
772 "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"]
772 "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"]
773 }
773 }
774 ]
774 ]
775
775
776 Template keywords
776 Template keywords
777
777
778 $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n'
778 $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n'
779 3de5eca88c00 ????-??-?? (glob)
779 3de5eca88c00 ????-??-?? (glob)
780 $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n'
780 $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n'
781 user=test <test@example.net>
781 user=test <test@example.net>
782 $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n'
782 $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n'
783 'user': 'test <test@example.net>'
783 'user': 'test <test@example.net>'
784 'user': 'test <test@example.net>'
784 'user': 'test <test@example.net>'
785 $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n'
785 $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n'
786 3de5eca88c00aa039da7399a220f4a5221faa585
786 3de5eca88c00aa039da7399a220f4a5221faa585
787 3de5eca88c00aa039da7399a220f4a5221faa585
787 3de5eca88c00aa039da7399a220f4a5221faa585
788 $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n'
788 $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n'
789 0 test <test@example.net>
789 0 test <test@example.net>
790
790
791 Test the debug output for exchange
791 Test the debug output for exchange
792 ----------------------------------
792 ----------------------------------
793
793
794 $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2
794 $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2
795 pulling from ../tmpb
795 pulling from ../tmpb
796 searching for changes
796 searching for changes
797 no changes found
797 no changes found
798 obsmarker-exchange: 346 bytes received
798 obsmarker-exchange: 346 bytes received
799
799
800 check hgweb does not explode
800 check hgweb does not explode
801 ====================================
801 ====================================
802
802
803 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
803 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
804 adding changesets
804 adding changesets
805 adding manifests
805 adding manifests
806 adding file changes
806 adding file changes
807 added 62 changesets with 63 changes to 9 files (+60 heads)
807 added 62 changesets with 63 changes to 9 files (+60 heads)
808 new changesets 50c51b361e60:c15e9edfca13
808 new changesets 50c51b361e60:c15e9edfca13
809 (run 'hg heads .' to see heads, 'hg merge' to merge)
809 (run 'hg heads .' to see heads, 'hg merge' to merge)
810 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
810 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
811 > do
811 > do
812 > hg debugobsolete $node
812 > hg debugobsolete $node
813 > done
813 > done
814 obsoleted 1 changesets
814 obsoleted 1 changesets
815 obsoleted 1 changesets
815 obsoleted 1 changesets
816 obsoleted 1 changesets
816 obsoleted 1 changesets
817 obsoleted 1 changesets
817 obsoleted 1 changesets
818 obsoleted 1 changesets
818 obsoleted 1 changesets
819 obsoleted 1 changesets
819 obsoleted 1 changesets
820 obsoleted 1 changesets
820 obsoleted 1 changesets
821 obsoleted 1 changesets
821 obsoleted 1 changesets
822 obsoleted 1 changesets
822 obsoleted 1 changesets
823 obsoleted 1 changesets
823 obsoleted 1 changesets
824 obsoleted 1 changesets
824 obsoleted 1 changesets
825 obsoleted 1 changesets
825 obsoleted 1 changesets
826 obsoleted 1 changesets
826 obsoleted 1 changesets
827 obsoleted 1 changesets
827 obsoleted 1 changesets
828 obsoleted 1 changesets
828 obsoleted 1 changesets
829 obsoleted 1 changesets
829 obsoleted 1 changesets
830 obsoleted 1 changesets
830 obsoleted 1 changesets
831 obsoleted 1 changesets
831 obsoleted 1 changesets
832 obsoleted 1 changesets
832 obsoleted 1 changesets
833 obsoleted 1 changesets
833 obsoleted 1 changesets
834 obsoleted 1 changesets
834 obsoleted 1 changesets
835 obsoleted 1 changesets
835 obsoleted 1 changesets
836 obsoleted 1 changesets
836 obsoleted 1 changesets
837 obsoleted 1 changesets
837 obsoleted 1 changesets
838 obsoleted 1 changesets
838 obsoleted 1 changesets
839 obsoleted 1 changesets
839 obsoleted 1 changesets
840 obsoleted 1 changesets
840 obsoleted 1 changesets
841 obsoleted 1 changesets
841 obsoleted 1 changesets
842 obsoleted 1 changesets
842 obsoleted 1 changesets
843 obsoleted 1 changesets
843 obsoleted 1 changesets
844 obsoleted 1 changesets
844 obsoleted 1 changesets
845 obsoleted 1 changesets
845 obsoleted 1 changesets
846 obsoleted 1 changesets
846 obsoleted 1 changesets
847 obsoleted 1 changesets
847 obsoleted 1 changesets
848 obsoleted 1 changesets
848 obsoleted 1 changesets
849 obsoleted 1 changesets
849 obsoleted 1 changesets
850 obsoleted 1 changesets
850 obsoleted 1 changesets
851 obsoleted 1 changesets
851 obsoleted 1 changesets
852 obsoleted 1 changesets
852 obsoleted 1 changesets
853 obsoleted 1 changesets
853 obsoleted 1 changesets
854 obsoleted 1 changesets
854 obsoleted 1 changesets
855 obsoleted 1 changesets
855 obsoleted 1 changesets
856 obsoleted 1 changesets
856 obsoleted 1 changesets
857 obsoleted 1 changesets
857 obsoleted 1 changesets
858 obsoleted 1 changesets
858 obsoleted 1 changesets
859 obsoleted 1 changesets
859 obsoleted 1 changesets
860 obsoleted 1 changesets
860 obsoleted 1 changesets
861 obsoleted 1 changesets
861 obsoleted 1 changesets
862 obsoleted 1 changesets
862 obsoleted 1 changesets
863 obsoleted 1 changesets
863 obsoleted 1 changesets
864 obsoleted 1 changesets
864 obsoleted 1 changesets
865 obsoleted 1 changesets
865 obsoleted 1 changesets
866 obsoleted 1 changesets
866 obsoleted 1 changesets
867 obsoleted 1 changesets
867 obsoleted 1 changesets
868 obsoleted 1 changesets
868 obsoleted 1 changesets
869 obsoleted 1 changesets
869 obsoleted 1 changesets
870 obsoleted 1 changesets
870 obsoleted 1 changesets
871 obsoleted 1 changesets
871 obsoleted 1 changesets
872 obsoleted 1 changesets
872 obsoleted 1 changesets
873 obsoleted 1 changesets
873 obsoleted 1 changesets
874 $ hg up tip
874 $ hg up tip
875 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
875 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
876
876
877 #if serve
877 #if serve
878
878
879 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
879 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
880 $ cat hg.pid >> $DAEMON_PIDS
880 $ cat hg.pid >> $DAEMON_PIDS
881
881
882 check changelog view
882 check changelog view
883
883
884 $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/'
884 $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/'
885 200 Script output follows
885 200 Script output follows
886
886
887 check graph view
887 check graph view
888
888
889 $ get-with-headers.py --headeronly localhost:$HGPORT 'graph'
889 $ get-with-headers.py --headeronly localhost:$HGPORT 'graph'
890 200 Script output follows
890 200 Script output follows
891
891
892 check filelog view
892 check filelog view
893
893
894 $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
894 $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
895 200 Script output follows
895 200 Script output follows
896
896
897 check filelog view for hidden commits (obsolete ones are hidden here)
897 check filelog view for hidden commits (obsolete ones are hidden here)
898
898
899 $ get-with-headers.py localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | grep obsolete
899 $ get-with-headers.py localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' | grep obsolete
900 [1]
900 [1]
901
901
902 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68'
902 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68'
903 200 Script output follows
903 200 Script output follows
904 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
904 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
905 404 Not Found
905 404 Not Found
906 [1]
906 [1]
907
907
908 check that web.view config option:
908 check that web.view config option:
909
909
910 $ killdaemons.py hg.pid
910 $ killdaemons.py hg.pid
911 $ cat >> .hg/hgrc << EOF
911 $ cat >> .hg/hgrc << EOF
912 > [web]
912 > [web]
913 > view=all
913 > view=all
914 > EOF
914 > EOF
915 $ wait
915 $ wait
916 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
916 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
917 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
917 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
918 200 Script output follows
918 200 Script output follows
919 $ killdaemons.py hg.pid
919 $ killdaemons.py hg.pid
920
920
921 Checking _enable=False warning if obsolete marker exists
921 Checking _enable=False warning if obsolete marker exists
922
922
923 $ echo '[experimental]' >> $HGRCPATH
923 $ echo '[experimental]' >> $HGRCPATH
924 $ echo "evolution=" >> $HGRCPATH
924 $ echo "evolution=" >> $HGRCPATH
925 $ hg log -r tip
925 $ hg log -r tip
926 68:c15e9edfca13 (draft) [tip ] add celestine
926 68:c15e9edfca13 (draft) [tip ] add celestine
927
927
928 reenable for later test
928 reenable for later test
929
929
930 $ echo '[experimental]' >> $HGRCPATH
930 $ echo '[experimental]' >> $HGRCPATH
931 $ echo "evolution.exchange=True" >> $HGRCPATH
931 $ echo "evolution.exchange=True" >> $HGRCPATH
932 $ echo "evolution.createmarkers=True" >> $HGRCPATH
932 $ echo "evolution.createmarkers=True" >> $HGRCPATH
933
933
934 $ rm hg.pid access.log errors.log
934 $ rm hg.pid access.log errors.log
935 #endif
935 #endif
936
936
937 Several troubles on the same changeset (create an unstable and bumped changeset)
937 Several troubles on the same changeset (create an unstable and bumped changeset)
938
938
939 $ hg debugobsolete `getid obsolete_e`
939 $ hg debugobsolete `getid obsolete_e`
940 obsoleted 1 changesets
940 obsoleted 1 changesets
941 2 new orphan changesets
941 2 new orphan changesets
942 $ hg debugobsolete `getid original_c` `getid babar`
942 $ hg debugobsolete `getid original_c` `getid babar`
943 1 new phase-divergent changesets
943 1 new phase-divergent changesets
944 $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()'
944 $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()'
945 changeset: 7:50c51b361e60
945 changeset: 7:50c51b361e60
946 user: test
946 user: test
947 date: Thu Jan 01 00:00:00 1970 +0000
947 date: Thu Jan 01 00:00:00 1970 +0000
948 instability: orphan, phase-divergent
948 instability: orphan, phase-divergent
949 summary: add babar
949 summary: add babar
950
950
951
951
952 test the "obsolete" templatekw
952 test the "obsolete" templatekw
953
953
954 $ hg log -r 'obsolete()'
954 $ hg log -r 'obsolete()'
955 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned]
955 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned]
956
956
957 test the "troubles" templatekw
957 test the "troubles" templatekw
958
958
959 $ hg log -r 'phasedivergent() and orphan()'
959 $ hg log -r 'phasedivergent() and orphan()'
960 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar
960 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar
961
961
962 test the default cmdline template
962 test the default cmdline template
963
963
964 $ hg log -T default -r 'phasedivergent()'
964 $ hg log -T default -r 'phasedivergent()'
965 changeset: 7:50c51b361e60
965 changeset: 7:50c51b361e60
966 user: test
966 user: test
967 date: Thu Jan 01 00:00:00 1970 +0000
967 date: Thu Jan 01 00:00:00 1970 +0000
968 instability: orphan, phase-divergent
968 instability: orphan, phase-divergent
969 summary: add babar
969 summary: add babar
970
970
971 $ hg log -T default -r 'obsolete()'
971 $ hg log -T default -r 'obsolete()'
972 changeset: 6:3de5eca88c00
972 changeset: 6:3de5eca88c00
973 parent: 3:6f9641995072
973 parent: 3:6f9641995072
974 user: test
974 user: test
975 date: Thu Jan 01 00:00:00 1970 +0000
975 date: Thu Jan 01 00:00:00 1970 +0000
976 obsolete: pruned
976 obsolete: pruned
977 summary: add obsolete_e
977 summary: add obsolete_e
978
978
979
979
980 test the obsolete labels
980 test the obsolete labels
981
981
982 $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()'
982 $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()'
983 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
983 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
984 [log.user|user: test]
984 [log.user|user: test]
985 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
985 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
986 [log.instability|instability: orphan, phase-divergent]
986 [log.instability|instability: orphan, phase-divergent]
987 [log.summary|summary: add babar]
987 [log.summary|summary: add babar]
988
988
989
989
990 $ hg log -T default -r 'phasedivergent()' --color=debug
990 $ hg log -T default -r 'phasedivergent()' --color=debug
991 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
991 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
992 [log.user|user: test]
992 [log.user|user: test]
993 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
993 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
994 [log.instability|instability: orphan, phase-divergent]
994 [log.instability|instability: orphan, phase-divergent]
995 [log.summary|summary: add babar]
995 [log.summary|summary: add babar]
996
996
997
997
998 $ hg log --config ui.logtemplate= --color=debug -r "obsolete()"
998 $ hg log --config ui.logtemplate= --color=debug -r "obsolete()"
999 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
999 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
1000 [log.parent changeset.draft|parent: 3:6f9641995072]
1000 [log.parent changeset.draft|parent: 3:6f9641995072]
1001 [log.user|user: test]
1001 [log.user|user: test]
1002 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1002 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1003 [log.obsfate|obsolete: pruned]
1003 [log.obsfate|obsolete: pruned]
1004 [log.summary|summary: add obsolete_e]
1004 [log.summary|summary: add obsolete_e]
1005
1005
1006
1006
1007 $ hg log -T default -r 'obsolete()' --color=debug
1007 $ hg log -T default -r 'obsolete()' --color=debug
1008 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
1008 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
1009 [log.parent changeset.draft|parent: 3:6f9641995072]
1009 [log.parent changeset.draft|parent: 3:6f9641995072]
1010 [log.user|user: test]
1010 [log.user|user: test]
1011 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1011 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
1012 [log.obsfate|obsolete: pruned]
1012 [log.obsfate|obsolete: pruned]
1013 [log.summary|summary: add obsolete_e]
1013 [log.summary|summary: add obsolete_e]
1014
1014
1015
1015
1016 test summary output
1016 test summary output
1017
1017
1018 $ hg up -r 'phasedivergent() and orphan()'
1018 $ hg up -r 'phasedivergent() and orphan()'
1019 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1019 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1020 $ hg summary
1020 $ hg summary
1021 parent: 7:50c51b361e60 (orphan, phase-divergent)
1021 parent: 7:50c51b361e60 (orphan, phase-divergent)
1022 add babar
1022 add babar
1023 branch: default
1023 branch: default
1024 commit: (clean)
1024 commit: (clean)
1025 update: 2 new changesets (update)
1025 update: 2 new changesets (update)
1026 phases: 4 draft
1026 phases: 4 draft
1027 orphan: 2 changesets
1027 orphan: 2 changesets
1028 phase-divergent: 1 changesets
1028 phase-divergent: 1 changesets
1029 $ hg up -r 'obsolete()'
1029 $ hg up -r 'obsolete()'
1030 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1030 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1031 $ hg summary
1031 $ hg summary
1032 parent: 6:3de5eca88c00 (obsolete)
1032 parent: 6:3de5eca88c00 (obsolete)
1033 add obsolete_e
1033 add obsolete_e
1034 branch: default
1034 branch: default
1035 commit: (clean)
1035 commit: (clean)
1036 update: 3 new changesets (update)
1036 update: 3 new changesets (update)
1037 phases: 4 draft
1037 phases: 4 draft
1038 orphan: 2 changesets
1038 orphan: 2 changesets
1039 phase-divergent: 1 changesets
1039 phase-divergent: 1 changesets
1040
1040
1041 test debugwhyunstable output
1041 test debugwhyunstable output
1042
1042
1043 $ hg debugwhyunstable 50c51b361e60
1043 $ hg debugwhyunstable 50c51b361e60
1044 orphan: obsolete parent 3de5eca88c00aa039da7399a220f4a5221faa585
1044 orphan: obsolete parent 3de5eca88c00aa039da7399a220f4a5221faa585
1045 phase-divergent: immutable predecessor 245bde4270cd1072a27757984f9cda8ba26f08ca
1045 phase-divergent: immutable predecessor 245bde4270cd1072a27757984f9cda8ba26f08ca
1046
1046
1047 #if serve
1047 #if serve
1048
1048
1049 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1049 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1050 $ cat hg.pid >> $DAEMON_PIDS
1050 $ cat hg.pid >> $DAEMON_PIDS
1051
1051
1052 check obsolete changeset
1052 check obsolete changeset
1053
1053
1054 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '<span class="obsolete">'
1054 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=paper' | grep '<span class="obsolete">'
1055 <span class="phase">draft</span> <span class="obsolete">obsolete</span>
1055 <span class="phase">draft</span> <span class="obsolete">obsolete</span>
1056 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '<span class="obsolete">'
1056 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=coal' | grep '<span class="obsolete">'
1057 <span class="phase">draft</span> <span class="obsolete">obsolete</span>
1057 <span class="phase">draft</span> <span class="obsolete">obsolete</span>
1058 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '<span class="logtags">'
1058 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=gitweb' | grep '<span class="logtags">'
1059 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span>
1059 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span>
1060 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '<span class="logtags">'
1060 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=monoblue' | grep '<span class="logtags">'
1061 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span>
1061 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span>
1062 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"'
1062 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"'
1063 <th class="obsolete">obsolete:</th>
1063 <th class="obsolete">obsolete:</th>
1064 <td class="obsolete">pruned by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
1064 <td class="obsolete">pruned by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
1065
1065
1066 check changeset with instabilities
1066 check changeset with instabilities
1067
1067
1068 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=paper' | grep '<span class="instability">'
1068 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=paper' | grep '<span class="instability">'
1069 <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span>
1069 <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span>
1070 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=coal' | grep '<span class="instability">'
1070 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=coal' | grep '<span class="instability">'
1071 <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span>
1071 <span class="phase">draft</span> <span class="instability">orphan</span> <span class="instability">phase-divergent</span>
1072 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=gitweb' | grep '<span class="logtags">'
1072 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=gitweb' | grep '<span class="logtags">'
1073 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span>
1073 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span>
1074 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=monoblue' | grep '<span class="logtags">'
1074 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=monoblue' | grep '<span class="logtags">'
1075 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span>
1075 <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="instabilitytag" title="orphan">orphan</span> <span class="instabilitytag" title="phase-divergent">phase-divergent</span> </span>
1076 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="unstable"'
1076 $ get-with-headers.py localhost:$HGPORT 'log?rev=first(phasedivergent())&style=spartan' | grep 'class="unstable"'
1077 <th class="unstable">unstable:</th>
1077 <th class="unstable">unstable:</th>
1078 <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td>
1078 <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td>
1079 <th class="unstable">unstable:</th>
1079 <th class="unstable">unstable:</th>
1080 <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td>
1080 <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td>
1081
1081
1082 check explanation for an orphan and phase-divergent changeset
1082 check explanation for an orphan and phase-divergent changeset
1083
1083
1084 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=paper' | egrep '(orphan|phase-divergent):'
1084 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=paper' | egrep '(orphan|phase-divergent):'
1085 <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a><br>
1085 <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=paper">3de5eca88c00</a><br>
1086 phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=paper">245bde4270cd</a></td>
1086 phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=paper">245bde4270cd</a></td>
1087 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=coal' | egrep '(orphan|phase-divergent):'
1087 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=coal' | egrep '(orphan|phase-divergent):'
1088 <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a><br>
1088 <td>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=coal">3de5eca88c00</a><br>
1089 phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=coal">245bde4270cd</a></td>
1089 phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=coal">245bde4270cd</a></td>
1090 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=gitweb' | egrep '(orphan|phase-divergent):'
1090 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=gitweb' | egrep '(orphan|phase-divergent):'
1091 <td>orphan: obsolete parent <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a></td>
1091 <td>orphan: obsolete parent <a class="list" href="/rev/3de5eca88c00?style=gitweb">3de5eca88c00</a></td>
1092 <td>phase-divergent: immutable predecessor <a class="list" href="/rev/245bde4270cd?style=gitweb">245bde4270cd</a></td>
1092 <td>phase-divergent: immutable predecessor <a class="list" href="/rev/245bde4270cd?style=gitweb">245bde4270cd</a></td>
1093 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=monoblue' | egrep '(orphan|phase-divergent):'
1093 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=monoblue' | egrep '(orphan|phase-divergent):'
1094 <dd>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a></dd>
1094 <dd>orphan: obsolete parent <a href="/rev/3de5eca88c00?style=monoblue">3de5eca88c00</a></dd>
1095 <dd>phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=monoblue">245bde4270cd</a></dd>
1095 <dd>phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=monoblue">245bde4270cd</a></dd>
1096 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=spartan' | egrep '(orphan|phase-divergent):'
1096 $ get-with-headers.py localhost:$HGPORT 'rev/50c51b361e60?style=spartan' | egrep '(orphan|phase-divergent):'
1097 <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td>
1097 <td class="unstable">orphan: obsolete parent <a href="/rev/3de5eca88c00?style=spartan">3de5eca88c00</a></td>
1098 <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td>
1098 <td class="unstable">phase-divergent: immutable predecessor <a href="/rev/245bde4270cd?style=spartan">245bde4270cd</a></td>
1099
1099
1100 $ killdaemons.py
1100 $ killdaemons.py
1101
1101
1102 $ rm hg.pid access.log errors.log
1102 $ rm hg.pid access.log errors.log
1103
1103
1104 #endif
1104 #endif
1105
1105
1106 Test incoming/outcoming with changesets obsoleted remotely, known locally
1106 Test incoming/outcoming with changesets obsoleted remotely, known locally
1107 ===============================================================================
1107 ===============================================================================
1108
1108
1109 This test issue 3805
1109 This test issue 3805
1110
1110
1111 $ hg init repo-issue3805
1111 $ hg init repo-issue3805
1112 $ cd repo-issue3805
1112 $ cd repo-issue3805
1113 $ echo "base" > base
1113 $ echo "base" > base
1114 $ hg ci -Am "base"
1114 $ hg ci -Am "base"
1115 adding base
1115 adding base
1116 $ echo "foo" > foo
1116 $ echo "foo" > foo
1117 $ hg ci -Am "A"
1117 $ hg ci -Am "A"
1118 adding foo
1118 adding foo
1119 $ hg clone . ../other-issue3805
1119 $ hg clone . ../other-issue3805
1120 updating to branch default
1120 updating to branch default
1121 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1121 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1122 $ echo "bar" >> foo
1122 $ echo "bar" >> foo
1123 $ hg ci --amend
1123 $ hg ci --amend
1124 $ cd ../other-issue3805
1124 $ cd ../other-issue3805
1125 $ hg log -G
1125 $ hg log -G
1126 @ 1:29f0c6921ddd (draft) [tip ] A
1126 @ 1:29f0c6921ddd (draft) [tip ] A
1127 |
1127 |
1128 o 0:d20a80d4def3 (draft) [ ] base
1128 o 0:d20a80d4def3 (draft) [ ] base
1129
1129
1130 $ hg log -G -R ../repo-issue3805
1130 $ hg log -G -R ../repo-issue3805
1131 @ 2:323a9c3ddd91 (draft) [tip ] A
1131 @ 2:323a9c3ddd91 (draft) [tip ] A
1132 |
1132 |
1133 o 0:d20a80d4def3 (draft) [ ] base
1133 o 0:d20a80d4def3 (draft) [ ] base
1134
1134
1135 $ hg incoming
1135 $ hg incoming
1136 comparing with $TESTTMP/tmpe/repo-issue3805
1136 comparing with $TESTTMP/tmpe/repo-issue3805
1137 searching for changes
1137 searching for changes
1138 2:323a9c3ddd91 (draft) [tip ] A
1138 2:323a9c3ddd91 (draft) [tip ] A
1139 $ hg incoming --bundle ../issue3805.hg
1139 $ hg incoming --bundle ../issue3805.hg
1140 comparing with $TESTTMP/tmpe/repo-issue3805
1140 comparing with $TESTTMP/tmpe/repo-issue3805
1141 searching for changes
1141 searching for changes
1142 2:323a9c3ddd91 (draft) [tip ] A
1142 2:323a9c3ddd91 (draft) [tip ] A
1143 $ hg outgoing
1143 $ hg outgoing
1144 comparing with $TESTTMP/tmpe/repo-issue3805
1144 comparing with $TESTTMP/tmpe/repo-issue3805
1145 searching for changes
1145 searching for changes
1146 1:29f0c6921ddd (draft) [tip ] A
1146 1:29f0c6921ddd (draft) [tip ] A
1147
1147
1148 #if serve
1148 #if serve
1149
1149
1150 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1150 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1151 $ cat hg.pid >> $DAEMON_PIDS
1151 $ cat hg.pid >> $DAEMON_PIDS
1152
1152
1153 $ hg incoming http://localhost:$HGPORT
1153 $ hg incoming http://localhost:$HGPORT
1154 comparing with http://localhost:$HGPORT/
1154 comparing with http://localhost:$HGPORT/
1155 searching for changes
1155 searching for changes
1156 2:323a9c3ddd91 (draft) [tip ] A
1156 2:323a9c3ddd91 (draft) [tip ] A
1157 $ hg outgoing http://localhost:$HGPORT
1157 $ hg outgoing http://localhost:$HGPORT
1158 comparing with http://localhost:$HGPORT/
1158 comparing with http://localhost:$HGPORT/
1159 searching for changes
1159 searching for changes
1160 1:29f0c6921ddd (draft) [tip ] A
1160 1:29f0c6921ddd (draft) [tip ] A
1161
1161
1162 $ killdaemons.py
1162 $ killdaemons.py
1163
1163
1164 #endif
1164 #endif
1165
1165
1166 This test issue 3814
1166 This test issue 3814
1167
1167
1168 (nothing to push but locally hidden changeset)
1168 (nothing to push but locally hidden changeset)
1169
1169
1170 $ cd ..
1170 $ cd ..
1171 $ hg init repo-issue3814
1171 $ hg init repo-issue3814
1172 $ cd repo-issue3805
1172 $ cd repo-issue3805
1173 $ hg push -r 323a9c3ddd91 ../repo-issue3814
1173 $ hg push -r 323a9c3ddd91 ../repo-issue3814
1174 pushing to ../repo-issue3814
1174 pushing to ../repo-issue3814
1175 searching for changes
1175 searching for changes
1176 adding changesets
1176 adding changesets
1177 adding manifests
1177 adding manifests
1178 adding file changes
1178 adding file changes
1179 added 2 changesets with 2 changes to 2 files
1179 added 2 changesets with 2 changes to 2 files
1180 1 new obsolescence markers
1180 1 new obsolescence markers
1181 $ hg out ../repo-issue3814
1181 $ hg out ../repo-issue3814
1182 comparing with ../repo-issue3814
1182 comparing with ../repo-issue3814
1183 searching for changes
1183 searching for changes
1184 no changes found
1184 no changes found
1185 [1]
1185 [1]
1186
1186
1187 Test that a local tag blocks a changeset from being hidden
1187 Test that a local tag blocks a changeset from being hidden
1188
1188
1189 $ hg tag -l visible -r 1 --hidden
1189 $ hg tag -l visible -r 1 --hidden
1190 $ hg log -G
1190 $ hg log -G
1191 @ 2:323a9c3ddd91 (draft) [tip ] A
1191 @ 2:323a9c3ddd91 (draft) [tip ] A
1192 |
1192 |
1193 | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91]
1193 | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91]
1194 |/
1194 |/
1195 o 0:d20a80d4def3 (draft) [ ] base
1195 o 0:d20a80d4def3 (draft) [ ] base
1196
1196
1197 Test that removing a local tag does not cause some commands to fail
1197 Test that removing a local tag does not cause some commands to fail
1198
1198
1199 $ hg tag -l -r tip tiptag
1199 $ hg tag -l -r tip tiptag
1200 $ hg tags
1200 $ hg tags
1201 tiptag 2:323a9c3ddd91
1201 tiptag 2:323a9c3ddd91
1202 tip 2:323a9c3ddd91
1202 tip 2:323a9c3ddd91
1203 visible 1:29f0c6921ddd
1203 visible 1:29f0c6921ddd
1204 $ hg --config extensions.strip= strip -r tip --no-backup
1204 $ hg --config extensions.strip= strip -r tip --no-backup
1205 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1205 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1206 $ hg tags
1206 $ hg tags
1207 visible 1:29f0c6921ddd
1207 visible 1:29f0c6921ddd
1208 tip 1:29f0c6921ddd
1208 tip 1:29f0c6921ddd
1209
1209
1210 Test bundle overlay onto hidden revision
1210 Test bundle overlay onto hidden revision
1211
1211
1212 $ cd ..
1212 $ cd ..
1213 $ hg init repo-bundleoverlay
1213 $ hg init repo-bundleoverlay
1214 $ cd repo-bundleoverlay
1214 $ cd repo-bundleoverlay
1215 $ echo "A" > foo
1215 $ echo "A" > foo
1216 $ hg ci -Am "A"
1216 $ hg ci -Am "A"
1217 adding foo
1217 adding foo
1218 $ echo "B" >> foo
1218 $ echo "B" >> foo
1219 $ hg ci -m "B"
1219 $ hg ci -m "B"
1220 $ hg up 0
1220 $ hg up 0
1221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1222 $ echo "C" >> foo
1222 $ echo "C" >> foo
1223 $ hg ci -m "C"
1223 $ hg ci -m "C"
1224 created new head
1224 created new head
1225 $ hg log -G
1225 $ hg log -G
1226 @ 2:c186d7714947 (draft) [tip ] C
1226 @ 2:c186d7714947 (draft) [tip ] C
1227 |
1227 |
1228 | o 1:44526ebb0f98 (draft) [ ] B
1228 | o 1:44526ebb0f98 (draft) [ ] B
1229 |/
1229 |/
1230 o 0:4b34ecfb0d56 (draft) [ ] A
1230 o 0:4b34ecfb0d56 (draft) [ ] A
1231
1231
1232
1232
1233 $ hg clone -r1 . ../other-bundleoverlay
1233 $ hg clone -r1 . ../other-bundleoverlay
1234 adding changesets
1234 adding changesets
1235 adding manifests
1235 adding manifests
1236 adding file changes
1236 adding file changes
1237 added 2 changesets with 2 changes to 1 files
1237 added 2 changesets with 2 changes to 1 files
1238 new changesets 4b34ecfb0d56:44526ebb0f98
1238 new changesets 4b34ecfb0d56:44526ebb0f98
1239 updating to branch default
1239 updating to branch default
1240 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1240 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1241 $ cd ../other-bundleoverlay
1241 $ cd ../other-bundleoverlay
1242 $ echo "B+" >> foo
1242 $ echo "B+" >> foo
1243 $ hg ci --amend -m "B+"
1243 $ hg ci --amend -m "B+"
1244 $ hg log -G --hidden
1244 $ hg log -G --hidden
1245 @ 2:b7d587542d40 (draft) [tip ] B+
1245 @ 2:b7d587542d40 (draft) [tip ] B+
1246 |
1246 |
1247 | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40]
1247 | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40]
1248 |/
1248 |/
1249 o 0:4b34ecfb0d56 (draft) [ ] A
1249 o 0:4b34ecfb0d56 (draft) [ ] A
1250
1250
1251
1251
1252 #if repobundlerepo
1252 #if repobundlerepo
1253 $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
1253 $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
1254 comparing with ../repo-bundleoverlay
1254 comparing with ../repo-bundleoverlay
1255 searching for changes
1255 searching for changes
1256 1:44526ebb0f98 (draft) [ ] B
1256 1:44526ebb0f98 (draft) [ ] B
1257 2:c186d7714947 (draft) [tip ] C
1257 2:c186d7714947 (draft) [tip ] C
1258 $ hg log -G -R ../bundleoverlay.hg
1258 $ hg log -G -R ../bundleoverlay.hg
1259 o 3:c186d7714947 (draft) [tip ] C
1259 o 3:c186d7714947 (draft) [tip ] C
1260 |
1260 |
1261 | @ 2:b7d587542d40 (draft) [ ] B+
1261 | @ 2:b7d587542d40 (draft) [ ] B+
1262 |/
1262 |/
1263 o 0:4b34ecfb0d56 (draft) [ ] A
1263 o 0:4b34ecfb0d56 (draft) [ ] A
1264
1264
1265 #endif
1265 #endif
1266
1266
1267 #if serve
1267 #if serve
1268
1268
1269 Test issue 4506
1269 Test issue 4506
1270
1270
1271 $ cd ..
1271 $ cd ..
1272 $ hg init repo-issue4506
1272 $ hg init repo-issue4506
1273 $ cd repo-issue4506
1273 $ cd repo-issue4506
1274 $ echo "0" > foo
1274 $ echo "0" > foo
1275 $ hg add foo
1275 $ hg add foo
1276 $ hg ci -m "content-0"
1276 $ hg ci -m "content-0"
1277
1277
1278 $ hg up null
1278 $ hg up null
1279 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1279 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1280 $ echo "1" > bar
1280 $ echo "1" > bar
1281 $ hg add bar
1281 $ hg add bar
1282 $ hg ci -m "content-1"
1282 $ hg ci -m "content-1"
1283 created new head
1283 created new head
1284 $ hg up 0
1284 $ hg up 0
1285 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1285 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1286 $ hg graft 1
1286 $ hg graft 1
1287 grafting 1:1c9eddb02162 "content-1" (tip)
1287 grafting 1:1c9eddb02162 "content-1" (tip)
1288
1288
1289 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
1289 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
1290 obsoleted 1 changesets
1290 obsoleted 1 changesets
1291
1291
1292 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1292 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1293 $ cat hg.pid >> $DAEMON_PIDS
1293 $ cat hg.pid >> $DAEMON_PIDS
1294
1294
1295 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1'
1295 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1'
1296 404 Not Found
1296 404 Not Found
1297 [1]
1297 [1]
1298 $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar'
1298 $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar'
1299 200 Script output follows
1299 200 Script output follows
1300 $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar'
1300 $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar'
1301 200 Script output follows
1301 200 Script output follows
1302
1302
1303 $ killdaemons.py
1303 $ killdaemons.py
1304
1304
1305 #endif
1305 #endif
1306
1306
1307 Test heads computation on pending index changes with obsolescence markers
1307 Test heads computation on pending index changes with obsolescence markers
1308 $ cd ..
1308 $ cd ..
1309 $ cat >$TESTTMP/test_extension.py << EOF
1309 $ cat >$TESTTMP/test_extension.py << EOF
1310 > from __future__ import absolute_import
1310 > from __future__ import absolute_import
1311 > from mercurial.i18n import _
1311 > from mercurial.i18n import _
1312 > from mercurial import cmdutil, registrar
1312 > from mercurial import cmdutil, registrar
1313 >
1313 >
1314 > cmdtable = {}
1314 > cmdtable = {}
1315 > command = registrar.command(cmdtable)
1315 > command = registrar.command(cmdtable)
1316 > @command(b"amendtransient",[], _(b'hg amendtransient [rev]'))
1316 > @command(b"amendtransient",[], _(b'hg amendtransient [rev]'))
1317 > def amend(ui, repo, *pats, **opts):
1317 > def amend(ui, repo, *pats, **opts):
1318 > opts['message'] = 'Test'
1318 > opts['message'] = 'Test'
1319 > opts['logfile'] = None
1319 > opts['logfile'] = None
1320 > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts)
1320 > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts)
1321 > ui.write(b'%s\n' % repo.changelog.headrevs())
1321 > ui.write(b'%s\n' % repo.changelog.headrevs())
1322 > EOF
1322 > EOF
1323 $ cat >> $HGRCPATH << EOF
1323 $ cat >> $HGRCPATH << EOF
1324 > [extensions]
1324 > [extensions]
1325 > testextension=$TESTTMP/test_extension.py
1325 > testextension=$TESTTMP/test_extension.py
1326 > EOF
1326 > EOF
1327 $ hg init repo-issue-nativerevs-pending-changes
1327 $ hg init repo-issue-nativerevs-pending-changes
1328 $ cd repo-issue-nativerevs-pending-changes
1328 $ cd repo-issue-nativerevs-pending-changes
1329 $ mkcommit a
1329 $ mkcommit a
1330 $ mkcommit b
1330 $ mkcommit b
1331 $ hg up ".^"
1331 $ hg up ".^"
1332 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1332 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1333 $ echo aa > a
1333 $ echo aa > a
1334 $ hg amendtransient
1334 $ hg amendtransient
1335 1 new orphan changesets
1335 1 new orphan changesets
1336 [1, 2]
1336 [1, 2]
1337
1337
1338 Test cache consistency for the visible filter
1338 Test cache consistency for the visible filter
1339 1) We want to make sure that the cached filtered revs are invalidated when
1339 1) We want to make sure that the cached filtered revs are invalidated when
1340 bookmarks change
1340 bookmarks change
1341 $ cd ..
1341 $ cd ..
1342 $ cat >$TESTTMP/test_extension.py << EOF
1342 $ cat >$TESTTMP/test_extension.py << EOF
1343 > from __future__ import absolute_import, print_function
1343 > from __future__ import absolute_import, print_function
1344 > import weakref
1344 > import weakref
1345 > from mercurial import (
1345 > from mercurial import (
1346 > bookmarks,
1346 > bookmarks,
1347 > cmdutil,
1347 > cmdutil,
1348 > extensions,
1348 > extensions,
1349 > repoview,
1349 > repoview,
1350 > )
1350 > )
1351 > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
1351 > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
1352 > reporef = weakref.ref(bkmstoreinst._repo)
1352 > reporef = weakref.ref(bkmstoreinst._repo)
1353 > def trhook(tr):
1353 > def trhook(tr):
1354 > repo = reporef()
1354 > repo = reporef()
1355 > hidden1 = repoview.computehidden(repo)
1355 > hidden1 = repoview.computehidden(repo)
1356 > hidden = repoview.filterrevs(repo, b'visible')
1356 > hidden = repoview.filterrevs(repo, b'visible')
1357 > if sorted(hidden1) != sorted(hidden):
1357 > if sorted(hidden1) != sorted(hidden):
1358 > print("cache inconsistency")
1358 > print("cache inconsistency")
1359 > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
1359 > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
1360 > orig(bkmstoreinst, *args, **kwargs)
1360 > orig(bkmstoreinst, *args, **kwargs)
1361 > def extsetup(ui):
1361 > def extsetup(ui):
1362 > extensions.wrapfunction(bookmarks.bmstore, '_recordchange',
1362 > extensions.wrapfunction(bookmarks.bmstore, '_recordchange',
1363 > _bookmarkchanged)
1363 > _bookmarkchanged)
1364 > EOF
1364 > EOF
1365
1365
1366 $ hg init repo-cache-inconsistency
1366 $ hg init repo-cache-inconsistency
1367 $ cd repo-issue-nativerevs-pending-changes
1367 $ cd repo-issue-nativerevs-pending-changes
1368 $ mkcommit a
1368 $ mkcommit a
1369 a already tracked!
1369 a already tracked!
1370 $ mkcommit b
1370 $ mkcommit b
1371 $ hg id
1371 $ hg id
1372 13bedc178fce tip
1372 13bedc178fce tip
1373 $ echo "hello" > b
1373 $ echo "hello" > b
1374 $ hg commit --amend -m "message"
1374 $ hg commit --amend -m "message"
1375 $ hg book bookb -r 13bedc178fce --hidden
1375 $ hg book bookb -r 13bedc178fce --hidden
1376 bookmarking hidden changeset 13bedc178fce
1376 bookmarking hidden changeset 13bedc178fce
1377 (hidden revision '13bedc178fce' was rewritten as: a9b1f8652753)
1377 (hidden revision '13bedc178fce' was rewritten as: a9b1f8652753)
1378 $ hg log -r 13bedc178fce
1378 $ hg log -r 13bedc178fce
1379 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753]
1379 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753]
1380 $ hg book -d bookb
1380 $ hg book -d bookb
1381 $ hg log -r 13bedc178fce
1381 $ hg log -r 13bedc178fce
1382 abort: hidden revision '13bedc178fce' was rewritten as: a9b1f8652753!
1382 abort: hidden revision '13bedc178fce' was rewritten as: a9b1f8652753!
1383 (use --hidden to access hidden revisions)
1383 (use --hidden to access hidden revisions)
1384 [255]
1384 [255]
1385
1385
1386 Empty out the test extension, as it isn't compatible with later parts
1386 Empty out the test extension, as it isn't compatible with later parts
1387 of the test.
1387 of the test.
1388 $ echo > $TESTTMP/test_extension.py
1388 $ echo > $TESTTMP/test_extension.py
1389
1389
1390 Test ability to pull changeset with locally applying obsolescence markers
1390 Test ability to pull changeset with locally applying obsolescence markers
1391 (issue4945)
1391 (issue4945)
1392
1392
1393 $ cd ..
1393 $ cd ..
1394 $ hg init issue4845
1394 $ hg init issue4845
1395 $ cd issue4845
1395 $ cd issue4845
1396
1396
1397 $ echo foo > f0
1397 $ echo foo > f0
1398 $ hg add f0
1398 $ hg add f0
1399 $ hg ci -m '0'
1399 $ hg ci -m '0'
1400 $ echo foo > f1
1400 $ echo foo > f1
1401 $ hg add f1
1401 $ hg add f1
1402 $ hg ci -m '1'
1402 $ hg ci -m '1'
1403 $ echo foo > f2
1403 $ echo foo > f2
1404 $ hg add f2
1404 $ hg add f2
1405 $ hg ci -m '2'
1405 $ hg ci -m '2'
1406
1406
1407 $ echo bar > f2
1407 $ echo bar > f2
1408 $ hg commit --amend --config experimental.evolution.createmarkers=True
1408 $ hg commit --amend --config experimental.evolution.createmarkers=True
1409 $ hg log -G
1409 $ hg log -G
1410 @ 3:b0551702f918 (draft) [tip ] 2
1410 @ 3:b0551702f918 (draft) [tip ] 2
1411 |
1411 |
1412 o 1:e016b03fd86f (draft) [ ] 1
1412 o 1:e016b03fd86f (draft) [ ] 1
1413 |
1413 |
1414 o 0:a78f55e5508c (draft) [ ] 0
1414 o 0:a78f55e5508c (draft) [ ] 0
1415
1415
1416 $ hg log -G --hidden
1416 $ hg log -G --hidden
1417 @ 3:b0551702f918 (draft) [tip ] 2
1417 @ 3:b0551702f918 (draft) [tip ] 2
1418 |
1418 |
1419 | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918]
1419 | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918]
1420 |/
1420 |/
1421 o 1:e016b03fd86f (draft) [ ] 1
1421 o 1:e016b03fd86f (draft) [ ] 1
1422 |
1422 |
1423 o 0:a78f55e5508c (draft) [ ] 0
1423 o 0:a78f55e5508c (draft) [ ] 0
1424
1424
1425
1425
1426 $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no
1426 $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no
1427 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg
1427 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg
1428 $ hg debugobsolete
1428 $ hg debugobsolete
1429 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1429 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1430 $ hg log -G
1430 $ hg log -G
1431 @ 2:b0551702f918 (draft) [tip ] 2
1431 @ 2:b0551702f918 (draft) [tip ] 2
1432 |
1432 |
1433 o 1:e016b03fd86f (draft) [ ] 1
1433 o 1:e016b03fd86f (draft) [ ] 1
1434 |
1434 |
1435 o 0:a78f55e5508c (draft) [ ] 0
1435 o 0:a78f55e5508c (draft) [ ] 0
1436
1436
1437 $ hg log -G --hidden
1437 $ hg log -G --hidden
1438 @ 2:b0551702f918 (draft) [tip ] 2
1438 @ 2:b0551702f918 (draft) [tip ] 2
1439 |
1439 |
1440 o 1:e016b03fd86f (draft) [ ] 1
1440 o 1:e016b03fd86f (draft) [ ] 1
1441 |
1441 |
1442 o 0:a78f55e5508c (draft) [ ] 0
1442 o 0:a78f55e5508c (draft) [ ] 0
1443
1443
1444 $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg
1444 $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg
1445 Stream params: {Compression: BZ}
1445 Stream params: {Compression: BZ}
1446 changegroup -- {nbchanges: 1, version: 02}
1446 changegroup -- {nbchanges: 1, version: 02}
1447 e008cf2834908e5d6b0f792a9d4b0e2272260fb8
1447 e008cf2834908e5d6b0f792a9d4b0e2272260fb8
1448 cache:rev-branch-cache -- {}
1448 cache:rev-branch-cache -- {}
1449 phase-heads -- {}
1449 phase-heads -- {}
1450 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft
1450 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft
1451
1451
1452 #if repobundlerepo
1452 $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg
1453 $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg
1453 pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg
1454 pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg
1454 searching for changes
1455 searching for changes
1455 no changes found
1456 no changes found
1457 #endif
1456 $ hg debugobsolete
1458 $ hg debugobsolete
1457 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1459 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1458 $ hg log -G
1460 $ hg log -G
1459 @ 2:b0551702f918 (draft) [tip ] 2
1461 @ 2:b0551702f918 (draft) [tip ] 2
1460 |
1462 |
1461 o 1:e016b03fd86f (draft) [ ] 1
1463 o 1:e016b03fd86f (draft) [ ] 1
1462 |
1464 |
1463 o 0:a78f55e5508c (draft) [ ] 0
1465 o 0:a78f55e5508c (draft) [ ] 0
1464
1466
1465 $ hg log -G --hidden
1467 $ hg log -G --hidden
1466 @ 2:b0551702f918 (draft) [tip ] 2
1468 @ 2:b0551702f918 (draft) [tip ] 2
1467 |
1469 |
1468 o 1:e016b03fd86f (draft) [ ] 1
1470 o 1:e016b03fd86f (draft) [ ] 1
1469 |
1471 |
1470 o 0:a78f55e5508c (draft) [ ] 0
1472 o 0:a78f55e5508c (draft) [ ] 0
1471
1473
1472
1474
1473 Testing that strip remove markers:
1475 Testing that strip remove markers:
1474
1476
1475 $ hg strip -r 1 --config extensions.strip=
1477 $ hg strip -r 1 --config extensions.strip=
1476 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1478 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1477 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg
1479 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg
1478 $ hg debugobsolete
1480 $ hg debugobsolete
1479 $ hg log -G
1481 $ hg log -G
1480 @ 0:a78f55e5508c (draft) [tip ] 0
1482 @ 0:a78f55e5508c (draft) [tip ] 0
1481
1483
1482 $ hg log -G --hidden
1484 $ hg log -G --hidden
1483 @ 0:a78f55e5508c (draft) [tip ] 0
1485 @ 0:a78f55e5508c (draft) [tip ] 0
1484
1486
1485 $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1487 $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1486 Stream params: {Compression: BZ}
1488 Stream params: {Compression: BZ}
1487 changegroup -- {nbchanges: 2, version: 02}
1489 changegroup -- {nbchanges: 2, version: 02}
1488 e016b03fd86fcccc54817d120b90b751aaf367d6
1490 e016b03fd86fcccc54817d120b90b751aaf367d6
1489 b0551702f918510f01ae838ab03a463054c67b46
1491 b0551702f918510f01ae838ab03a463054c67b46
1490 cache:rev-branch-cache -- {}
1492 cache:rev-branch-cache -- {}
1491 obsmarkers -- {}
1493 obsmarkers -- {}
1492 version: 1 (92 bytes)
1494 version: 1 (92 bytes)
1493 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1495 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1494 phase-heads -- {}
1496 phase-heads -- {}
1495 b0551702f918510f01ae838ab03a463054c67b46 draft
1497 b0551702f918510f01ae838ab03a463054c67b46 draft
1496
1498
1497 $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1499 $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1498 adding changesets
1500 adding changesets
1499 adding manifests
1501 adding manifests
1500 adding file changes
1502 adding file changes
1501 added 2 changesets with 2 changes to 2 files
1503 added 2 changesets with 2 changes to 2 files
1502 1 new obsolescence markers
1504 1 new obsolescence markers
1503 new changesets e016b03fd86f:b0551702f918
1505 new changesets e016b03fd86f:b0551702f918
1504 (run 'hg update' to get a working copy)
1506 (run 'hg update' to get a working copy)
1505 $ hg debugobsolete | sort
1507 $ hg debugobsolete | sort
1506 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1508 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1507 $ hg log -G
1509 $ hg log -G
1508 o 2:b0551702f918 (draft) [tip ] 2
1510 o 2:b0551702f918 (draft) [tip ] 2
1509 |
1511 |
1510 o 1:e016b03fd86f (draft) [ ] 1
1512 o 1:e016b03fd86f (draft) [ ] 1
1511 |
1513 |
1512 @ 0:a78f55e5508c (draft) [ ] 0
1514 @ 0:a78f55e5508c (draft) [ ] 0
1513
1515
1514 $ hg log -G --hidden
1516 $ hg log -G --hidden
1515 o 2:b0551702f918 (draft) [tip ] 2
1517 o 2:b0551702f918 (draft) [tip ] 2
1516 |
1518 |
1517 o 1:e016b03fd86f (draft) [ ] 1
1519 o 1:e016b03fd86f (draft) [ ] 1
1518 |
1520 |
1519 @ 0:a78f55e5508c (draft) [ ] 0
1521 @ 0:a78f55e5508c (draft) [ ] 0
1520
1522
1521 Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when
1523 Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when
1522 only a subset of those are displayed (because of --rev option)
1524 only a subset of those are displayed (because of --rev option)
1523 $ hg init doindexrev
1525 $ hg init doindexrev
1524 $ cd doindexrev
1526 $ cd doindexrev
1525 $ echo a > a
1527 $ echo a > a
1526 $ hg ci -Am a
1528 $ hg ci -Am a
1527 adding a
1529 adding a
1528 $ hg ci --amend -m aa
1530 $ hg ci --amend -m aa
1529 $ echo b > b
1531 $ echo b > b
1530 $ hg ci -Am b
1532 $ hg ci -Am b
1531 adding b
1533 adding b
1532 $ hg ci --amend -m bb
1534 $ hg ci --amend -m bb
1533 $ echo c > c
1535 $ echo c > c
1534 $ hg ci -Am c
1536 $ hg ci -Am c
1535 adding c
1537 adding c
1536 $ hg ci --amend -m cc
1538 $ hg ci --amend -m cc
1537 $ echo d > d
1539 $ echo d > d
1538 $ hg ci -Am d
1540 $ hg ci -Am d
1539 adding d
1541 adding d
1540 $ hg ci --amend -m dd --config experimental.evolution.track-operation=1
1542 $ hg ci --amend -m dd --config experimental.evolution.track-operation=1
1541 $ hg debugobsolete --index --rev "3+7"
1543 $ hg debugobsolete --index --rev "3+7"
1542 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1544 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1543 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1545 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1544 $ hg debugobsolete --index --rev "3+7" -Tjson
1546 $ hg debugobsolete --index --rev "3+7" -Tjson
1545 [
1547 [
1546 {
1548 {
1547 "date": [0.0, 0],
1549 "date": [0.0, 0],
1548 "flag": 0,
1550 "flag": 0,
1549 "index": 1,
1551 "index": 1,
1550 "metadata": {"ef1": "1", "operation": "amend", "user": "test"},
1552 "metadata": {"ef1": "1", "operation": "amend", "user": "test"},
1551 "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1",
1553 "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1",
1552 "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"]
1554 "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"]
1553 },
1555 },
1554 {
1556 {
1555 "date": [0.0, 0],
1557 "date": [0.0, 0],
1556 "flag": 0,
1558 "flag": 0,
1557 "index": 3,
1559 "index": 3,
1558 "metadata": {"ef1": "1", "operation": "amend", "user": "test"},
1560 "metadata": {"ef1": "1", "operation": "amend", "user": "test"},
1559 "prednode": "4715cf767440ed891755448016c2b8cf70760c30",
1561 "prednode": "4715cf767440ed891755448016c2b8cf70760c30",
1560 "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"]
1562 "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"]
1561 }
1563 }
1562 ]
1564 ]
1563
1565
1564 Test the --delete option of debugobsolete command
1566 Test the --delete option of debugobsolete command
1565 $ hg debugobsolete --index
1567 $ hg debugobsolete --index
1566 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1568 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1567 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1569 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1568 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1570 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1569 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1571 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1570 $ hg debugobsolete --delete 1 --delete 3
1572 $ hg debugobsolete --delete 1 --delete 3
1571 deleted 2 obsolescence markers
1573 deleted 2 obsolescence markers
1572 $ hg debugobsolete
1574 $ hg debugobsolete
1573 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1575 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1574 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1576 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1575
1577
1576 Test adding changeset after obsmarkers affecting it
1578 Test adding changeset after obsmarkers affecting it
1577 (eg: during pull, or unbundle)
1579 (eg: during pull, or unbundle)
1578
1580
1579 $ mkcommit e
1581 $ mkcommit e
1580 $ hg bundle -r . --base .~1 ../bundle-2.hg
1582 $ hg bundle -r . --base .~1 ../bundle-2.hg
1581 1 changesets found
1583 1 changesets found
1582 $ getid .
1584 $ getid .
1583 $ hg --config extensions.strip= strip -r .
1585 $ hg --config extensions.strip= strip -r .
1584 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1586 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1585 saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg
1587 saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg
1586 $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b
1588 $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b
1587 $ hg unbundle ../bundle-2.hg
1589 $ hg unbundle ../bundle-2.hg
1588 adding changesets
1590 adding changesets
1589 adding manifests
1591 adding manifests
1590 adding file changes
1592 adding file changes
1591 added 1 changesets with 1 changes to 1 files
1593 added 1 changesets with 1 changes to 1 files
1592 (run 'hg update' to get a working copy)
1594 (run 'hg update' to get a working copy)
1593 $ hg log -G
1595 $ hg log -G
1594 @ 7:7ae79c5d60f0 (draft) [tip ] dd
1596 @ 7:7ae79c5d60f0 (draft) [tip ] dd
1595 |
1597 |
1596 | o 6:4715cf767440 (draft) [ ] d
1598 | o 6:4715cf767440 (draft) [ ] d
1597 |/
1599 |/
1598 o 5:29346082e4a9 (draft) [ ] cc
1600 o 5:29346082e4a9 (draft) [ ] cc
1599 |
1601 |
1600 o 3:d27fb9b06607 (draft) [ ] bb
1602 o 3:d27fb9b06607 (draft) [ ] bb
1601 |
1603 |
1602 | o 2:6fdef60fcbab (draft) [ ] b
1604 | o 2:6fdef60fcbab (draft) [ ] b
1603 |/
1605 |/
1604 o 1:f9bd49731b0b (draft) [ ] aa
1606 o 1:f9bd49731b0b (draft) [ ] aa
1605
1607
1606
1608
1607 $ cd ..
1609 $ cd ..
@@ -1,79 +1,79 b''
1 #require unix-permissions no-root
1 #require unix-permissions no-root reporevlogstore
2
2
3 $ hg init t
3 $ hg init t
4 $ cd t
4 $ cd t
5
5
6 $ echo foo > a
6 $ echo foo > a
7 $ hg add a
7 $ hg add a
8
8
9 $ hg commit -m "1"
9 $ hg commit -m "1"
10
10
11 $ hg verify
11 $ hg verify
12 checking changesets
12 checking changesets
13 checking manifests
13 checking manifests
14 crosschecking files in changesets and manifests
14 crosschecking files in changesets and manifests
15 checking files
15 checking files
16 1 files, 1 changesets, 1 total revisions
16 1 files, 1 changesets, 1 total revisions
17
17
18 $ chmod -r .hg/store/data/a.i
18 $ chmod -r .hg/store/data/a.i
19
19
20 $ hg verify
20 $ hg verify
21 checking changesets
21 checking changesets
22 checking manifests
22 checking manifests
23 crosschecking files in changesets and manifests
23 crosschecking files in changesets and manifests
24 checking files
24 checking files
25 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i
25 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i
26 [255]
26 [255]
27
27
28 $ chmod +r .hg/store/data/a.i
28 $ chmod +r .hg/store/data/a.i
29
29
30 $ hg verify
30 $ hg verify
31 checking changesets
31 checking changesets
32 checking manifests
32 checking manifests
33 crosschecking files in changesets and manifests
33 crosschecking files in changesets and manifests
34 checking files
34 checking files
35 1 files, 1 changesets, 1 total revisions
35 1 files, 1 changesets, 1 total revisions
36
36
37 $ chmod -w .hg/store/data/a.i
37 $ chmod -w .hg/store/data/a.i
38
38
39 $ echo barber > a
39 $ echo barber > a
40 $ hg commit -m "2"
40 $ hg commit -m "2"
41 trouble committing a!
41 trouble committing a!
42 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i
42 abort: Permission denied: $TESTTMP/t/.hg/store/data/a.i
43 [255]
43 [255]
44
44
45 $ chmod -w .
45 $ chmod -w .
46
46
47 $ hg diff --nodates
47 $ hg diff --nodates
48 diff -r 2a18120dc1c9 a
48 diff -r 2a18120dc1c9 a
49 --- a/a
49 --- a/a
50 +++ b/a
50 +++ b/a
51 @@ -1,1 +1,1 @@
51 @@ -1,1 +1,1 @@
52 -foo
52 -foo
53 +barber
53 +barber
54
54
55 $ chmod +w .
55 $ chmod +w .
56
56
57 $ chmod +w .hg/store/data/a.i
57 $ chmod +w .hg/store/data/a.i
58 $ mkdir dir
58 $ mkdir dir
59 $ touch dir/a
59 $ touch dir/a
60 $ hg status
60 $ hg status
61 M a
61 M a
62 ? dir/a
62 ? dir/a
63 $ chmod -rx dir
63 $ chmod -rx dir
64
64
65 #if no-fsmonitor
65 #if no-fsmonitor
66
66
67 (fsmonitor makes "hg status" avoid accessing to "dir")
67 (fsmonitor makes "hg status" avoid accessing to "dir")
68
68
69 $ hg status
69 $ hg status
70 dir: Permission denied
70 dir: Permission denied
71 M a
71 M a
72
72
73 #endif
73 #endif
74
74
75 Reenable perm to allow deletion:
75 Reenable perm to allow deletion:
76
76
77 $ chmod +rx dir
77 $ chmod +rx dir
78
78
79 $ cd ..
79 $ cd ..
@@ -1,1365 +1,1367 b''
1 #require killdaemons
1 #require killdaemons
2
2
3 $ cat >> $HGRCPATH << EOF
3 $ cat >> $HGRCPATH << EOF
4 > [extensions]
4 > [extensions]
5 > phasereport=$TESTDIR/testlib/ext-phase-report.py
5 > phasereport=$TESTDIR/testlib/ext-phase-report.py
6 > EOF
6 > EOF
7
7
8 $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
8 $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
9
9
10 $ mkcommit() {
10 $ mkcommit() {
11 > echo "$1" > "$1"
11 > echo "$1" > "$1"
12 > hg add "$1"
12 > hg add "$1"
13 > message="$1"
13 > message="$1"
14 > shift
14 > shift
15 > hg ci -m "$message" $*
15 > hg ci -m "$message" $*
16 > }
16 > }
17
17
18 $ hg init alpha
18 $ hg init alpha
19 $ cd alpha
19 $ cd alpha
20 $ mkcommit a-A
20 $ mkcommit a-A
21 test-debug-phase: new rev 0: x -> 1
21 test-debug-phase: new rev 0: x -> 1
22 $ mkcommit a-B
22 $ mkcommit a-B
23 test-debug-phase: new rev 1: x -> 1
23 test-debug-phase: new rev 1: x -> 1
24 $ mkcommit a-C
24 $ mkcommit a-C
25 test-debug-phase: new rev 2: x -> 1
25 test-debug-phase: new rev 2: x -> 1
26 $ mkcommit a-D
26 $ mkcommit a-D
27 test-debug-phase: new rev 3: x -> 1
27 test-debug-phase: new rev 3: x -> 1
28 $ hgph
28 $ hgph
29 @ 3 draft a-D - b555f63b6063
29 @ 3 draft a-D - b555f63b6063
30 |
30 |
31 o 2 draft a-C - 54acac6f23ab
31 o 2 draft a-C - 54acac6f23ab
32 |
32 |
33 o 1 draft a-B - 548a3d25dbf0
33 o 1 draft a-B - 548a3d25dbf0
34 |
34 |
35 o 0 draft a-A - 054250a37db4
35 o 0 draft a-A - 054250a37db4
36
36
37
37
38 $ hg init ../beta
38 $ hg init ../beta
39 $ hg push -r 1 ../beta
39 $ hg push -r 1 ../beta
40 pushing to ../beta
40 pushing to ../beta
41 searching for changes
41 searching for changes
42 adding changesets
42 adding changesets
43 adding manifests
43 adding manifests
44 adding file changes
44 adding file changes
45 added 2 changesets with 2 changes to 2 files
45 added 2 changesets with 2 changes to 2 files
46 test-debug-phase: new rev 0: x -> 0
46 test-debug-phase: new rev 0: x -> 0
47 test-debug-phase: new rev 1: x -> 0
47 test-debug-phase: new rev 1: x -> 0
48 test-debug-phase: move rev 0: 1 -> 0
48 test-debug-phase: move rev 0: 1 -> 0
49 test-debug-phase: move rev 1: 1 -> 0
49 test-debug-phase: move rev 1: 1 -> 0
50 $ hgph
50 $ hgph
51 @ 3 draft a-D - b555f63b6063
51 @ 3 draft a-D - b555f63b6063
52 |
52 |
53 o 2 draft a-C - 54acac6f23ab
53 o 2 draft a-C - 54acac6f23ab
54 |
54 |
55 o 1 public a-B - 548a3d25dbf0
55 o 1 public a-B - 548a3d25dbf0
56 |
56 |
57 o 0 public a-A - 054250a37db4
57 o 0 public a-A - 054250a37db4
58
58
59
59
60 $ cd ../beta
60 $ cd ../beta
61 $ hgph
61 $ hgph
62 o 1 public a-B - 548a3d25dbf0
62 o 1 public a-B - 548a3d25dbf0
63 |
63 |
64 o 0 public a-A - 054250a37db4
64 o 0 public a-A - 054250a37db4
65
65
66 $ hg up -q
66 $ hg up -q
67 $ mkcommit b-A
67 $ mkcommit b-A
68 test-debug-phase: new rev 2: x -> 1
68 test-debug-phase: new rev 2: x -> 1
69 $ hgph
69 $ hgph
70 @ 2 draft b-A - f54f1bb90ff3
70 @ 2 draft b-A - f54f1bb90ff3
71 |
71 |
72 o 1 public a-B - 548a3d25dbf0
72 o 1 public a-B - 548a3d25dbf0
73 |
73 |
74 o 0 public a-A - 054250a37db4
74 o 0 public a-A - 054250a37db4
75
75
76 $ hg pull ../alpha
76 $ hg pull ../alpha
77 pulling from ../alpha
77 pulling from ../alpha
78 searching for changes
78 searching for changes
79 adding changesets
79 adding changesets
80 adding manifests
80 adding manifests
81 adding file changes
81 adding file changes
82 added 2 changesets with 2 changes to 2 files (+1 heads)
82 added 2 changesets with 2 changes to 2 files (+1 heads)
83 new changesets 54acac6f23ab:b555f63b6063
83 new changesets 54acac6f23ab:b555f63b6063
84 test-debug-phase: new rev 3: x -> 0
84 test-debug-phase: new rev 3: x -> 0
85 test-debug-phase: new rev 4: x -> 0
85 test-debug-phase: new rev 4: x -> 0
86 (run 'hg heads' to see heads, 'hg merge' to merge)
86 (run 'hg heads' to see heads, 'hg merge' to merge)
87 $ hgph
87 $ hgph
88 o 4 public a-D - b555f63b6063
88 o 4 public a-D - b555f63b6063
89 |
89 |
90 o 3 public a-C - 54acac6f23ab
90 o 3 public a-C - 54acac6f23ab
91 |
91 |
92 | @ 2 draft b-A - f54f1bb90ff3
92 | @ 2 draft b-A - f54f1bb90ff3
93 |/
93 |/
94 o 1 public a-B - 548a3d25dbf0
94 o 1 public a-B - 548a3d25dbf0
95 |
95 |
96 o 0 public a-A - 054250a37db4
96 o 0 public a-A - 054250a37db4
97
97
98
98
99 pull did not updated ../alpha state.
99 pull did not updated ../alpha state.
100 push from alpha to beta should update phase even if nothing is transferred
100 push from alpha to beta should update phase even if nothing is transferred
101
101
102 $ cd ../alpha
102 $ cd ../alpha
103 $ hgph # not updated by remote pull
103 $ hgph # not updated by remote pull
104 @ 3 draft a-D - b555f63b6063
104 @ 3 draft a-D - b555f63b6063
105 |
105 |
106 o 2 draft a-C - 54acac6f23ab
106 o 2 draft a-C - 54acac6f23ab
107 |
107 |
108 o 1 public a-B - 548a3d25dbf0
108 o 1 public a-B - 548a3d25dbf0
109 |
109 |
110 o 0 public a-A - 054250a37db4
110 o 0 public a-A - 054250a37db4
111
111
112 $ hg push -r 2 ../beta
112 $ hg push -r 2 ../beta
113 pushing to ../beta
113 pushing to ../beta
114 searching for changes
114 searching for changes
115 no changes found
115 no changes found
116 test-debug-phase: move rev 2: 1 -> 0
116 test-debug-phase: move rev 2: 1 -> 0
117 [1]
117 [1]
118 $ hgph
118 $ hgph
119 @ 3 draft a-D - b555f63b6063
119 @ 3 draft a-D - b555f63b6063
120 |
120 |
121 o 2 public a-C - 54acac6f23ab
121 o 2 public a-C - 54acac6f23ab
122 |
122 |
123 o 1 public a-B - 548a3d25dbf0
123 o 1 public a-B - 548a3d25dbf0
124 |
124 |
125 o 0 public a-A - 054250a37db4
125 o 0 public a-A - 054250a37db4
126
126
127 $ hg push ../beta
127 $ hg push ../beta
128 pushing to ../beta
128 pushing to ../beta
129 searching for changes
129 searching for changes
130 no changes found
130 no changes found
131 test-debug-phase: move rev 3: 1 -> 0
131 test-debug-phase: move rev 3: 1 -> 0
132 [1]
132 [1]
133 $ hgph
133 $ hgph
134 @ 3 public a-D - b555f63b6063
134 @ 3 public a-D - b555f63b6063
135 |
135 |
136 o 2 public a-C - 54acac6f23ab
136 o 2 public a-C - 54acac6f23ab
137 |
137 |
138 o 1 public a-B - 548a3d25dbf0
138 o 1 public a-B - 548a3d25dbf0
139 |
139 |
140 o 0 public a-A - 054250a37db4
140 o 0 public a-A - 054250a37db4
141
141
142
142
143 update must update phase of common changeset too
143 update must update phase of common changeset too
144
144
145 $ hg pull ../beta # getting b-A
145 $ hg pull ../beta # getting b-A
146 pulling from ../beta
146 pulling from ../beta
147 searching for changes
147 searching for changes
148 adding changesets
148 adding changesets
149 adding manifests
149 adding manifests
150 adding file changes
150 adding file changes
151 added 1 changesets with 1 changes to 1 files (+1 heads)
151 added 1 changesets with 1 changes to 1 files (+1 heads)
152 new changesets f54f1bb90ff3
152 new changesets f54f1bb90ff3
153 test-debug-phase: new rev 4: x -> 0
153 test-debug-phase: new rev 4: x -> 0
154 (run 'hg heads' to see heads, 'hg merge' to merge)
154 (run 'hg heads' to see heads, 'hg merge' to merge)
155
155
156 $ cd ../beta
156 $ cd ../beta
157 $ hgph # not updated by remote pull
157 $ hgph # not updated by remote pull
158 o 4 public a-D - b555f63b6063
158 o 4 public a-D - b555f63b6063
159 |
159 |
160 o 3 public a-C - 54acac6f23ab
160 o 3 public a-C - 54acac6f23ab
161 |
161 |
162 | @ 2 draft b-A - f54f1bb90ff3
162 | @ 2 draft b-A - f54f1bb90ff3
163 |/
163 |/
164 o 1 public a-B - 548a3d25dbf0
164 o 1 public a-B - 548a3d25dbf0
165 |
165 |
166 o 0 public a-A - 054250a37db4
166 o 0 public a-A - 054250a37db4
167
167
168 $ hg pull ../alpha
168 $ hg pull ../alpha
169 pulling from ../alpha
169 pulling from ../alpha
170 searching for changes
170 searching for changes
171 no changes found
171 no changes found
172 test-debug-phase: move rev 2: 1 -> 0
172 test-debug-phase: move rev 2: 1 -> 0
173 $ hgph
173 $ hgph
174 o 4 public a-D - b555f63b6063
174 o 4 public a-D - b555f63b6063
175 |
175 |
176 o 3 public a-C - 54acac6f23ab
176 o 3 public a-C - 54acac6f23ab
177 |
177 |
178 | @ 2 public b-A - f54f1bb90ff3
178 | @ 2 public b-A - f54f1bb90ff3
179 |/
179 |/
180 o 1 public a-B - 548a3d25dbf0
180 o 1 public a-B - 548a3d25dbf0
181 |
181 |
182 o 0 public a-A - 054250a37db4
182 o 0 public a-A - 054250a37db4
183
183
184
184
185 Publish configuration option
185 Publish configuration option
186 ----------------------------
186 ----------------------------
187
187
188 Pull
188 Pull
189 ````
189 ````
190
190
191 changegroup are added without phase movement
191 changegroup are added without phase movement
192
192
193 $ hg bundle -a ../base.bundle
193 $ hg bundle -a ../base.bundle
194 5 changesets found
194 5 changesets found
195 $ cd ..
195 $ cd ..
196 $ hg init mu
196 $ hg init mu
197 $ cd mu
197 $ cd mu
198 $ cat > .hg/hgrc << EOF
198 $ cat > .hg/hgrc << EOF
199 > [phases]
199 > [phases]
200 > publish=0
200 > publish=0
201 > EOF
201 > EOF
202 $ hg unbundle ../base.bundle
202 $ hg unbundle ../base.bundle
203 adding changesets
203 adding changesets
204 adding manifests
204 adding manifests
205 adding file changes
205 adding file changes
206 added 5 changesets with 5 changes to 5 files (+1 heads)
206 added 5 changesets with 5 changes to 5 files (+1 heads)
207 new changesets 054250a37db4:b555f63b6063
207 new changesets 054250a37db4:b555f63b6063
208 test-debug-phase: new rev 0: x -> 1
208 test-debug-phase: new rev 0: x -> 1
209 test-debug-phase: new rev 1: x -> 1
209 test-debug-phase: new rev 1: x -> 1
210 test-debug-phase: new rev 2: x -> 1
210 test-debug-phase: new rev 2: x -> 1
211 test-debug-phase: new rev 3: x -> 1
211 test-debug-phase: new rev 3: x -> 1
212 test-debug-phase: new rev 4: x -> 1
212 test-debug-phase: new rev 4: x -> 1
213 (run 'hg heads' to see heads, 'hg merge' to merge)
213 (run 'hg heads' to see heads, 'hg merge' to merge)
214 $ hgph
214 $ hgph
215 o 4 draft a-D - b555f63b6063
215 o 4 draft a-D - b555f63b6063
216 |
216 |
217 o 3 draft a-C - 54acac6f23ab
217 o 3 draft a-C - 54acac6f23ab
218 |
218 |
219 | o 2 draft b-A - f54f1bb90ff3
219 | o 2 draft b-A - f54f1bb90ff3
220 |/
220 |/
221 o 1 draft a-B - 548a3d25dbf0
221 o 1 draft a-B - 548a3d25dbf0
222 |
222 |
223 o 0 draft a-A - 054250a37db4
223 o 0 draft a-A - 054250a37db4
224
224
225 $ cd ..
225 $ cd ..
226
226
227 Pulling from publish=False to publish=False does not move boundary.
227 Pulling from publish=False to publish=False does not move boundary.
228
228
229 $ hg init nu
229 $ hg init nu
230 $ cd nu
230 $ cd nu
231 $ cat > .hg/hgrc << EOF
231 $ cat > .hg/hgrc << EOF
232 > [phases]
232 > [phases]
233 > publish=0
233 > publish=0
234 > EOF
234 > EOF
235 $ hg pull ../mu -r 54acac6f23ab
235 $ hg pull ../mu -r 54acac6f23ab
236 pulling from ../mu
236 pulling from ../mu
237 adding changesets
237 adding changesets
238 adding manifests
238 adding manifests
239 adding file changes
239 adding file changes
240 added 3 changesets with 3 changes to 3 files
240 added 3 changesets with 3 changes to 3 files
241 new changesets 054250a37db4:54acac6f23ab
241 new changesets 054250a37db4:54acac6f23ab
242 test-debug-phase: new rev 0: x -> 1
242 test-debug-phase: new rev 0: x -> 1
243 test-debug-phase: new rev 1: x -> 1
243 test-debug-phase: new rev 1: x -> 1
244 test-debug-phase: new rev 2: x -> 1
244 test-debug-phase: new rev 2: x -> 1
245 (run 'hg update' to get a working copy)
245 (run 'hg update' to get a working copy)
246 $ hgph
246 $ hgph
247 o 2 draft a-C - 54acac6f23ab
247 o 2 draft a-C - 54acac6f23ab
248 |
248 |
249 o 1 draft a-B - 548a3d25dbf0
249 o 1 draft a-B - 548a3d25dbf0
250 |
250 |
251 o 0 draft a-A - 054250a37db4
251 o 0 draft a-A - 054250a37db4
252
252
253
253
254 Even for common
254 Even for common
255
255
256 $ hg pull ../mu -r f54f1bb90ff3
256 $ hg pull ../mu -r f54f1bb90ff3
257 pulling from ../mu
257 pulling from ../mu
258 searching for changes
258 searching for changes
259 adding changesets
259 adding changesets
260 adding manifests
260 adding manifests
261 adding file changes
261 adding file changes
262 added 1 changesets with 1 changes to 1 files (+1 heads)
262 added 1 changesets with 1 changes to 1 files (+1 heads)
263 new changesets f54f1bb90ff3
263 new changesets f54f1bb90ff3
264 test-debug-phase: new rev 3: x -> 1
264 test-debug-phase: new rev 3: x -> 1
265 (run 'hg heads' to see heads, 'hg merge' to merge)
265 (run 'hg heads' to see heads, 'hg merge' to merge)
266 $ hgph
266 $ hgph
267 o 3 draft b-A - f54f1bb90ff3
267 o 3 draft b-A - f54f1bb90ff3
268 |
268 |
269 | o 2 draft a-C - 54acac6f23ab
269 | o 2 draft a-C - 54acac6f23ab
270 |/
270 |/
271 o 1 draft a-B - 548a3d25dbf0
271 o 1 draft a-B - 548a3d25dbf0
272 |
272 |
273 o 0 draft a-A - 054250a37db4
273 o 0 draft a-A - 054250a37db4
274
274
275
275
276
276
277 Pulling from Publish=True to Publish=False move boundary in common set.
277 Pulling from Publish=True to Publish=False move boundary in common set.
278 we are in nu
278 we are in nu
279
279
280 $ hg pull ../alpha -r b555f63b6063
280 $ hg pull ../alpha -r b555f63b6063
281 pulling from ../alpha
281 pulling from ../alpha
282 searching for changes
282 searching for changes
283 adding changesets
283 adding changesets
284 adding manifests
284 adding manifests
285 adding file changes
285 adding file changes
286 added 1 changesets with 1 changes to 1 files
286 added 1 changesets with 1 changes to 1 files
287 new changesets b555f63b6063
287 new changesets b555f63b6063
288 test-debug-phase: move rev 0: 1 -> 0
288 test-debug-phase: move rev 0: 1 -> 0
289 test-debug-phase: move rev 1: 1 -> 0
289 test-debug-phase: move rev 1: 1 -> 0
290 test-debug-phase: move rev 2: 1 -> 0
290 test-debug-phase: move rev 2: 1 -> 0
291 test-debug-phase: new rev 4: x -> 0
291 test-debug-phase: new rev 4: x -> 0
292 (run 'hg update' to get a working copy)
292 (run 'hg update' to get a working copy)
293 $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
293 $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
294 o 4 public a-D - b555f63b6063
294 o 4 public a-D - b555f63b6063
295 |
295 |
296 | o 3 draft b-A - f54f1bb90ff3
296 | o 3 draft b-A - f54f1bb90ff3
297 | |
297 | |
298 o | 2 public a-C - 54acac6f23ab
298 o | 2 public a-C - 54acac6f23ab
299 |/
299 |/
300 o 1 public a-B - 548a3d25dbf0
300 o 1 public a-B - 548a3d25dbf0
301 |
301 |
302 o 0 public a-A - 054250a37db4
302 o 0 public a-A - 054250a37db4
303
303
304
304
305 pulling from Publish=False to publish=False with some public
305 pulling from Publish=False to publish=False with some public
306
306
307 $ hg up -q f54f1bb90ff3
307 $ hg up -q f54f1bb90ff3
308 $ mkcommit n-A
308 $ mkcommit n-A
309 test-debug-phase: new rev 5: x -> 1
309 test-debug-phase: new rev 5: x -> 1
310 $ mkcommit n-B
310 $ mkcommit n-B
311 test-debug-phase: new rev 6: x -> 1
311 test-debug-phase: new rev 6: x -> 1
312 $ hgph
312 $ hgph
313 @ 6 draft n-B - 145e75495359
313 @ 6 draft n-B - 145e75495359
314 |
314 |
315 o 5 draft n-A - d6bcb4f74035
315 o 5 draft n-A - d6bcb4f74035
316 |
316 |
317 | o 4 public a-D - b555f63b6063
317 | o 4 public a-D - b555f63b6063
318 | |
318 | |
319 o | 3 draft b-A - f54f1bb90ff3
319 o | 3 draft b-A - f54f1bb90ff3
320 | |
320 | |
321 | o 2 public a-C - 54acac6f23ab
321 | o 2 public a-C - 54acac6f23ab
322 |/
322 |/
323 o 1 public a-B - 548a3d25dbf0
323 o 1 public a-B - 548a3d25dbf0
324 |
324 |
325 o 0 public a-A - 054250a37db4
325 o 0 public a-A - 054250a37db4
326
326
327 $ cd ../mu
327 $ cd ../mu
328 $ hg pull ../nu
328 $ hg pull ../nu
329 pulling from ../nu
329 pulling from ../nu
330 searching for changes
330 searching for changes
331 adding changesets
331 adding changesets
332 adding manifests
332 adding manifests
333 adding file changes
333 adding file changes
334 added 2 changesets with 2 changes to 2 files
334 added 2 changesets with 2 changes to 2 files
335 new changesets d6bcb4f74035:145e75495359
335 new changesets d6bcb4f74035:145e75495359
336 test-debug-phase: move rev 0: 1 -> 0
336 test-debug-phase: move rev 0: 1 -> 0
337 test-debug-phase: move rev 1: 1 -> 0
337 test-debug-phase: move rev 1: 1 -> 0
338 test-debug-phase: move rev 3: 1 -> 0
338 test-debug-phase: move rev 3: 1 -> 0
339 test-debug-phase: move rev 4: 1 -> 0
339 test-debug-phase: move rev 4: 1 -> 0
340 test-debug-phase: new rev 5: x -> 1
340 test-debug-phase: new rev 5: x -> 1
341 test-debug-phase: new rev 6: x -> 1
341 test-debug-phase: new rev 6: x -> 1
342 (run 'hg update' to get a working copy)
342 (run 'hg update' to get a working copy)
343 $ hgph
343 $ hgph
344 o 6 draft n-B - 145e75495359
344 o 6 draft n-B - 145e75495359
345 |
345 |
346 o 5 draft n-A - d6bcb4f74035
346 o 5 draft n-A - d6bcb4f74035
347 |
347 |
348 | o 4 public a-D - b555f63b6063
348 | o 4 public a-D - b555f63b6063
349 | |
349 | |
350 | o 3 public a-C - 54acac6f23ab
350 | o 3 public a-C - 54acac6f23ab
351 | |
351 | |
352 o | 2 draft b-A - f54f1bb90ff3
352 o | 2 draft b-A - f54f1bb90ff3
353 |/
353 |/
354 o 1 public a-B - 548a3d25dbf0
354 o 1 public a-B - 548a3d25dbf0
355 |
355 |
356 o 0 public a-A - 054250a37db4
356 o 0 public a-A - 054250a37db4
357
357
358 $ cd ..
358 $ cd ..
359
359
360 pulling into publish=True
360 pulling into publish=True
361
361
362 $ cd alpha
362 $ cd alpha
363 $ hgph
363 $ hgph
364 o 4 public b-A - f54f1bb90ff3
364 o 4 public b-A - f54f1bb90ff3
365 |
365 |
366 | @ 3 public a-D - b555f63b6063
366 | @ 3 public a-D - b555f63b6063
367 | |
367 | |
368 | o 2 public a-C - 54acac6f23ab
368 | o 2 public a-C - 54acac6f23ab
369 |/
369 |/
370 o 1 public a-B - 548a3d25dbf0
370 o 1 public a-B - 548a3d25dbf0
371 |
371 |
372 o 0 public a-A - 054250a37db4
372 o 0 public a-A - 054250a37db4
373
373
374 $ hg pull ../mu
374 $ hg pull ../mu
375 pulling from ../mu
375 pulling from ../mu
376 searching for changes
376 searching for changes
377 adding changesets
377 adding changesets
378 adding manifests
378 adding manifests
379 adding file changes
379 adding file changes
380 added 2 changesets with 2 changes to 2 files
380 added 2 changesets with 2 changes to 2 files
381 new changesets d6bcb4f74035:145e75495359
381 new changesets d6bcb4f74035:145e75495359
382 test-debug-phase: new rev 5: x -> 1
382 test-debug-phase: new rev 5: x -> 1
383 test-debug-phase: new rev 6: x -> 1
383 test-debug-phase: new rev 6: x -> 1
384 (run 'hg update' to get a working copy)
384 (run 'hg update' to get a working copy)
385 $ hgph
385 $ hgph
386 o 6 draft n-B - 145e75495359
386 o 6 draft n-B - 145e75495359
387 |
387 |
388 o 5 draft n-A - d6bcb4f74035
388 o 5 draft n-A - d6bcb4f74035
389 |
389 |
390 o 4 public b-A - f54f1bb90ff3
390 o 4 public b-A - f54f1bb90ff3
391 |
391 |
392 | @ 3 public a-D - b555f63b6063
392 | @ 3 public a-D - b555f63b6063
393 | |
393 | |
394 | o 2 public a-C - 54acac6f23ab
394 | o 2 public a-C - 54acac6f23ab
395 |/
395 |/
396 o 1 public a-B - 548a3d25dbf0
396 o 1 public a-B - 548a3d25dbf0
397 |
397 |
398 o 0 public a-A - 054250a37db4
398 o 0 public a-A - 054250a37db4
399
399
400 $ cd ..
400 $ cd ..
401
401
402 pulling back into original repo
402 pulling back into original repo
403
403
404 $ cd nu
404 $ cd nu
405 $ hg pull ../alpha
405 $ hg pull ../alpha
406 pulling from ../alpha
406 pulling from ../alpha
407 searching for changes
407 searching for changes
408 no changes found
408 no changes found
409 test-debug-phase: move rev 3: 1 -> 0
409 test-debug-phase: move rev 3: 1 -> 0
410 test-debug-phase: move rev 5: 1 -> 0
410 test-debug-phase: move rev 5: 1 -> 0
411 test-debug-phase: move rev 6: 1 -> 0
411 test-debug-phase: move rev 6: 1 -> 0
412 $ hgph
412 $ hgph
413 @ 6 public n-B - 145e75495359
413 @ 6 public n-B - 145e75495359
414 |
414 |
415 o 5 public n-A - d6bcb4f74035
415 o 5 public n-A - d6bcb4f74035
416 |
416 |
417 | o 4 public a-D - b555f63b6063
417 | o 4 public a-D - b555f63b6063
418 | |
418 | |
419 o | 3 public b-A - f54f1bb90ff3
419 o | 3 public b-A - f54f1bb90ff3
420 | |
420 | |
421 | o 2 public a-C - 54acac6f23ab
421 | o 2 public a-C - 54acac6f23ab
422 |/
422 |/
423 o 1 public a-B - 548a3d25dbf0
423 o 1 public a-B - 548a3d25dbf0
424 |
424 |
425 o 0 public a-A - 054250a37db4
425 o 0 public a-A - 054250a37db4
426
426
427
427
428 Push
428 Push
429 ````
429 ````
430
430
431 (inserted)
431 (inserted)
432
432
433 Test that phase are pushed even when they are nothing to pus
433 Test that phase are pushed even when they are nothing to pus
434 (this might be tested later bu are very convenient to not alter too much test)
434 (this might be tested later bu are very convenient to not alter too much test)
435
435
436 Push back to alpha
436 Push back to alpha
437
437
438 $ hg push ../alpha # from nu
438 $ hg push ../alpha # from nu
439 pushing to ../alpha
439 pushing to ../alpha
440 searching for changes
440 searching for changes
441 no changes found
441 no changes found
442 test-debug-phase: move rev 5: 1 -> 0
442 test-debug-phase: move rev 5: 1 -> 0
443 test-debug-phase: move rev 6: 1 -> 0
443 test-debug-phase: move rev 6: 1 -> 0
444 [1]
444 [1]
445 $ cd ..
445 $ cd ..
446 $ cd alpha
446 $ cd alpha
447 $ hgph
447 $ hgph
448 o 6 public n-B - 145e75495359
448 o 6 public n-B - 145e75495359
449 |
449 |
450 o 5 public n-A - d6bcb4f74035
450 o 5 public n-A - d6bcb4f74035
451 |
451 |
452 o 4 public b-A - f54f1bb90ff3
452 o 4 public b-A - f54f1bb90ff3
453 |
453 |
454 | @ 3 public a-D - b555f63b6063
454 | @ 3 public a-D - b555f63b6063
455 | |
455 | |
456 | o 2 public a-C - 54acac6f23ab
456 | o 2 public a-C - 54acac6f23ab
457 |/
457 |/
458 o 1 public a-B - 548a3d25dbf0
458 o 1 public a-B - 548a3d25dbf0
459 |
459 |
460 o 0 public a-A - 054250a37db4
460 o 0 public a-A - 054250a37db4
461
461
462
462
463 (end insertion)
463 (end insertion)
464
464
465
465
466 initial setup
466 initial setup
467
467
468 $ hg log -G # of alpha
468 $ hg log -G # of alpha
469 o changeset: 6:145e75495359
469 o changeset: 6:145e75495359
470 | tag: tip
470 | tag: tip
471 | user: test
471 | user: test
472 | date: Thu Jan 01 00:00:00 1970 +0000
472 | date: Thu Jan 01 00:00:00 1970 +0000
473 | summary: n-B
473 | summary: n-B
474 |
474 |
475 o changeset: 5:d6bcb4f74035
475 o changeset: 5:d6bcb4f74035
476 | user: test
476 | user: test
477 | date: Thu Jan 01 00:00:00 1970 +0000
477 | date: Thu Jan 01 00:00:00 1970 +0000
478 | summary: n-A
478 | summary: n-A
479 |
479 |
480 o changeset: 4:f54f1bb90ff3
480 o changeset: 4:f54f1bb90ff3
481 | parent: 1:548a3d25dbf0
481 | parent: 1:548a3d25dbf0
482 | user: test
482 | user: test
483 | date: Thu Jan 01 00:00:00 1970 +0000
483 | date: Thu Jan 01 00:00:00 1970 +0000
484 | summary: b-A
484 | summary: b-A
485 |
485 |
486 | @ changeset: 3:b555f63b6063
486 | @ changeset: 3:b555f63b6063
487 | | user: test
487 | | user: test
488 | | date: Thu Jan 01 00:00:00 1970 +0000
488 | | date: Thu Jan 01 00:00:00 1970 +0000
489 | | summary: a-D
489 | | summary: a-D
490 | |
490 | |
491 | o changeset: 2:54acac6f23ab
491 | o changeset: 2:54acac6f23ab
492 |/ user: test
492 |/ user: test
493 | date: Thu Jan 01 00:00:00 1970 +0000
493 | date: Thu Jan 01 00:00:00 1970 +0000
494 | summary: a-C
494 | summary: a-C
495 |
495 |
496 o changeset: 1:548a3d25dbf0
496 o changeset: 1:548a3d25dbf0
497 | user: test
497 | user: test
498 | date: Thu Jan 01 00:00:00 1970 +0000
498 | date: Thu Jan 01 00:00:00 1970 +0000
499 | summary: a-B
499 | summary: a-B
500 |
500 |
501 o changeset: 0:054250a37db4
501 o changeset: 0:054250a37db4
502 user: test
502 user: test
503 date: Thu Jan 01 00:00:00 1970 +0000
503 date: Thu Jan 01 00:00:00 1970 +0000
504 summary: a-A
504 summary: a-A
505
505
506 $ mkcommit a-E
506 $ mkcommit a-E
507 test-debug-phase: new rev 7: x -> 1
507 test-debug-phase: new rev 7: x -> 1
508 $ mkcommit a-F
508 $ mkcommit a-F
509 test-debug-phase: new rev 8: x -> 1
509 test-debug-phase: new rev 8: x -> 1
510 $ mkcommit a-G
510 $ mkcommit a-G
511 test-debug-phase: new rev 9: x -> 1
511 test-debug-phase: new rev 9: x -> 1
512 $ hg up d6bcb4f74035 -q
512 $ hg up d6bcb4f74035 -q
513 $ mkcommit a-H
513 $ mkcommit a-H
514 test-debug-phase: new rev 10: x -> 1
514 test-debug-phase: new rev 10: x -> 1
515 created new head
515 created new head
516 $ hgph
516 $ hgph
517 @ 10 draft a-H - 967b449fbc94
517 @ 10 draft a-H - 967b449fbc94
518 |
518 |
519 | o 9 draft a-G - 3e27b6f1eee1
519 | o 9 draft a-G - 3e27b6f1eee1
520 | |
520 | |
521 | o 8 draft a-F - b740e3e5c05d
521 | o 8 draft a-F - b740e3e5c05d
522 | |
522 | |
523 | o 7 draft a-E - e9f537e46dea
523 | o 7 draft a-E - e9f537e46dea
524 | |
524 | |
525 +---o 6 public n-B - 145e75495359
525 +---o 6 public n-B - 145e75495359
526 | |
526 | |
527 o | 5 public n-A - d6bcb4f74035
527 o | 5 public n-A - d6bcb4f74035
528 | |
528 | |
529 o | 4 public b-A - f54f1bb90ff3
529 o | 4 public b-A - f54f1bb90ff3
530 | |
530 | |
531 | o 3 public a-D - b555f63b6063
531 | o 3 public a-D - b555f63b6063
532 | |
532 | |
533 | o 2 public a-C - 54acac6f23ab
533 | o 2 public a-C - 54acac6f23ab
534 |/
534 |/
535 o 1 public a-B - 548a3d25dbf0
535 o 1 public a-B - 548a3d25dbf0
536 |
536 |
537 o 0 public a-A - 054250a37db4
537 o 0 public a-A - 054250a37db4
538
538
539
539
540 Pulling from bundle does not alter phases of changeset not present in the bundle
540 Pulling from bundle does not alter phases of changeset not present in the bundle
541
541
542 #if repobundlerepo
542 $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
543 $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
543 5 changesets found
544 5 changesets found
544 $ hg pull ../partial-bundle.hg
545 $ hg pull ../partial-bundle.hg
545 pulling from ../partial-bundle.hg
546 pulling from ../partial-bundle.hg
546 searching for changes
547 searching for changes
547 no changes found
548 no changes found
548 $ hgph
549 $ hgph
549 @ 10 draft a-H - 967b449fbc94
550 @ 10 draft a-H - 967b449fbc94
550 |
551 |
551 | o 9 draft a-G - 3e27b6f1eee1
552 | o 9 draft a-G - 3e27b6f1eee1
552 | |
553 | |
553 | o 8 draft a-F - b740e3e5c05d
554 | o 8 draft a-F - b740e3e5c05d
554 | |
555 | |
555 | o 7 draft a-E - e9f537e46dea
556 | o 7 draft a-E - e9f537e46dea
556 | |
557 | |
557 +---o 6 public n-B - 145e75495359
558 +---o 6 public n-B - 145e75495359
558 | |
559 | |
559 o | 5 public n-A - d6bcb4f74035
560 o | 5 public n-A - d6bcb4f74035
560 | |
561 | |
561 o | 4 public b-A - f54f1bb90ff3
562 o | 4 public b-A - f54f1bb90ff3
562 | |
563 | |
563 | o 3 public a-D - b555f63b6063
564 | o 3 public a-D - b555f63b6063
564 | |
565 | |
565 | o 2 public a-C - 54acac6f23ab
566 | o 2 public a-C - 54acac6f23ab
566 |/
567 |/
567 o 1 public a-B - 548a3d25dbf0
568 o 1 public a-B - 548a3d25dbf0
568 |
569 |
569 o 0 public a-A - 054250a37db4
570 o 0 public a-A - 054250a37db4
570
571
572 #endif
571
573
572 Pushing to Publish=False (unknown changeset)
574 Pushing to Publish=False (unknown changeset)
573
575
574 $ hg push ../mu -r b740e3e5c05d # a-F
576 $ hg push ../mu -r b740e3e5c05d # a-F
575 pushing to ../mu
577 pushing to ../mu
576 searching for changes
578 searching for changes
577 adding changesets
579 adding changesets
578 adding manifests
580 adding manifests
579 adding file changes
581 adding file changes
580 added 2 changesets with 2 changes to 2 files
582 added 2 changesets with 2 changes to 2 files
581 test-debug-phase: new rev 7: x -> 1
583 test-debug-phase: new rev 7: x -> 1
582 test-debug-phase: new rev 8: x -> 1
584 test-debug-phase: new rev 8: x -> 1
583 $ hgph
585 $ hgph
584 @ 10 draft a-H - 967b449fbc94
586 @ 10 draft a-H - 967b449fbc94
585 |
587 |
586 | o 9 draft a-G - 3e27b6f1eee1
588 | o 9 draft a-G - 3e27b6f1eee1
587 | |
589 | |
588 | o 8 draft a-F - b740e3e5c05d
590 | o 8 draft a-F - b740e3e5c05d
589 | |
591 | |
590 | o 7 draft a-E - e9f537e46dea
592 | o 7 draft a-E - e9f537e46dea
591 | |
593 | |
592 +---o 6 public n-B - 145e75495359
594 +---o 6 public n-B - 145e75495359
593 | |
595 | |
594 o | 5 public n-A - d6bcb4f74035
596 o | 5 public n-A - d6bcb4f74035
595 | |
597 | |
596 o | 4 public b-A - f54f1bb90ff3
598 o | 4 public b-A - f54f1bb90ff3
597 | |
599 | |
598 | o 3 public a-D - b555f63b6063
600 | o 3 public a-D - b555f63b6063
599 | |
601 | |
600 | o 2 public a-C - 54acac6f23ab
602 | o 2 public a-C - 54acac6f23ab
601 |/
603 |/
602 o 1 public a-B - 548a3d25dbf0
604 o 1 public a-B - 548a3d25dbf0
603 |
605 |
604 o 0 public a-A - 054250a37db4
606 o 0 public a-A - 054250a37db4
605
607
606
608
607 $ cd ../mu
609 $ cd ../mu
608 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
610 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
609 > # not ancestor of -r
611 > # not ancestor of -r
610 o 8 draft a-F - b740e3e5c05d
612 o 8 draft a-F - b740e3e5c05d
611 |
613 |
612 o 7 draft a-E - e9f537e46dea
614 o 7 draft a-E - e9f537e46dea
613 |
615 |
614 | o 6 draft n-B - 145e75495359
616 | o 6 draft n-B - 145e75495359
615 | |
617 | |
616 | o 5 draft n-A - d6bcb4f74035
618 | o 5 draft n-A - d6bcb4f74035
617 | |
619 | |
618 o | 4 public a-D - b555f63b6063
620 o | 4 public a-D - b555f63b6063
619 | |
621 | |
620 o | 3 public a-C - 54acac6f23ab
622 o | 3 public a-C - 54acac6f23ab
621 | |
623 | |
622 | o 2 draft b-A - f54f1bb90ff3
624 | o 2 draft b-A - f54f1bb90ff3
623 |/
625 |/
624 o 1 public a-B - 548a3d25dbf0
626 o 1 public a-B - 548a3d25dbf0
625 |
627 |
626 o 0 public a-A - 054250a37db4
628 o 0 public a-A - 054250a37db4
627
629
628
630
629 Pushing to Publish=True (unknown changeset)
631 Pushing to Publish=True (unknown changeset)
630
632
631 $ hg push ../beta -r b740e3e5c05d
633 $ hg push ../beta -r b740e3e5c05d
632 pushing to ../beta
634 pushing to ../beta
633 searching for changes
635 searching for changes
634 adding changesets
636 adding changesets
635 adding manifests
637 adding manifests
636 adding file changes
638 adding file changes
637 added 2 changesets with 2 changes to 2 files
639 added 2 changesets with 2 changes to 2 files
638 test-debug-phase: new rev 5: x -> 0
640 test-debug-phase: new rev 5: x -> 0
639 test-debug-phase: new rev 6: x -> 0
641 test-debug-phase: new rev 6: x -> 0
640 test-debug-phase: move rev 7: 1 -> 0
642 test-debug-phase: move rev 7: 1 -> 0
641 test-debug-phase: move rev 8: 1 -> 0
643 test-debug-phase: move rev 8: 1 -> 0
642 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
644 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
643 > # not ancestor of -r
645 > # not ancestor of -r
644 o 8 public a-F - b740e3e5c05d
646 o 8 public a-F - b740e3e5c05d
645 |
647 |
646 o 7 public a-E - e9f537e46dea
648 o 7 public a-E - e9f537e46dea
647 |
649 |
648 | o 6 draft n-B - 145e75495359
650 | o 6 draft n-B - 145e75495359
649 | |
651 | |
650 | o 5 draft n-A - d6bcb4f74035
652 | o 5 draft n-A - d6bcb4f74035
651 | |
653 | |
652 o | 4 public a-D - b555f63b6063
654 o | 4 public a-D - b555f63b6063
653 | |
655 | |
654 o | 3 public a-C - 54acac6f23ab
656 o | 3 public a-C - 54acac6f23ab
655 | |
657 | |
656 | o 2 draft b-A - f54f1bb90ff3
658 | o 2 draft b-A - f54f1bb90ff3
657 |/
659 |/
658 o 1 public a-B - 548a3d25dbf0
660 o 1 public a-B - 548a3d25dbf0
659 |
661 |
660 o 0 public a-A - 054250a37db4
662 o 0 public a-A - 054250a37db4
661
663
662
664
663 Pushing to Publish=True (common changeset)
665 Pushing to Publish=True (common changeset)
664
666
665 $ cd ../beta
667 $ cd ../beta
666 $ hg push ../alpha
668 $ hg push ../alpha
667 pushing to ../alpha
669 pushing to ../alpha
668 searching for changes
670 searching for changes
669 no changes found
671 no changes found
670 test-debug-phase: move rev 7: 1 -> 0
672 test-debug-phase: move rev 7: 1 -> 0
671 test-debug-phase: move rev 8: 1 -> 0
673 test-debug-phase: move rev 8: 1 -> 0
672 [1]
674 [1]
673 $ hgph
675 $ hgph
674 o 6 public a-F - b740e3e5c05d
676 o 6 public a-F - b740e3e5c05d
675 |
677 |
676 o 5 public a-E - e9f537e46dea
678 o 5 public a-E - e9f537e46dea
677 |
679 |
678 o 4 public a-D - b555f63b6063
680 o 4 public a-D - b555f63b6063
679 |
681 |
680 o 3 public a-C - 54acac6f23ab
682 o 3 public a-C - 54acac6f23ab
681 |
683 |
682 | @ 2 public b-A - f54f1bb90ff3
684 | @ 2 public b-A - f54f1bb90ff3
683 |/
685 |/
684 o 1 public a-B - 548a3d25dbf0
686 o 1 public a-B - 548a3d25dbf0
685 |
687 |
686 o 0 public a-A - 054250a37db4
688 o 0 public a-A - 054250a37db4
687
689
688 $ cd ../alpha
690 $ cd ../alpha
689 $ hgph
691 $ hgph
690 @ 10 draft a-H - 967b449fbc94
692 @ 10 draft a-H - 967b449fbc94
691 |
693 |
692 | o 9 draft a-G - 3e27b6f1eee1
694 | o 9 draft a-G - 3e27b6f1eee1
693 | |
695 | |
694 | o 8 public a-F - b740e3e5c05d
696 | o 8 public a-F - b740e3e5c05d
695 | |
697 | |
696 | o 7 public a-E - e9f537e46dea
698 | o 7 public a-E - e9f537e46dea
697 | |
699 | |
698 +---o 6 public n-B - 145e75495359
700 +---o 6 public n-B - 145e75495359
699 | |
701 | |
700 o | 5 public n-A - d6bcb4f74035
702 o | 5 public n-A - d6bcb4f74035
701 | |
703 | |
702 o | 4 public b-A - f54f1bb90ff3
704 o | 4 public b-A - f54f1bb90ff3
703 | |
705 | |
704 | o 3 public a-D - b555f63b6063
706 | o 3 public a-D - b555f63b6063
705 | |
707 | |
706 | o 2 public a-C - 54acac6f23ab
708 | o 2 public a-C - 54acac6f23ab
707 |/
709 |/
708 o 1 public a-B - 548a3d25dbf0
710 o 1 public a-B - 548a3d25dbf0
709 |
711 |
710 o 0 public a-A - 054250a37db4
712 o 0 public a-A - 054250a37db4
711
713
712
714
713 Pushing to Publish=False (common changeset that change phase + unknown one)
715 Pushing to Publish=False (common changeset that change phase + unknown one)
714
716
715 $ hg push ../mu -r 967b449fbc94 -f
717 $ hg push ../mu -r 967b449fbc94 -f
716 pushing to ../mu
718 pushing to ../mu
717 searching for changes
719 searching for changes
718 adding changesets
720 adding changesets
719 adding manifests
721 adding manifests
720 adding file changes
722 adding file changes
721 added 1 changesets with 1 changes to 1 files (+1 heads)
723 added 1 changesets with 1 changes to 1 files (+1 heads)
722 test-debug-phase: move rev 2: 1 -> 0
724 test-debug-phase: move rev 2: 1 -> 0
723 test-debug-phase: move rev 5: 1 -> 0
725 test-debug-phase: move rev 5: 1 -> 0
724 test-debug-phase: new rev 9: x -> 1
726 test-debug-phase: new rev 9: x -> 1
725 $ hgph
727 $ hgph
726 @ 10 draft a-H - 967b449fbc94
728 @ 10 draft a-H - 967b449fbc94
727 |
729 |
728 | o 9 draft a-G - 3e27b6f1eee1
730 | o 9 draft a-G - 3e27b6f1eee1
729 | |
731 | |
730 | o 8 public a-F - b740e3e5c05d
732 | o 8 public a-F - b740e3e5c05d
731 | |
733 | |
732 | o 7 public a-E - e9f537e46dea
734 | o 7 public a-E - e9f537e46dea
733 | |
735 | |
734 +---o 6 public n-B - 145e75495359
736 +---o 6 public n-B - 145e75495359
735 | |
737 | |
736 o | 5 public n-A - d6bcb4f74035
738 o | 5 public n-A - d6bcb4f74035
737 | |
739 | |
738 o | 4 public b-A - f54f1bb90ff3
740 o | 4 public b-A - f54f1bb90ff3
739 | |
741 | |
740 | o 3 public a-D - b555f63b6063
742 | o 3 public a-D - b555f63b6063
741 | |
743 | |
742 | o 2 public a-C - 54acac6f23ab
744 | o 2 public a-C - 54acac6f23ab
743 |/
745 |/
744 o 1 public a-B - 548a3d25dbf0
746 o 1 public a-B - 548a3d25dbf0
745 |
747 |
746 o 0 public a-A - 054250a37db4
748 o 0 public a-A - 054250a37db4
747
749
748 $ cd ../mu
750 $ cd ../mu
749 $ hgph # d6bcb4f74035 should have changed phase
751 $ hgph # d6bcb4f74035 should have changed phase
750 > # 145e75495359 is still draft. not ancestor of -r
752 > # 145e75495359 is still draft. not ancestor of -r
751 o 9 draft a-H - 967b449fbc94
753 o 9 draft a-H - 967b449fbc94
752 |
754 |
753 | o 8 public a-F - b740e3e5c05d
755 | o 8 public a-F - b740e3e5c05d
754 | |
756 | |
755 | o 7 public a-E - e9f537e46dea
757 | o 7 public a-E - e9f537e46dea
756 | |
758 | |
757 +---o 6 draft n-B - 145e75495359
759 +---o 6 draft n-B - 145e75495359
758 | |
760 | |
759 o | 5 public n-A - d6bcb4f74035
761 o | 5 public n-A - d6bcb4f74035
760 | |
762 | |
761 | o 4 public a-D - b555f63b6063
763 | o 4 public a-D - b555f63b6063
762 | |
764 | |
763 | o 3 public a-C - 54acac6f23ab
765 | o 3 public a-C - 54acac6f23ab
764 | |
766 | |
765 o | 2 public b-A - f54f1bb90ff3
767 o | 2 public b-A - f54f1bb90ff3
766 |/
768 |/
767 o 1 public a-B - 548a3d25dbf0
769 o 1 public a-B - 548a3d25dbf0
768 |
770 |
769 o 0 public a-A - 054250a37db4
771 o 0 public a-A - 054250a37db4
770
772
771
773
772
774
773 Pushing to Publish=True (common changeset from publish=False)
775 Pushing to Publish=True (common changeset from publish=False)
774
776
775 (in mu)
777 (in mu)
776 $ hg push ../alpha
778 $ hg push ../alpha
777 pushing to ../alpha
779 pushing to ../alpha
778 searching for changes
780 searching for changes
779 no changes found
781 no changes found
780 test-debug-phase: move rev 10: 1 -> 0
782 test-debug-phase: move rev 10: 1 -> 0
781 test-debug-phase: move rev 6: 1 -> 0
783 test-debug-phase: move rev 6: 1 -> 0
782 test-debug-phase: move rev 9: 1 -> 0
784 test-debug-phase: move rev 9: 1 -> 0
783 [1]
785 [1]
784 $ hgph
786 $ hgph
785 o 9 public a-H - 967b449fbc94
787 o 9 public a-H - 967b449fbc94
786 |
788 |
787 | o 8 public a-F - b740e3e5c05d
789 | o 8 public a-F - b740e3e5c05d
788 | |
790 | |
789 | o 7 public a-E - e9f537e46dea
791 | o 7 public a-E - e9f537e46dea
790 | |
792 | |
791 +---o 6 public n-B - 145e75495359
793 +---o 6 public n-B - 145e75495359
792 | |
794 | |
793 o | 5 public n-A - d6bcb4f74035
795 o | 5 public n-A - d6bcb4f74035
794 | |
796 | |
795 | o 4 public a-D - b555f63b6063
797 | o 4 public a-D - b555f63b6063
796 | |
798 | |
797 | o 3 public a-C - 54acac6f23ab
799 | o 3 public a-C - 54acac6f23ab
798 | |
800 | |
799 o | 2 public b-A - f54f1bb90ff3
801 o | 2 public b-A - f54f1bb90ff3
800 |/
802 |/
801 o 1 public a-B - 548a3d25dbf0
803 o 1 public a-B - 548a3d25dbf0
802 |
804 |
803 o 0 public a-A - 054250a37db4
805 o 0 public a-A - 054250a37db4
804
806
805 $ hgph -R ../alpha # a-H should have been synced to 0
807 $ hgph -R ../alpha # a-H should have been synced to 0
806 @ 10 public a-H - 967b449fbc94
808 @ 10 public a-H - 967b449fbc94
807 |
809 |
808 | o 9 draft a-G - 3e27b6f1eee1
810 | o 9 draft a-G - 3e27b6f1eee1
809 | |
811 | |
810 | o 8 public a-F - b740e3e5c05d
812 | o 8 public a-F - b740e3e5c05d
811 | |
813 | |
812 | o 7 public a-E - e9f537e46dea
814 | o 7 public a-E - e9f537e46dea
813 | |
815 | |
814 +---o 6 public n-B - 145e75495359
816 +---o 6 public n-B - 145e75495359
815 | |
817 | |
816 o | 5 public n-A - d6bcb4f74035
818 o | 5 public n-A - d6bcb4f74035
817 | |
819 | |
818 o | 4 public b-A - f54f1bb90ff3
820 o | 4 public b-A - f54f1bb90ff3
819 | |
821 | |
820 | o 3 public a-D - b555f63b6063
822 | o 3 public a-D - b555f63b6063
821 | |
823 | |
822 | o 2 public a-C - 54acac6f23ab
824 | o 2 public a-C - 54acac6f23ab
823 |/
825 |/
824 o 1 public a-B - 548a3d25dbf0
826 o 1 public a-B - 548a3d25dbf0
825 |
827 |
826 o 0 public a-A - 054250a37db4
828 o 0 public a-A - 054250a37db4
827
829
828
830
829
831
830 Bare push with next changeset and common changeset needing sync (issue3575)
832 Bare push with next changeset and common changeset needing sync (issue3575)
831
833
832 (reset some stat on remote repo to avoid confusing other tests)
834 (reset some stat on remote repo to avoid confusing other tests)
833
835
834 $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94
836 $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94
835 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
837 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
836 $ hg phase --force --draft b740e3e5c05d 967b449fbc94
838 $ hg phase --force --draft b740e3e5c05d 967b449fbc94
837 test-debug-phase: move rev 8: 0 -> 1
839 test-debug-phase: move rev 8: 0 -> 1
838 test-debug-phase: move rev 9: 0 -> 1
840 test-debug-phase: move rev 9: 0 -> 1
839 $ hg push -fv ../alpha
841 $ hg push -fv ../alpha
840 pushing to ../alpha
842 pushing to ../alpha
841 searching for changes
843 searching for changes
842 1 changesets found
844 1 changesets found
843 uncompressed size of bundle content:
845 uncompressed size of bundle content:
844 178 (changelog)
846 178 (changelog)
845 165 (manifests)
847 165 (manifests)
846 131 a-H
848 131 a-H
847 adding changesets
849 adding changesets
848 adding manifests
850 adding manifests
849 adding file changes
851 adding file changes
850 added 1 changesets with 1 changes to 1 files (+1 heads)
852 added 1 changesets with 1 changes to 1 files (+1 heads)
851 test-debug-phase: new rev 10: x -> 0
853 test-debug-phase: new rev 10: x -> 0
852 test-debug-phase: move rev 8: 1 -> 0
854 test-debug-phase: move rev 8: 1 -> 0
853 test-debug-phase: move rev 9: 1 -> 0
855 test-debug-phase: move rev 9: 1 -> 0
854 $ hgph
856 $ hgph
855 o 9 public a-H - 967b449fbc94
857 o 9 public a-H - 967b449fbc94
856 |
858 |
857 | o 8 public a-F - b740e3e5c05d
859 | o 8 public a-F - b740e3e5c05d
858 | |
860 | |
859 | o 7 public a-E - e9f537e46dea
861 | o 7 public a-E - e9f537e46dea
860 | |
862 | |
861 +---o 6 public n-B - 145e75495359
863 +---o 6 public n-B - 145e75495359
862 | |
864 | |
863 o | 5 public n-A - d6bcb4f74035
865 o | 5 public n-A - d6bcb4f74035
864 | |
866 | |
865 | o 4 public a-D - b555f63b6063
867 | o 4 public a-D - b555f63b6063
866 | |
868 | |
867 | o 3 public a-C - 54acac6f23ab
869 | o 3 public a-C - 54acac6f23ab
868 | |
870 | |
869 o | 2 public b-A - f54f1bb90ff3
871 o | 2 public b-A - f54f1bb90ff3
870 |/
872 |/
871 o 1 public a-B - 548a3d25dbf0
873 o 1 public a-B - 548a3d25dbf0
872 |
874 |
873 o 0 public a-A - 054250a37db4
875 o 0 public a-A - 054250a37db4
874
876
875
877
876 $ hg -R ../alpha update 967b449fbc94 #for latter test consistency
878 $ hg -R ../alpha update 967b449fbc94 #for latter test consistency
877 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
879 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
878 $ hgph -R ../alpha
880 $ hgph -R ../alpha
879 @ 10 public a-H - 967b449fbc94
881 @ 10 public a-H - 967b449fbc94
880 |
882 |
881 | o 9 draft a-G - 3e27b6f1eee1
883 | o 9 draft a-G - 3e27b6f1eee1
882 | |
884 | |
883 | o 8 public a-F - b740e3e5c05d
885 | o 8 public a-F - b740e3e5c05d
884 | |
886 | |
885 | o 7 public a-E - e9f537e46dea
887 | o 7 public a-E - e9f537e46dea
886 | |
888 | |
887 +---o 6 public n-B - 145e75495359
889 +---o 6 public n-B - 145e75495359
888 | |
890 | |
889 o | 5 public n-A - d6bcb4f74035
891 o | 5 public n-A - d6bcb4f74035
890 | |
892 | |
891 o | 4 public b-A - f54f1bb90ff3
893 o | 4 public b-A - f54f1bb90ff3
892 | |
894 | |
893 | o 3 public a-D - b555f63b6063
895 | o 3 public a-D - b555f63b6063
894 | |
896 | |
895 | o 2 public a-C - 54acac6f23ab
897 | o 2 public a-C - 54acac6f23ab
896 |/
898 |/
897 o 1 public a-B - 548a3d25dbf0
899 o 1 public a-B - 548a3d25dbf0
898 |
900 |
899 o 0 public a-A - 054250a37db4
901 o 0 public a-A - 054250a37db4
900
902
901
903
902 Discovery locally secret changeset on a remote repository:
904 Discovery locally secret changeset on a remote repository:
903
905
904 - should make it non-secret
906 - should make it non-secret
905
907
906 $ cd ../alpha
908 $ cd ../alpha
907 $ mkcommit A-secret --config phases.new-commit=2
909 $ mkcommit A-secret --config phases.new-commit=2
908 test-debug-phase: new rev 11: x -> 2
910 test-debug-phase: new rev 11: x -> 2
909 $ hgph
911 $ hgph
910 @ 11 secret A-secret - 435b5d83910c
912 @ 11 secret A-secret - 435b5d83910c
911 |
913 |
912 o 10 public a-H - 967b449fbc94
914 o 10 public a-H - 967b449fbc94
913 |
915 |
914 | o 9 draft a-G - 3e27b6f1eee1
916 | o 9 draft a-G - 3e27b6f1eee1
915 | |
917 | |
916 | o 8 public a-F - b740e3e5c05d
918 | o 8 public a-F - b740e3e5c05d
917 | |
919 | |
918 | o 7 public a-E - e9f537e46dea
920 | o 7 public a-E - e9f537e46dea
919 | |
921 | |
920 +---o 6 public n-B - 145e75495359
922 +---o 6 public n-B - 145e75495359
921 | |
923 | |
922 o | 5 public n-A - d6bcb4f74035
924 o | 5 public n-A - d6bcb4f74035
923 | |
925 | |
924 o | 4 public b-A - f54f1bb90ff3
926 o | 4 public b-A - f54f1bb90ff3
925 | |
927 | |
926 | o 3 public a-D - b555f63b6063
928 | o 3 public a-D - b555f63b6063
927 | |
929 | |
928 | o 2 public a-C - 54acac6f23ab
930 | o 2 public a-C - 54acac6f23ab
929 |/
931 |/
930 o 1 public a-B - 548a3d25dbf0
932 o 1 public a-B - 548a3d25dbf0
931 |
933 |
932 o 0 public a-A - 054250a37db4
934 o 0 public a-A - 054250a37db4
933
935
934 $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
936 $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
935 1 changesets found
937 1 changesets found
936 $ hg -R ../mu unbundle ../secret-bundle.hg
938 $ hg -R ../mu unbundle ../secret-bundle.hg
937 adding changesets
939 adding changesets
938 adding manifests
940 adding manifests
939 adding file changes
941 adding file changes
940 added 1 changesets with 1 changes to 1 files
942 added 1 changesets with 1 changes to 1 files
941 new changesets 435b5d83910c
943 new changesets 435b5d83910c
942 test-debug-phase: new rev 10: x -> 1
944 test-debug-phase: new rev 10: x -> 1
943 (run 'hg update' to get a working copy)
945 (run 'hg update' to get a working copy)
944 $ hgph -R ../mu
946 $ hgph -R ../mu
945 o 10 draft A-secret - 435b5d83910c
947 o 10 draft A-secret - 435b5d83910c
946 |
948 |
947 o 9 public a-H - 967b449fbc94
949 o 9 public a-H - 967b449fbc94
948 |
950 |
949 | o 8 public a-F - b740e3e5c05d
951 | o 8 public a-F - b740e3e5c05d
950 | |
952 | |
951 | o 7 public a-E - e9f537e46dea
953 | o 7 public a-E - e9f537e46dea
952 | |
954 | |
953 +---o 6 public n-B - 145e75495359
955 +---o 6 public n-B - 145e75495359
954 | |
956 | |
955 o | 5 public n-A - d6bcb4f74035
957 o | 5 public n-A - d6bcb4f74035
956 | |
958 | |
957 | o 4 public a-D - b555f63b6063
959 | o 4 public a-D - b555f63b6063
958 | |
960 | |
959 | o 3 public a-C - 54acac6f23ab
961 | o 3 public a-C - 54acac6f23ab
960 | |
962 | |
961 o | 2 public b-A - f54f1bb90ff3
963 o | 2 public b-A - f54f1bb90ff3
962 |/
964 |/
963 o 1 public a-B - 548a3d25dbf0
965 o 1 public a-B - 548a3d25dbf0
964 |
966 |
965 o 0 public a-A - 054250a37db4
967 o 0 public a-A - 054250a37db4
966
968
967 $ hg pull ../mu
969 $ hg pull ../mu
968 pulling from ../mu
970 pulling from ../mu
969 searching for changes
971 searching for changes
970 no changes found
972 no changes found
971 test-debug-phase: move rev 11: 2 -> 1
973 test-debug-phase: move rev 11: 2 -> 1
972 $ hgph
974 $ hgph
973 @ 11 draft A-secret - 435b5d83910c
975 @ 11 draft A-secret - 435b5d83910c
974 |
976 |
975 o 10 public a-H - 967b449fbc94
977 o 10 public a-H - 967b449fbc94
976 |
978 |
977 | o 9 draft a-G - 3e27b6f1eee1
979 | o 9 draft a-G - 3e27b6f1eee1
978 | |
980 | |
979 | o 8 public a-F - b740e3e5c05d
981 | o 8 public a-F - b740e3e5c05d
980 | |
982 | |
981 | o 7 public a-E - e9f537e46dea
983 | o 7 public a-E - e9f537e46dea
982 | |
984 | |
983 +---o 6 public n-B - 145e75495359
985 +---o 6 public n-B - 145e75495359
984 | |
986 | |
985 o | 5 public n-A - d6bcb4f74035
987 o | 5 public n-A - d6bcb4f74035
986 | |
988 | |
987 o | 4 public b-A - f54f1bb90ff3
989 o | 4 public b-A - f54f1bb90ff3
988 | |
990 | |
989 | o 3 public a-D - b555f63b6063
991 | o 3 public a-D - b555f63b6063
990 | |
992 | |
991 | o 2 public a-C - 54acac6f23ab
993 | o 2 public a-C - 54acac6f23ab
992 |/
994 |/
993 o 1 public a-B - 548a3d25dbf0
995 o 1 public a-B - 548a3d25dbf0
994 |
996 |
995 o 0 public a-A - 054250a37db4
997 o 0 public a-A - 054250a37db4
996
998
997
999
998 pushing a locally public and draft changesets remotely secret should make them
1000 pushing a locally public and draft changesets remotely secret should make them
999 appear on the remote side.
1001 appear on the remote side.
1000
1002
1001 $ hg -R ../mu phase --secret --force 967b449fbc94
1003 $ hg -R ../mu phase --secret --force 967b449fbc94
1002 test-debug-phase: move rev 9: 0 -> 2
1004 test-debug-phase: move rev 9: 0 -> 2
1003 test-debug-phase: move rev 10: 1 -> 2
1005 test-debug-phase: move rev 10: 1 -> 2
1004 $ hg push -r 435b5d83910c ../mu
1006 $ hg push -r 435b5d83910c ../mu
1005 pushing to ../mu
1007 pushing to ../mu
1006 searching for changes
1008 searching for changes
1007 abort: push creates new remote head 435b5d83910c!
1009 abort: push creates new remote head 435b5d83910c!
1008 (merge or see 'hg help push' for details about pushing new heads)
1010 (merge or see 'hg help push' for details about pushing new heads)
1009 [255]
1011 [255]
1010 $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
1012 $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
1011 pushing to ../mu
1013 pushing to ../mu
1012 searching for changes
1014 searching for changes
1013 adding changesets
1015 adding changesets
1014 adding manifests
1016 adding manifests
1015 adding file changes
1017 adding file changes
1016 added 0 changesets with 0 changes to 2 files
1018 added 0 changesets with 0 changes to 2 files
1017 test-debug-phase: move rev 9: 2 -> 0
1019 test-debug-phase: move rev 9: 2 -> 0
1018 test-debug-phase: move rev 10: 2 -> 1
1020 test-debug-phase: move rev 10: 2 -> 1
1019 $ hgph -R ../mu
1021 $ hgph -R ../mu
1020 o 10 draft A-secret - 435b5d83910c
1022 o 10 draft A-secret - 435b5d83910c
1021 |
1023 |
1022 o 9 public a-H - 967b449fbc94
1024 o 9 public a-H - 967b449fbc94
1023 |
1025 |
1024 | o 8 public a-F - b740e3e5c05d
1026 | o 8 public a-F - b740e3e5c05d
1025 | |
1027 | |
1026 | o 7 public a-E - e9f537e46dea
1028 | o 7 public a-E - e9f537e46dea
1027 | |
1029 | |
1028 +---o 6 public n-B - 145e75495359
1030 +---o 6 public n-B - 145e75495359
1029 | |
1031 | |
1030 o | 5 public n-A - d6bcb4f74035
1032 o | 5 public n-A - d6bcb4f74035
1031 | |
1033 | |
1032 | o 4 public a-D - b555f63b6063
1034 | o 4 public a-D - b555f63b6063
1033 | |
1035 | |
1034 | o 3 public a-C - 54acac6f23ab
1036 | o 3 public a-C - 54acac6f23ab
1035 | |
1037 | |
1036 o | 2 public b-A - f54f1bb90ff3
1038 o | 2 public b-A - f54f1bb90ff3
1037 |/
1039 |/
1038 o 1 public a-B - 548a3d25dbf0
1040 o 1 public a-B - 548a3d25dbf0
1039 |
1041 |
1040 o 0 public a-A - 054250a37db4
1042 o 0 public a-A - 054250a37db4
1041
1043
1042
1044
1043 pull new changeset with common draft locally
1045 pull new changeset with common draft locally
1044
1046
1045 $ hg up -q 967b449fbc94 # create a new root for draft
1047 $ hg up -q 967b449fbc94 # create a new root for draft
1046 $ mkcommit 'alpha-more'
1048 $ mkcommit 'alpha-more'
1047 test-debug-phase: new rev 12: x -> 1
1049 test-debug-phase: new rev 12: x -> 1
1048 created new head
1050 created new head
1049 $ hg push -fr . ../mu
1051 $ hg push -fr . ../mu
1050 pushing to ../mu
1052 pushing to ../mu
1051 searching for changes
1053 searching for changes
1052 adding changesets
1054 adding changesets
1053 adding manifests
1055 adding manifests
1054 adding file changes
1056 adding file changes
1055 added 1 changesets with 1 changes to 1 files (+1 heads)
1057 added 1 changesets with 1 changes to 1 files (+1 heads)
1056 test-debug-phase: new rev 11: x -> 1
1058 test-debug-phase: new rev 11: x -> 1
1057 $ cd ../mu
1059 $ cd ../mu
1058 $ hg phase --secret --force 1c5cfd894796
1060 $ hg phase --secret --force 1c5cfd894796
1059 test-debug-phase: move rev 11: 1 -> 2
1061 test-debug-phase: move rev 11: 1 -> 2
1060 $ hg up -q 435b5d83910c
1062 $ hg up -q 435b5d83910c
1061 $ mkcommit 'mu-more'
1063 $ mkcommit 'mu-more'
1062 test-debug-phase: new rev 12: x -> 1
1064 test-debug-phase: new rev 12: x -> 1
1063 $ cd ../alpha
1065 $ cd ../alpha
1064 $ hg pull ../mu
1066 $ hg pull ../mu
1065 pulling from ../mu
1067 pulling from ../mu
1066 searching for changes
1068 searching for changes
1067 adding changesets
1069 adding changesets
1068 adding manifests
1070 adding manifests
1069 adding file changes
1071 adding file changes
1070 added 1 changesets with 1 changes to 1 files
1072 added 1 changesets with 1 changes to 1 files
1071 new changesets 5237fb433fc8
1073 new changesets 5237fb433fc8
1072 test-debug-phase: new rev 13: x -> 1
1074 test-debug-phase: new rev 13: x -> 1
1073 (run 'hg update' to get a working copy)
1075 (run 'hg update' to get a working copy)
1074 $ hgph
1076 $ hgph
1075 o 13 draft mu-more - 5237fb433fc8
1077 o 13 draft mu-more - 5237fb433fc8
1076 |
1078 |
1077 | @ 12 draft alpha-more - 1c5cfd894796
1079 | @ 12 draft alpha-more - 1c5cfd894796
1078 | |
1080 | |
1079 o | 11 draft A-secret - 435b5d83910c
1081 o | 11 draft A-secret - 435b5d83910c
1080 |/
1082 |/
1081 o 10 public a-H - 967b449fbc94
1083 o 10 public a-H - 967b449fbc94
1082 |
1084 |
1083 | o 9 draft a-G - 3e27b6f1eee1
1085 | o 9 draft a-G - 3e27b6f1eee1
1084 | |
1086 | |
1085 | o 8 public a-F - b740e3e5c05d
1087 | o 8 public a-F - b740e3e5c05d
1086 | |
1088 | |
1087 | o 7 public a-E - e9f537e46dea
1089 | o 7 public a-E - e9f537e46dea
1088 | |
1090 | |
1089 +---o 6 public n-B - 145e75495359
1091 +---o 6 public n-B - 145e75495359
1090 | |
1092 | |
1091 o | 5 public n-A - d6bcb4f74035
1093 o | 5 public n-A - d6bcb4f74035
1092 | |
1094 | |
1093 o | 4 public b-A - f54f1bb90ff3
1095 o | 4 public b-A - f54f1bb90ff3
1094 | |
1096 | |
1095 | o 3 public a-D - b555f63b6063
1097 | o 3 public a-D - b555f63b6063
1096 | |
1098 | |
1097 | o 2 public a-C - 54acac6f23ab
1099 | o 2 public a-C - 54acac6f23ab
1098 |/
1100 |/
1099 o 1 public a-B - 548a3d25dbf0
1101 o 1 public a-B - 548a3d25dbf0
1100 |
1102 |
1101 o 0 public a-A - 054250a37db4
1103 o 0 public a-A - 054250a37db4
1102
1104
1103
1105
1104 Test that test are properly ignored on remote event when existing locally
1106 Test that test are properly ignored on remote event when existing locally
1105
1107
1106 $ cd ..
1108 $ cd ..
1107 $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
1109 $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
1108 test-debug-phase: new rev 0: x -> 0
1110 test-debug-phase: new rev 0: x -> 0
1109 test-debug-phase: new rev 1: x -> 0
1111 test-debug-phase: new rev 1: x -> 0
1110 test-debug-phase: new rev 2: x -> 0
1112 test-debug-phase: new rev 2: x -> 0
1111 test-debug-phase: new rev 3: x -> 0
1113 test-debug-phase: new rev 3: x -> 0
1112 test-debug-phase: new rev 4: x -> 0
1114 test-debug-phase: new rev 4: x -> 0
1113
1115
1114 # pathological case are
1116 # pathological case are
1115 #
1117 #
1116 # * secret remotely
1118 # * secret remotely
1117 # * known locally
1119 # * known locally
1118 # * repo have uncommon changeset
1120 # * repo have uncommon changeset
1119
1121
1120 $ hg -R beta phase --secret --force f54f1bb90ff3
1122 $ hg -R beta phase --secret --force f54f1bb90ff3
1121 test-debug-phase: move rev 2: 0 -> 2
1123 test-debug-phase: move rev 2: 0 -> 2
1122 $ hg -R gamma phase --draft --force f54f1bb90ff3
1124 $ hg -R gamma phase --draft --force f54f1bb90ff3
1123 test-debug-phase: move rev 2: 0 -> 1
1125 test-debug-phase: move rev 2: 0 -> 1
1124
1126
1125 $ cd gamma
1127 $ cd gamma
1126 $ hg pull ../beta
1128 $ hg pull ../beta
1127 pulling from ../beta
1129 pulling from ../beta
1128 searching for changes
1130 searching for changes
1129 adding changesets
1131 adding changesets
1130 adding manifests
1132 adding manifests
1131 adding file changes
1133 adding file changes
1132 added 2 changesets with 2 changes to 2 files
1134 added 2 changesets with 2 changes to 2 files
1133 new changesets e9f537e46dea:b740e3e5c05d
1135 new changesets e9f537e46dea:b740e3e5c05d
1134 test-debug-phase: new rev 5: x -> 0
1136 test-debug-phase: new rev 5: x -> 0
1135 test-debug-phase: new rev 6: x -> 0
1137 test-debug-phase: new rev 6: x -> 0
1136 (run 'hg update' to get a working copy)
1138 (run 'hg update' to get a working copy)
1137 $ hg phase f54f1bb90ff3
1139 $ hg phase f54f1bb90ff3
1138 2: draft
1140 2: draft
1139
1141
1140 same over the wire
1142 same over the wire
1141
1143
1142 $ cd ../beta
1144 $ cd ../beta
1143 $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
1145 $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
1144 $ cat ../beta.pid >> $DAEMON_PIDS
1146 $ cat ../beta.pid >> $DAEMON_PIDS
1145 $ cd ../gamma
1147 $ cd ../gamma
1146
1148
1147 $ hg pull http://localhost:$HGPORT/ # bundle2+
1149 $ hg pull http://localhost:$HGPORT/ # bundle2+
1148 pulling from http://localhost:$HGPORT/
1150 pulling from http://localhost:$HGPORT/
1149 searching for changes
1151 searching for changes
1150 no changes found
1152 no changes found
1151 $ hg phase f54f1bb90ff3
1153 $ hg phase f54f1bb90ff3
1152 2: draft
1154 2: draft
1153
1155
1154 enforce bundle1
1156 enforce bundle1
1155
1157
1156 $ hg pull http://localhost:$HGPORT/ --config devel.legacy.exchange=bundle1
1158 $ hg pull http://localhost:$HGPORT/ --config devel.legacy.exchange=bundle1
1157 pulling from http://localhost:$HGPORT/
1159 pulling from http://localhost:$HGPORT/
1158 searching for changes
1160 searching for changes
1159 no changes found
1161 no changes found
1160 $ hg phase f54f1bb90ff3
1162 $ hg phase f54f1bb90ff3
1161 2: draft
1163 2: draft
1162
1164
1163 check that secret local on both side are not synced to public
1165 check that secret local on both side are not synced to public
1164
1166
1165 $ hg push -r b555f63b6063 http://localhost:$HGPORT/
1167 $ hg push -r b555f63b6063 http://localhost:$HGPORT/
1166 pushing to http://localhost:$HGPORT/
1168 pushing to http://localhost:$HGPORT/
1167 searching for changes
1169 searching for changes
1168 no changes found
1170 no changes found
1169 [1]
1171 [1]
1170 $ hg phase f54f1bb90ff3
1172 $ hg phase f54f1bb90ff3
1171 2: draft
1173 2: draft
1172
1174
1173 put the changeset in the draft state again
1175 put the changeset in the draft state again
1174 (first test after this one expect to be able to copy)
1176 (first test after this one expect to be able to copy)
1175
1177
1176 $ cd ..
1178 $ cd ..
1177
1179
1178
1180
1179 Test Clone behavior
1181 Test Clone behavior
1180
1182
1181 A. Clone without secret changeset
1183 A. Clone without secret changeset
1182
1184
1183 1. cloning non-publishing repository
1185 1. cloning non-publishing repository
1184 (Phase should be preserved)
1186 (Phase should be preserved)
1185
1187
1186 # make sure there is no secret so we can use a copy clone
1188 # make sure there is no secret so we can use a copy clone
1187
1189
1188 $ hg -R mu phase --draft 'secret()'
1190 $ hg -R mu phase --draft 'secret()'
1189 test-debug-phase: move rev 11: 2 -> 1
1191 test-debug-phase: move rev 11: 2 -> 1
1190
1192
1191 $ hg clone -U mu Tau
1193 $ hg clone -U mu Tau
1192 $ hgph -R Tau
1194 $ hgph -R Tau
1193 o 12 draft mu-more - 5237fb433fc8
1195 o 12 draft mu-more - 5237fb433fc8
1194 |
1196 |
1195 | o 11 draft alpha-more - 1c5cfd894796
1197 | o 11 draft alpha-more - 1c5cfd894796
1196 | |
1198 | |
1197 o | 10 draft A-secret - 435b5d83910c
1199 o | 10 draft A-secret - 435b5d83910c
1198 |/
1200 |/
1199 o 9 public a-H - 967b449fbc94
1201 o 9 public a-H - 967b449fbc94
1200 |
1202 |
1201 | o 8 public a-F - b740e3e5c05d
1203 | o 8 public a-F - b740e3e5c05d
1202 | |
1204 | |
1203 | o 7 public a-E - e9f537e46dea
1205 | o 7 public a-E - e9f537e46dea
1204 | |
1206 | |
1205 +---o 6 public n-B - 145e75495359
1207 +---o 6 public n-B - 145e75495359
1206 | |
1208 | |
1207 o | 5 public n-A - d6bcb4f74035
1209 o | 5 public n-A - d6bcb4f74035
1208 | |
1210 | |
1209 | o 4 public a-D - b555f63b6063
1211 | o 4 public a-D - b555f63b6063
1210 | |
1212 | |
1211 | o 3 public a-C - 54acac6f23ab
1213 | o 3 public a-C - 54acac6f23ab
1212 | |
1214 | |
1213 o | 2 public b-A - f54f1bb90ff3
1215 o | 2 public b-A - f54f1bb90ff3
1214 |/
1216 |/
1215 o 1 public a-B - 548a3d25dbf0
1217 o 1 public a-B - 548a3d25dbf0
1216 |
1218 |
1217 o 0 public a-A - 054250a37db4
1219 o 0 public a-A - 054250a37db4
1218
1220
1219
1221
1220 2. cloning publishing repository
1222 2. cloning publishing repository
1221
1223
1222 (everything should be public)
1224 (everything should be public)
1223
1225
1224 $ hg clone -U alpha Upsilon
1226 $ hg clone -U alpha Upsilon
1225 $ hgph -R Upsilon
1227 $ hgph -R Upsilon
1226 o 13 public mu-more - 5237fb433fc8
1228 o 13 public mu-more - 5237fb433fc8
1227 |
1229 |
1228 | o 12 public alpha-more - 1c5cfd894796
1230 | o 12 public alpha-more - 1c5cfd894796
1229 | |
1231 | |
1230 o | 11 public A-secret - 435b5d83910c
1232 o | 11 public A-secret - 435b5d83910c
1231 |/
1233 |/
1232 o 10 public a-H - 967b449fbc94
1234 o 10 public a-H - 967b449fbc94
1233 |
1235 |
1234 | o 9 public a-G - 3e27b6f1eee1
1236 | o 9 public a-G - 3e27b6f1eee1
1235 | |
1237 | |
1236 | o 8 public a-F - b740e3e5c05d
1238 | o 8 public a-F - b740e3e5c05d
1237 | |
1239 | |
1238 | o 7 public a-E - e9f537e46dea
1240 | o 7 public a-E - e9f537e46dea
1239 | |
1241 | |
1240 +---o 6 public n-B - 145e75495359
1242 +---o 6 public n-B - 145e75495359
1241 | |
1243 | |
1242 o | 5 public n-A - d6bcb4f74035
1244 o | 5 public n-A - d6bcb4f74035
1243 | |
1245 | |
1244 o | 4 public b-A - f54f1bb90ff3
1246 o | 4 public b-A - f54f1bb90ff3
1245 | |
1247 | |
1246 | o 3 public a-D - b555f63b6063
1248 | o 3 public a-D - b555f63b6063
1247 | |
1249 | |
1248 | o 2 public a-C - 54acac6f23ab
1250 | o 2 public a-C - 54acac6f23ab
1249 |/
1251 |/
1250 o 1 public a-B - 548a3d25dbf0
1252 o 1 public a-B - 548a3d25dbf0
1251 |
1253 |
1252 o 0 public a-A - 054250a37db4
1254 o 0 public a-A - 054250a37db4
1253
1255
1254 #if unix-permissions no-root
1256 #if unix-permissions no-root
1255
1257
1256 Pushing From an unlockable repo
1258 Pushing From an unlockable repo
1257 --------------------------------
1259 --------------------------------
1258 (issue3684)
1260 (issue3684)
1259
1261
1260 Unability to lock the source repo should not prevent the push. It will prevent
1262 Unability to lock the source repo should not prevent the push. It will prevent
1261 the retrieval of remote phase during push. For example, pushing to a publishing
1263 the retrieval of remote phase during push. For example, pushing to a publishing
1262 server won't turn changeset public.
1264 server won't turn changeset public.
1263
1265
1264 1. Test that push is not prevented
1266 1. Test that push is not prevented
1265
1267
1266 $ hg init Phi
1268 $ hg init Phi
1267 $ cd Upsilon
1269 $ cd Upsilon
1268 $ chmod -R -w .hg
1270 $ chmod -R -w .hg
1269 $ hg push ../Phi
1271 $ hg push ../Phi
1270 pushing to ../Phi
1272 pushing to ../Phi
1271 searching for changes
1273 searching for changes
1272 adding changesets
1274 adding changesets
1273 adding manifests
1275 adding manifests
1274 adding file changes
1276 adding file changes
1275 added 14 changesets with 14 changes to 14 files (+3 heads)
1277 added 14 changesets with 14 changes to 14 files (+3 heads)
1276 test-debug-phase: new rev 0: x -> 0
1278 test-debug-phase: new rev 0: x -> 0
1277 test-debug-phase: new rev 1: x -> 0
1279 test-debug-phase: new rev 1: x -> 0
1278 test-debug-phase: new rev 2: x -> 0
1280 test-debug-phase: new rev 2: x -> 0
1279 test-debug-phase: new rev 3: x -> 0
1281 test-debug-phase: new rev 3: x -> 0
1280 test-debug-phase: new rev 4: x -> 0
1282 test-debug-phase: new rev 4: x -> 0
1281 test-debug-phase: new rev 5: x -> 0
1283 test-debug-phase: new rev 5: x -> 0
1282 test-debug-phase: new rev 6: x -> 0
1284 test-debug-phase: new rev 6: x -> 0
1283 test-debug-phase: new rev 7: x -> 0
1285 test-debug-phase: new rev 7: x -> 0
1284 test-debug-phase: new rev 8: x -> 0
1286 test-debug-phase: new rev 8: x -> 0
1285 test-debug-phase: new rev 9: x -> 0
1287 test-debug-phase: new rev 9: x -> 0
1286 test-debug-phase: new rev 10: x -> 0
1288 test-debug-phase: new rev 10: x -> 0
1287 test-debug-phase: new rev 11: x -> 0
1289 test-debug-phase: new rev 11: x -> 0
1288 test-debug-phase: new rev 12: x -> 0
1290 test-debug-phase: new rev 12: x -> 0
1289 test-debug-phase: new rev 13: x -> 0
1291 test-debug-phase: new rev 13: x -> 0
1290 $ chmod -R +w .hg
1292 $ chmod -R +w .hg
1291
1293
1292 2. Test that failed phases movement are reported
1294 2. Test that failed phases movement are reported
1293
1295
1294 $ hg phase --force --draft 3
1296 $ hg phase --force --draft 3
1295 test-debug-phase: move rev 3: 0 -> 1
1297 test-debug-phase: move rev 3: 0 -> 1
1296 test-debug-phase: move rev 7: 0 -> 1
1298 test-debug-phase: move rev 7: 0 -> 1
1297 test-debug-phase: move rev 8: 0 -> 1
1299 test-debug-phase: move rev 8: 0 -> 1
1298 test-debug-phase: move rev 9: 0 -> 1
1300 test-debug-phase: move rev 9: 0 -> 1
1299 $ chmod -R -w .hg
1301 $ chmod -R -w .hg
1300 $ hg push ../Phi
1302 $ hg push ../Phi
1301 pushing to ../Phi
1303 pushing to ../Phi
1302 searching for changes
1304 searching for changes
1303 no changes found
1305 no changes found
1304 cannot lock source repo, skipping local public phase update
1306 cannot lock source repo, skipping local public phase update
1305 [1]
1307 [1]
1306 $ chmod -R +w .hg
1308 $ chmod -R +w .hg
1307
1309
1308 $ cd ..
1310 $ cd ..
1309
1311
1310 #endif
1312 #endif
1311
1313
1312 Test that clone behaves like pull and doesn't publish changesets as plain push
1314 Test that clone behaves like pull and doesn't publish changesets as plain push
1313 does. The conditional output accounts for changes in the conditional block
1315 does. The conditional output accounts for changes in the conditional block
1314 above.
1316 above.
1315
1317
1316 #if unix-permissions no-root
1318 #if unix-permissions no-root
1317 $ hg -R Upsilon phase -q --force --draft 2
1319 $ hg -R Upsilon phase -q --force --draft 2
1318 test-debug-phase: move rev 2: 0 -> 1
1320 test-debug-phase: move rev 2: 0 -> 1
1319 #else
1321 #else
1320 $ hg -R Upsilon phase -q --force --draft 2
1322 $ hg -R Upsilon phase -q --force --draft 2
1321 test-debug-phase: move rev 2: 0 -> 1
1323 test-debug-phase: move rev 2: 0 -> 1
1322 test-debug-phase: move rev 3: 0 -> 1
1324 test-debug-phase: move rev 3: 0 -> 1
1323 test-debug-phase: move rev 7: 0 -> 1
1325 test-debug-phase: move rev 7: 0 -> 1
1324 test-debug-phase: move rev 8: 0 -> 1
1326 test-debug-phase: move rev 8: 0 -> 1
1325 test-debug-phase: move rev 9: 0 -> 1
1327 test-debug-phase: move rev 9: 0 -> 1
1326 #endif
1328 #endif
1327
1329
1328 $ hg clone -q Upsilon Pi -r 7
1330 $ hg clone -q Upsilon Pi -r 7
1329 test-debug-phase: new rev 0: x -> 0
1331 test-debug-phase: new rev 0: x -> 0
1330 test-debug-phase: new rev 1: x -> 0
1332 test-debug-phase: new rev 1: x -> 0
1331 test-debug-phase: new rev 2: x -> 0
1333 test-debug-phase: new rev 2: x -> 0
1332 test-debug-phase: new rev 3: x -> 0
1334 test-debug-phase: new rev 3: x -> 0
1333 test-debug-phase: new rev 4: x -> 0
1335 test-debug-phase: new rev 4: x -> 0
1334 $ hgph Upsilon -r 'min(draft())'
1336 $ hgph Upsilon -r 'min(draft())'
1335 o 2 draft a-C - 54acac6f23ab
1337 o 2 draft a-C - 54acac6f23ab
1336 |
1338 |
1337 ~
1339 ~
1338
1340
1339 $ hg -R Upsilon push Pi -r 7
1341 $ hg -R Upsilon push Pi -r 7
1340 pushing to Pi
1342 pushing to Pi
1341 searching for changes
1343 searching for changes
1342 no changes found
1344 no changes found
1343 test-debug-phase: move rev 2: 1 -> 0
1345 test-debug-phase: move rev 2: 1 -> 0
1344 test-debug-phase: move rev 3: 1 -> 0
1346 test-debug-phase: move rev 3: 1 -> 0
1345 test-debug-phase: move rev 7: 1 -> 0
1347 test-debug-phase: move rev 7: 1 -> 0
1346 [1]
1348 [1]
1347 $ hgph Upsilon -r 'min(draft())'
1349 $ hgph Upsilon -r 'min(draft())'
1348 o 8 draft a-F - b740e3e5c05d
1350 o 8 draft a-F - b740e3e5c05d
1349 |
1351 |
1350 ~
1352 ~
1351
1353
1352 $ hg -R Upsilon push Pi -r 8
1354 $ hg -R Upsilon push Pi -r 8
1353 pushing to Pi
1355 pushing to Pi
1354 searching for changes
1356 searching for changes
1355 adding changesets
1357 adding changesets
1356 adding manifests
1358 adding manifests
1357 adding file changes
1359 adding file changes
1358 added 1 changesets with 1 changes to 1 files
1360 added 1 changesets with 1 changes to 1 files
1359 test-debug-phase: new rev 5: x -> 0
1361 test-debug-phase: new rev 5: x -> 0
1360 test-debug-phase: move rev 8: 1 -> 0
1362 test-debug-phase: move rev 8: 1 -> 0
1361
1363
1362 $ hgph Upsilon -r 'min(draft())'
1364 $ hgph Upsilon -r 'min(draft())'
1363 o 9 draft a-G - 3e27b6f1eee1
1365 o 9 draft a-G - 3e27b6f1eee1
1364 |
1366 |
1365 ~
1367 ~
@@ -1,1340 +1,1348 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "strip=" >> $HGRCPATH
2 $ echo "strip=" >> $HGRCPATH
3 $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH
3 $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH
4
4
5 $ restore() {
5 $ restore() {
6 > hg unbundle -q .hg/strip-backup/*
6 > hg unbundle -q .hg/strip-backup/*
7 > rm .hg/strip-backup/*
7 > rm .hg/strip-backup/*
8 > }
8 > }
9 $ teststrip() {
9 $ teststrip() {
10 > hg up -C $1
10 > hg up -C $1
11 > echo % before update $1, strip $2
11 > echo % before update $1, strip $2
12 > hg parents
12 > hg parents
13 > hg --traceback strip $2
13 > hg --traceback strip $2
14 > echo % after update $1, strip $2
14 > echo % after update $1, strip $2
15 > hg parents
15 > hg parents
16 > restore
16 > restore
17 > }
17 > }
18
18
19 $ hg init test
19 $ hg init test
20 $ cd test
20 $ cd test
21
21
22 $ echo foo > bar
22 $ echo foo > bar
23 $ hg ci -Ama
23 $ hg ci -Ama
24 adding bar
24 adding bar
25
25
26 $ echo more >> bar
26 $ echo more >> bar
27 $ hg ci -Amb
27 $ hg ci -Amb
28
28
29 $ echo blah >> bar
29 $ echo blah >> bar
30 $ hg ci -Amc
30 $ hg ci -Amc
31
31
32 $ hg up 1
32 $ hg up 1
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 $ echo blah >> bar
34 $ echo blah >> bar
35 $ hg ci -Amd
35 $ hg ci -Amd
36 created new head
36 created new head
37
37
38 $ echo final >> bar
38 $ echo final >> bar
39 $ hg ci -Ame
39 $ hg ci -Ame
40
40
41 $ hg log
41 $ hg log
42 changeset: 4:443431ffac4f
42 changeset: 4:443431ffac4f
43 tag: tip
43 tag: tip
44 user: test
44 user: test
45 date: Thu Jan 01 00:00:00 1970 +0000
45 date: Thu Jan 01 00:00:00 1970 +0000
46 summary: e
46 summary: e
47
47
48 changeset: 3:65bd5f99a4a3
48 changeset: 3:65bd5f99a4a3
49 parent: 1:ef3a871183d7
49 parent: 1:ef3a871183d7
50 user: test
50 user: test
51 date: Thu Jan 01 00:00:00 1970 +0000
51 date: Thu Jan 01 00:00:00 1970 +0000
52 summary: d
52 summary: d
53
53
54 changeset: 2:264128213d29
54 changeset: 2:264128213d29
55 user: test
55 user: test
56 date: Thu Jan 01 00:00:00 1970 +0000
56 date: Thu Jan 01 00:00:00 1970 +0000
57 summary: c
57 summary: c
58
58
59 changeset: 1:ef3a871183d7
59 changeset: 1:ef3a871183d7
60 user: test
60 user: test
61 date: Thu Jan 01 00:00:00 1970 +0000
61 date: Thu Jan 01 00:00:00 1970 +0000
62 summary: b
62 summary: b
63
63
64 changeset: 0:9ab35a2d17cb
64 changeset: 0:9ab35a2d17cb
65 user: test
65 user: test
66 date: Thu Jan 01 00:00:00 1970 +0000
66 date: Thu Jan 01 00:00:00 1970 +0000
67 summary: a
67 summary: a
68
68
69
69
70 $ teststrip 4 4
70 $ teststrip 4 4
71 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
72 % before update 4, strip 4
72 % before update 4, strip 4
73 changeset: 4:443431ffac4f
73 changeset: 4:443431ffac4f
74 tag: tip
74 tag: tip
75 user: test
75 user: test
76 date: Thu Jan 01 00:00:00 1970 +0000
76 date: Thu Jan 01 00:00:00 1970 +0000
77 summary: e
77 summary: e
78
78
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
80 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
81 % after update 4, strip 4
81 % after update 4, strip 4
82 changeset: 3:65bd5f99a4a3
82 changeset: 3:65bd5f99a4a3
83 tag: tip
83 tag: tip
84 parent: 1:ef3a871183d7
84 parent: 1:ef3a871183d7
85 user: test
85 user: test
86 date: Thu Jan 01 00:00:00 1970 +0000
86 date: Thu Jan 01 00:00:00 1970 +0000
87 summary: d
87 summary: d
88
88
89 $ teststrip 4 3
89 $ teststrip 4 3
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 % before update 4, strip 3
91 % before update 4, strip 3
92 changeset: 4:443431ffac4f
92 changeset: 4:443431ffac4f
93 tag: tip
93 tag: tip
94 user: test
94 user: test
95 date: Thu Jan 01 00:00:00 1970 +0000
95 date: Thu Jan 01 00:00:00 1970 +0000
96 summary: e
96 summary: e
97
97
98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
99 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
100 % after update 4, strip 3
100 % after update 4, strip 3
101 changeset: 1:ef3a871183d7
101 changeset: 1:ef3a871183d7
102 user: test
102 user: test
103 date: Thu Jan 01 00:00:00 1970 +0000
103 date: Thu Jan 01 00:00:00 1970 +0000
104 summary: b
104 summary: b
105
105
106 $ teststrip 1 4
106 $ teststrip 1 4
107 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
107 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 % before update 1, strip 4
108 % before update 1, strip 4
109 changeset: 1:ef3a871183d7
109 changeset: 1:ef3a871183d7
110 user: test
110 user: test
111 date: Thu Jan 01 00:00:00 1970 +0000
111 date: Thu Jan 01 00:00:00 1970 +0000
112 summary: b
112 summary: b
113
113
114 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
114 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
115 % after update 1, strip 4
115 % after update 1, strip 4
116 changeset: 1:ef3a871183d7
116 changeset: 1:ef3a871183d7
117 user: test
117 user: test
118 date: Thu Jan 01 00:00:00 1970 +0000
118 date: Thu Jan 01 00:00:00 1970 +0000
119 summary: b
119 summary: b
120
120
121 $ teststrip 4 2
121 $ teststrip 4 2
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 % before update 4, strip 2
123 % before update 4, strip 2
124 changeset: 4:443431ffac4f
124 changeset: 4:443431ffac4f
125 tag: tip
125 tag: tip
126 user: test
126 user: test
127 date: Thu Jan 01 00:00:00 1970 +0000
127 date: Thu Jan 01 00:00:00 1970 +0000
128 summary: e
128 summary: e
129
129
130 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
130 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
131 % after update 4, strip 2
131 % after update 4, strip 2
132 changeset: 3:443431ffac4f
132 changeset: 3:443431ffac4f
133 tag: tip
133 tag: tip
134 user: test
134 user: test
135 date: Thu Jan 01 00:00:00 1970 +0000
135 date: Thu Jan 01 00:00:00 1970 +0000
136 summary: e
136 summary: e
137
137
138 $ teststrip 4 1
138 $ teststrip 4 1
139 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
139 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 % before update 4, strip 1
140 % before update 4, strip 1
141 changeset: 4:264128213d29
141 changeset: 4:264128213d29
142 tag: tip
142 tag: tip
143 parent: 1:ef3a871183d7
143 parent: 1:ef3a871183d7
144 user: test
144 user: test
145 date: Thu Jan 01 00:00:00 1970 +0000
145 date: Thu Jan 01 00:00:00 1970 +0000
146 summary: c
146 summary: c
147
147
148 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
149 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
149 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
150 % after update 4, strip 1
150 % after update 4, strip 1
151 changeset: 0:9ab35a2d17cb
151 changeset: 0:9ab35a2d17cb
152 tag: tip
152 tag: tip
153 user: test
153 user: test
154 date: Thu Jan 01 00:00:00 1970 +0000
154 date: Thu Jan 01 00:00:00 1970 +0000
155 summary: a
155 summary: a
156
156
157 $ teststrip null 4
157 $ teststrip null 4
158 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
158 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
159 % before update null, strip 4
159 % before update null, strip 4
160 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
160 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
161 % after update null, strip 4
161 % after update null, strip 4
162
162
163 $ hg log
163 $ hg log
164 changeset: 4:264128213d29
164 changeset: 4:264128213d29
165 tag: tip
165 tag: tip
166 parent: 1:ef3a871183d7
166 parent: 1:ef3a871183d7
167 user: test
167 user: test
168 date: Thu Jan 01 00:00:00 1970 +0000
168 date: Thu Jan 01 00:00:00 1970 +0000
169 summary: c
169 summary: c
170
170
171 changeset: 3:443431ffac4f
171 changeset: 3:443431ffac4f
172 user: test
172 user: test
173 date: Thu Jan 01 00:00:00 1970 +0000
173 date: Thu Jan 01 00:00:00 1970 +0000
174 summary: e
174 summary: e
175
175
176 changeset: 2:65bd5f99a4a3
176 changeset: 2:65bd5f99a4a3
177 user: test
177 user: test
178 date: Thu Jan 01 00:00:00 1970 +0000
178 date: Thu Jan 01 00:00:00 1970 +0000
179 summary: d
179 summary: d
180
180
181 changeset: 1:ef3a871183d7
181 changeset: 1:ef3a871183d7
182 user: test
182 user: test
183 date: Thu Jan 01 00:00:00 1970 +0000
183 date: Thu Jan 01 00:00:00 1970 +0000
184 summary: b
184 summary: b
185
185
186 changeset: 0:9ab35a2d17cb
186 changeset: 0:9ab35a2d17cb
187 user: test
187 user: test
188 date: Thu Jan 01 00:00:00 1970 +0000
188 date: Thu Jan 01 00:00:00 1970 +0000
189 summary: a
189 summary: a
190
190
191 $ hg up -C 4
191 $ hg up -C 4
192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
193 $ hg parents
193 $ hg parents
194 changeset: 4:264128213d29
194 changeset: 4:264128213d29
195 tag: tip
195 tag: tip
196 parent: 1:ef3a871183d7
196 parent: 1:ef3a871183d7
197 user: test
197 user: test
198 date: Thu Jan 01 00:00:00 1970 +0000
198 date: Thu Jan 01 00:00:00 1970 +0000
199 summary: c
199 summary: c
200
200
201
201
202 $ hg --traceback strip 4
202 $ hg --traceback strip 4
203 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
203 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
204 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg
204 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg
205 $ hg parents
205 $ hg parents
206 changeset: 1:ef3a871183d7
206 changeset: 1:ef3a871183d7
207 user: test
207 user: test
208 date: Thu Jan 01 00:00:00 1970 +0000
208 date: Thu Jan 01 00:00:00 1970 +0000
209 summary: b
209 summary: b
210
210
211 $ hg debugbundle .hg/strip-backup/*
211 $ hg debugbundle .hg/strip-backup/*
212 Stream params: {Compression: BZ}
212 Stream params: {Compression: BZ}
213 changegroup -- {nbchanges: 1, version: 02}
213 changegroup -- {nbchanges: 1, version: 02}
214 264128213d290d868c54642d13aeaa3675551a78
214 264128213d290d868c54642d13aeaa3675551a78
215 cache:rev-branch-cache -- {}
215 cache:rev-branch-cache -- {}
216 phase-heads -- {}
216 phase-heads -- {}
217 264128213d290d868c54642d13aeaa3675551a78 draft
217 264128213d290d868c54642d13aeaa3675551a78 draft
218 $ hg unbundle .hg/strip-backup/*
218 $ hg unbundle .hg/strip-backup/*
219 adding changesets
219 adding changesets
220 adding manifests
220 adding manifests
221 adding file changes
221 adding file changes
222 added 1 changesets with 0 changes to 1 files (+1 heads)
222 added 1 changesets with 0 changes to 1 files (+1 heads)
223 new changesets 264128213d29
223 new changesets 264128213d29
224 (run 'hg heads' to see heads, 'hg merge' to merge)
224 (run 'hg heads' to see heads, 'hg merge' to merge)
225 $ rm .hg/strip-backup/*
225 $ rm .hg/strip-backup/*
226 $ hg log --graph
226 $ hg log --graph
227 o changeset: 4:264128213d29
227 o changeset: 4:264128213d29
228 | tag: tip
228 | tag: tip
229 | parent: 1:ef3a871183d7
229 | parent: 1:ef3a871183d7
230 | user: test
230 | user: test
231 | date: Thu Jan 01 00:00:00 1970 +0000
231 | date: Thu Jan 01 00:00:00 1970 +0000
232 | summary: c
232 | summary: c
233 |
233 |
234 | o changeset: 3:443431ffac4f
234 | o changeset: 3:443431ffac4f
235 | | user: test
235 | | user: test
236 | | date: Thu Jan 01 00:00:00 1970 +0000
236 | | date: Thu Jan 01 00:00:00 1970 +0000
237 | | summary: e
237 | | summary: e
238 | |
238 | |
239 | o changeset: 2:65bd5f99a4a3
239 | o changeset: 2:65bd5f99a4a3
240 |/ user: test
240 |/ user: test
241 | date: Thu Jan 01 00:00:00 1970 +0000
241 | date: Thu Jan 01 00:00:00 1970 +0000
242 | summary: d
242 | summary: d
243 |
243 |
244 @ changeset: 1:ef3a871183d7
244 @ changeset: 1:ef3a871183d7
245 | user: test
245 | user: test
246 | date: Thu Jan 01 00:00:00 1970 +0000
246 | date: Thu Jan 01 00:00:00 1970 +0000
247 | summary: b
247 | summary: b
248 |
248 |
249 o changeset: 0:9ab35a2d17cb
249 o changeset: 0:9ab35a2d17cb
250 user: test
250 user: test
251 date: Thu Jan 01 00:00:00 1970 +0000
251 date: Thu Jan 01 00:00:00 1970 +0000
252 summary: a
252 summary: a
253
253
254 $ hg up -C 2
254 $ hg up -C 2
255 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
255 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 $ hg merge 4
256 $ hg merge 4
257 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
257 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 (branch merge, don't forget to commit)
258 (branch merge, don't forget to commit)
259
259
260 before strip of merge parent
260 before strip of merge parent
261
261
262 $ hg parents
262 $ hg parents
263 changeset: 2:65bd5f99a4a3
263 changeset: 2:65bd5f99a4a3
264 user: test
264 user: test
265 date: Thu Jan 01 00:00:00 1970 +0000
265 date: Thu Jan 01 00:00:00 1970 +0000
266 summary: d
266 summary: d
267
267
268 changeset: 4:264128213d29
268 changeset: 4:264128213d29
269 tag: tip
269 tag: tip
270 parent: 1:ef3a871183d7
270 parent: 1:ef3a871183d7
271 user: test
271 user: test
272 date: Thu Jan 01 00:00:00 1970 +0000
272 date: Thu Jan 01 00:00:00 1970 +0000
273 summary: c
273 summary: c
274
274
275 $ hg strip 4
275 $ hg strip 4
276 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
277 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
277 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
278
278
279 after strip of merge parent
279 after strip of merge parent
280
280
281 $ hg parents
281 $ hg parents
282 changeset: 1:ef3a871183d7
282 changeset: 1:ef3a871183d7
283 user: test
283 user: test
284 date: Thu Jan 01 00:00:00 1970 +0000
284 date: Thu Jan 01 00:00:00 1970 +0000
285 summary: b
285 summary: b
286
286
287 $ restore
287 $ restore
288
288
289 $ hg up
289 $ hg up
290 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
290 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 updated to "264128213d29: c"
291 updated to "264128213d29: c"
292 1 other heads for branch "default"
292 1 other heads for branch "default"
293 $ hg log -G
293 $ hg log -G
294 @ changeset: 4:264128213d29
294 @ changeset: 4:264128213d29
295 | tag: tip
295 | tag: tip
296 | parent: 1:ef3a871183d7
296 | parent: 1:ef3a871183d7
297 | user: test
297 | user: test
298 | date: Thu Jan 01 00:00:00 1970 +0000
298 | date: Thu Jan 01 00:00:00 1970 +0000
299 | summary: c
299 | summary: c
300 |
300 |
301 | o changeset: 3:443431ffac4f
301 | o changeset: 3:443431ffac4f
302 | | user: test
302 | | user: test
303 | | date: Thu Jan 01 00:00:00 1970 +0000
303 | | date: Thu Jan 01 00:00:00 1970 +0000
304 | | summary: e
304 | | summary: e
305 | |
305 | |
306 | o changeset: 2:65bd5f99a4a3
306 | o changeset: 2:65bd5f99a4a3
307 |/ user: test
307 |/ user: test
308 | date: Thu Jan 01 00:00:00 1970 +0000
308 | date: Thu Jan 01 00:00:00 1970 +0000
309 | summary: d
309 | summary: d
310 |
310 |
311 o changeset: 1:ef3a871183d7
311 o changeset: 1:ef3a871183d7
312 | user: test
312 | user: test
313 | date: Thu Jan 01 00:00:00 1970 +0000
313 | date: Thu Jan 01 00:00:00 1970 +0000
314 | summary: b
314 | summary: b
315 |
315 |
316 o changeset: 0:9ab35a2d17cb
316 o changeset: 0:9ab35a2d17cb
317 user: test
317 user: test
318 date: Thu Jan 01 00:00:00 1970 +0000
318 date: Thu Jan 01 00:00:00 1970 +0000
319 summary: a
319 summary: a
320
320
321
321
322 2 is parent of 3, only one strip should happen
322 2 is parent of 3, only one strip should happen
323
323
324 $ hg strip "roots(2)" 3
324 $ hg strip "roots(2)" 3
325 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
325 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
326 $ hg log -G
326 $ hg log -G
327 @ changeset: 2:264128213d29
327 @ changeset: 2:264128213d29
328 | tag: tip
328 | tag: tip
329 | user: test
329 | user: test
330 | date: Thu Jan 01 00:00:00 1970 +0000
330 | date: Thu Jan 01 00:00:00 1970 +0000
331 | summary: c
331 | summary: c
332 |
332 |
333 o changeset: 1:ef3a871183d7
333 o changeset: 1:ef3a871183d7
334 | user: test
334 | user: test
335 | date: Thu Jan 01 00:00:00 1970 +0000
335 | date: Thu Jan 01 00:00:00 1970 +0000
336 | summary: b
336 | summary: b
337 |
337 |
338 o changeset: 0:9ab35a2d17cb
338 o changeset: 0:9ab35a2d17cb
339 user: test
339 user: test
340 date: Thu Jan 01 00:00:00 1970 +0000
340 date: Thu Jan 01 00:00:00 1970 +0000
341 summary: a
341 summary: a
342
342
343 $ restore
343 $ restore
344 $ hg log -G
344 $ hg log -G
345 o changeset: 4:443431ffac4f
345 o changeset: 4:443431ffac4f
346 | tag: tip
346 | tag: tip
347 | user: test
347 | user: test
348 | date: Thu Jan 01 00:00:00 1970 +0000
348 | date: Thu Jan 01 00:00:00 1970 +0000
349 | summary: e
349 | summary: e
350 |
350 |
351 o changeset: 3:65bd5f99a4a3
351 o changeset: 3:65bd5f99a4a3
352 | parent: 1:ef3a871183d7
352 | parent: 1:ef3a871183d7
353 | user: test
353 | user: test
354 | date: Thu Jan 01 00:00:00 1970 +0000
354 | date: Thu Jan 01 00:00:00 1970 +0000
355 | summary: d
355 | summary: d
356 |
356 |
357 | @ changeset: 2:264128213d29
357 | @ changeset: 2:264128213d29
358 |/ user: test
358 |/ user: test
359 | date: Thu Jan 01 00:00:00 1970 +0000
359 | date: Thu Jan 01 00:00:00 1970 +0000
360 | summary: c
360 | summary: c
361 |
361 |
362 o changeset: 1:ef3a871183d7
362 o changeset: 1:ef3a871183d7
363 | user: test
363 | user: test
364 | date: Thu Jan 01 00:00:00 1970 +0000
364 | date: Thu Jan 01 00:00:00 1970 +0000
365 | summary: b
365 | summary: b
366 |
366 |
367 o changeset: 0:9ab35a2d17cb
367 o changeset: 0:9ab35a2d17cb
368 user: test
368 user: test
369 date: Thu Jan 01 00:00:00 1970 +0000
369 date: Thu Jan 01 00:00:00 1970 +0000
370 summary: a
370 summary: a
371
371
372 Failed hook while applying "saveheads" bundle.
372 Failed hook while applying "saveheads" bundle.
373
373
374 $ hg strip 2 --config hooks.pretxnchangegroup.bad=false
374 $ hg strip 2 --config hooks.pretxnchangegroup.bad=false
375 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
375 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
376 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
376 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
377 transaction abort!
377 transaction abort!
378 rollback completed
378 rollback completed
379 strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob)
379 strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob)
380 strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob)
380 strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob)
381 (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob)
381 (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob)
382 abort: pretxnchangegroup.bad hook exited with status 1
382 abort: pretxnchangegroup.bad hook exited with status 1
383 [255]
383 [255]
384 $ restore
384 $ restore
385 $ hg log -G
385 $ hg log -G
386 o changeset: 4:443431ffac4f
386 o changeset: 4:443431ffac4f
387 | tag: tip
387 | tag: tip
388 | user: test
388 | user: test
389 | date: Thu Jan 01 00:00:00 1970 +0000
389 | date: Thu Jan 01 00:00:00 1970 +0000
390 | summary: e
390 | summary: e
391 |
391 |
392 o changeset: 3:65bd5f99a4a3
392 o changeset: 3:65bd5f99a4a3
393 | parent: 1:ef3a871183d7
393 | parent: 1:ef3a871183d7
394 | user: test
394 | user: test
395 | date: Thu Jan 01 00:00:00 1970 +0000
395 | date: Thu Jan 01 00:00:00 1970 +0000
396 | summary: d
396 | summary: d
397 |
397 |
398 | o changeset: 2:264128213d29
398 | o changeset: 2:264128213d29
399 |/ user: test
399 |/ user: test
400 | date: Thu Jan 01 00:00:00 1970 +0000
400 | date: Thu Jan 01 00:00:00 1970 +0000
401 | summary: c
401 | summary: c
402 |
402 |
403 @ changeset: 1:ef3a871183d7
403 @ changeset: 1:ef3a871183d7
404 | user: test
404 | user: test
405 | date: Thu Jan 01 00:00:00 1970 +0000
405 | date: Thu Jan 01 00:00:00 1970 +0000
406 | summary: b
406 | summary: b
407 |
407 |
408 o changeset: 0:9ab35a2d17cb
408 o changeset: 0:9ab35a2d17cb
409 user: test
409 user: test
410 date: Thu Jan 01 00:00:00 1970 +0000
410 date: Thu Jan 01 00:00:00 1970 +0000
411 summary: a
411 summary: a
412
412
413
413
414 2 different branches: 2 strips
414 2 different branches: 2 strips
415
415
416 $ hg strip 2 4
416 $ hg strip 2 4
417 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
417 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
418 $ hg log -G
418 $ hg log -G
419 o changeset: 2:65bd5f99a4a3
419 o changeset: 2:65bd5f99a4a3
420 | tag: tip
420 | tag: tip
421 | user: test
421 | user: test
422 | date: Thu Jan 01 00:00:00 1970 +0000
422 | date: Thu Jan 01 00:00:00 1970 +0000
423 | summary: d
423 | summary: d
424 |
424 |
425 @ changeset: 1:ef3a871183d7
425 @ changeset: 1:ef3a871183d7
426 | user: test
426 | user: test
427 | date: Thu Jan 01 00:00:00 1970 +0000
427 | date: Thu Jan 01 00:00:00 1970 +0000
428 | summary: b
428 | summary: b
429 |
429 |
430 o changeset: 0:9ab35a2d17cb
430 o changeset: 0:9ab35a2d17cb
431 user: test
431 user: test
432 date: Thu Jan 01 00:00:00 1970 +0000
432 date: Thu Jan 01 00:00:00 1970 +0000
433 summary: a
433 summary: a
434
434
435 $ restore
435 $ restore
436
436
437 2 different branches and a common ancestor: 1 strip
437 2 different branches and a common ancestor: 1 strip
438
438
439 $ hg strip 1 "2|4"
439 $ hg strip 1 "2|4"
440 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
440 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
441 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
442 $ restore
442 $ restore
443
443
444 verify fncache is kept up-to-date
444 verify fncache is kept up-to-date
445
445
446 $ touch a
446 $ touch a
447 $ hg ci -qAm a
447 $ hg ci -qAm a
448 #if repofncache
448 #if repofncache
449 $ cat .hg/store/fncache | sort
449 $ cat .hg/store/fncache | sort
450 data/a.i
450 data/a.i
451 data/bar.i
451 data/bar.i
452 #endif
452 #endif
453
453
454 $ hg strip tip
454 $ hg strip tip
455 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
455 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
456 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
456 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
457 #if repofncache
457 #if repofncache
458 $ cat .hg/store/fncache
458 $ cat .hg/store/fncache
459 data/bar.i
459 data/bar.i
460 #endif
460 #endif
461
461
462 stripping an empty revset
462 stripping an empty revset
463
463
464 $ hg strip "1 and not 1"
464 $ hg strip "1 and not 1"
465 abort: empty revision set
465 abort: empty revision set
466 [255]
466 [255]
467
467
468 remove branchy history for qimport tests
468 remove branchy history for qimport tests
469
469
470 $ hg strip 3
470 $ hg strip 3
471 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
471 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
472
472
473
473
474 strip of applied mq should cleanup status file
474 strip of applied mq should cleanup status file
475
475
476 $ echo "mq=" >> $HGRCPATH
476 $ echo "mq=" >> $HGRCPATH
477 $ hg up -C 3
477 $ hg up -C 3
478 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
478 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
479 $ echo fooagain >> bar
479 $ echo fooagain >> bar
480 $ hg ci -mf
480 $ hg ci -mf
481 $ hg qimport -r tip:2
481 $ hg qimport -r tip:2
482
482
483 applied patches before strip
483 applied patches before strip
484
484
485 $ hg qapplied
485 $ hg qapplied
486 d
486 d
487 e
487 e
488 f
488 f
489
489
490 stripping revision in queue
490 stripping revision in queue
491
491
492 $ hg strip 3
492 $ hg strip 3
493 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
493 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
494 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
494 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
495
495
496 applied patches after stripping rev in queue
496 applied patches after stripping rev in queue
497
497
498 $ hg qapplied
498 $ hg qapplied
499 d
499 d
500
500
501 stripping ancestor of queue
501 stripping ancestor of queue
502
502
503 $ hg strip 1
503 $ hg strip 1
504 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
504 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
505 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
505 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
506
506
507 applied patches after stripping ancestor of queue
507 applied patches after stripping ancestor of queue
508
508
509 $ hg qapplied
509 $ hg qapplied
510
510
511 Verify strip protects against stripping wc parent when there are uncommitted mods
511 Verify strip protects against stripping wc parent when there are uncommitted mods
512
512
513 $ echo b > b
513 $ echo b > b
514 $ echo bb > bar
514 $ echo bb > bar
515 $ hg add b
515 $ hg add b
516 $ hg ci -m 'b'
516 $ hg ci -m 'b'
517 $ hg log --graph
517 $ hg log --graph
518 @ changeset: 1:76dcf9fab855
518 @ changeset: 1:76dcf9fab855
519 | tag: tip
519 | tag: tip
520 | user: test
520 | user: test
521 | date: Thu Jan 01 00:00:00 1970 +0000
521 | date: Thu Jan 01 00:00:00 1970 +0000
522 | summary: b
522 | summary: b
523 |
523 |
524 o changeset: 0:9ab35a2d17cb
524 o changeset: 0:9ab35a2d17cb
525 user: test
525 user: test
526 date: Thu Jan 01 00:00:00 1970 +0000
526 date: Thu Jan 01 00:00:00 1970 +0000
527 summary: a
527 summary: a
528
528
529 $ hg up 0
529 $ hg up 0
530 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
530 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
531 $ echo c > bar
531 $ echo c > bar
532 $ hg up -t false
532 $ hg up -t false
533 merging bar
533 merging bar
534 merging bar failed!
534 merging bar failed!
535 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
535 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
536 use 'hg resolve' to retry unresolved file merges
536 use 'hg resolve' to retry unresolved file merges
537 [1]
537 [1]
538 $ hg sum
538 $ hg sum
539 parent: 1:76dcf9fab855 tip
539 parent: 1:76dcf9fab855 tip
540 b
540 b
541 branch: default
541 branch: default
542 commit: 1 modified, 1 unknown, 1 unresolved
542 commit: 1 modified, 1 unknown, 1 unresolved
543 update: (current)
543 update: (current)
544 phases: 2 draft
544 phases: 2 draft
545 mq: 3 unapplied
545 mq: 3 unapplied
546
546
547 $ echo c > b
547 $ echo c > b
548 $ hg strip tip
548 $ hg strip tip
549 abort: local changes found
549 abort: local changes found
550 [255]
550 [255]
551 $ hg strip tip --keep
551 $ hg strip tip --keep
552 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
552 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
553 $ hg log --graph
553 $ hg log --graph
554 @ changeset: 0:9ab35a2d17cb
554 @ changeset: 0:9ab35a2d17cb
555 tag: tip
555 tag: tip
556 user: test
556 user: test
557 date: Thu Jan 01 00:00:00 1970 +0000
557 date: Thu Jan 01 00:00:00 1970 +0000
558 summary: a
558 summary: a
559
559
560 $ hg status
560 $ hg status
561 M bar
561 M bar
562 ? b
562 ? b
563 ? bar.orig
563 ? bar.orig
564
564
565 $ rm bar.orig
565 $ rm bar.orig
566 $ hg sum
566 $ hg sum
567 parent: 0:9ab35a2d17cb tip
567 parent: 0:9ab35a2d17cb tip
568 a
568 a
569 branch: default
569 branch: default
570 commit: 1 modified, 1 unknown
570 commit: 1 modified, 1 unknown
571 update: (current)
571 update: (current)
572 phases: 1 draft
572 phases: 1 draft
573 mq: 3 unapplied
573 mq: 3 unapplied
574
574
575 Strip adds, removes, modifies with --keep
575 Strip adds, removes, modifies with --keep
576
576
577 $ touch b
577 $ touch b
578 $ hg add b
578 $ hg add b
579 $ hg commit -mb
579 $ hg commit -mb
580 $ touch c
580 $ touch c
581
581
582 ... with a clean working dir
582 ... with a clean working dir
583
583
584 $ hg add c
584 $ hg add c
585 $ hg rm bar
585 $ hg rm bar
586 $ hg commit -mc
586 $ hg commit -mc
587 $ hg status
587 $ hg status
588 $ hg strip --keep tip
588 $ hg strip --keep tip
589 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
589 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
590 $ hg status
590 $ hg status
591 ! bar
591 ! bar
592 ? c
592 ? c
593
593
594 ... with a dirty working dir
594 ... with a dirty working dir
595
595
596 $ hg add c
596 $ hg add c
597 $ hg rm bar
597 $ hg rm bar
598 $ hg commit -mc
598 $ hg commit -mc
599 $ hg status
599 $ hg status
600 $ echo b > b
600 $ echo b > b
601 $ echo d > d
601 $ echo d > d
602 $ hg strip --keep tip
602 $ hg strip --keep tip
603 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
603 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
604 $ hg status
604 $ hg status
605 M b
605 M b
606 ! bar
606 ! bar
607 ? c
607 ? c
608 ? d
608 ? d
609
609
610 ... after updating the dirstate
610 ... after updating the dirstate
611 $ hg add c
611 $ hg add c
612 $ hg commit -mc
612 $ hg commit -mc
613 $ hg rm c
613 $ hg rm c
614 $ hg commit -mc
614 $ hg commit -mc
615 $ hg strip --keep '.^' -q
615 $ hg strip --keep '.^' -q
616 $ cd ..
616 $ cd ..
617
617
618 stripping many nodes on a complex graph (issue3299)
618 stripping many nodes on a complex graph (issue3299)
619
619
620 $ hg init issue3299
620 $ hg init issue3299
621 $ cd issue3299
621 $ cd issue3299
622 $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
622 $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
623 $ hg strip 'not ancestors(x)'
623 $ hg strip 'not ancestors(x)'
624 saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
624 saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
625
625
626 test hg strip -B bookmark
626 test hg strip -B bookmark
627
627
628 $ cd ..
628 $ cd ..
629 $ hg init bookmarks
629 $ hg init bookmarks
630 $ cd bookmarks
630 $ cd bookmarks
631 $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f'
631 $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f'
632 $ hg bookmark -r 'a' 'todelete'
632 $ hg bookmark -r 'a' 'todelete'
633 $ hg bookmark -r 'b' 'B'
633 $ hg bookmark -r 'b' 'B'
634 $ hg bookmark -r 'b' 'nostrip'
634 $ hg bookmark -r 'b' 'nostrip'
635 $ hg bookmark -r 'c' 'delete'
635 $ hg bookmark -r 'c' 'delete'
636 $ hg bookmark -r 'd' 'multipledelete1'
636 $ hg bookmark -r 'd' 'multipledelete1'
637 $ hg bookmark -r 'e' 'multipledelete2'
637 $ hg bookmark -r 'e' 'multipledelete2'
638 $ hg bookmark -r 'f' 'singlenode1'
638 $ hg bookmark -r 'f' 'singlenode1'
639 $ hg bookmark -r 'f' 'singlenode2'
639 $ hg bookmark -r 'f' 'singlenode2'
640 $ hg up -C todelete
640 $ hg up -C todelete
641 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
641 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
642 (activating bookmark todelete)
642 (activating bookmark todelete)
643 $ hg strip -B nostrip
643 $ hg strip -B nostrip
644 bookmark 'nostrip' deleted
644 bookmark 'nostrip' deleted
645 abort: empty revision set
645 abort: empty revision set
646 [255]
646 [255]
647 $ hg strip -B todelete
647 $ hg strip -B todelete
648 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
648 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
649 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
649 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
650 bookmark 'todelete' deleted
650 bookmark 'todelete' deleted
651 $ hg id -ir dcbb326fdec2
651 $ hg id -ir dcbb326fdec2
652 abort: unknown revision 'dcbb326fdec2'!
652 abort: unknown revision 'dcbb326fdec2'!
653 [255]
653 [255]
654 $ hg id -ir d62d843c9a01
654 $ hg id -ir d62d843c9a01
655 d62d843c9a01
655 d62d843c9a01
656 $ hg bookmarks
656 $ hg bookmarks
657 B 9:ff43616e5d0f
657 B 9:ff43616e5d0f
658 delete 6:2702dd0c91e7
658 delete 6:2702dd0c91e7
659 multipledelete1 11:e46a4836065c
659 multipledelete1 11:e46a4836065c
660 multipledelete2 12:b4594d867745
660 multipledelete2 12:b4594d867745
661 singlenode1 13:43227190fef8
661 singlenode1 13:43227190fef8
662 singlenode2 13:43227190fef8
662 singlenode2 13:43227190fef8
663 $ hg strip -B multipledelete1 -B multipledelete2
663 $ hg strip -B multipledelete1 -B multipledelete2
664 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg
664 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg
665 bookmark 'multipledelete1' deleted
665 bookmark 'multipledelete1' deleted
666 bookmark 'multipledelete2' deleted
666 bookmark 'multipledelete2' deleted
667 $ hg id -ir e46a4836065c
667 $ hg id -ir e46a4836065c
668 abort: unknown revision 'e46a4836065c'!
668 abort: unknown revision 'e46a4836065c'!
669 [255]
669 [255]
670 $ hg id -ir b4594d867745
670 $ hg id -ir b4594d867745
671 abort: unknown revision 'b4594d867745'!
671 abort: unknown revision 'b4594d867745'!
672 [255]
672 [255]
673 $ hg strip -B singlenode1 -B singlenode2
673 $ hg strip -B singlenode1 -B singlenode2
674 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg
674 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg
675 bookmark 'singlenode1' deleted
675 bookmark 'singlenode1' deleted
676 bookmark 'singlenode2' deleted
676 bookmark 'singlenode2' deleted
677 $ hg id -ir 43227190fef8
677 $ hg id -ir 43227190fef8
678 abort: unknown revision '43227190fef8'!
678 abort: unknown revision '43227190fef8'!
679 [255]
679 [255]
680 $ hg strip -B unknownbookmark
680 $ hg strip -B unknownbookmark
681 abort: bookmark 'unknownbookmark' not found
681 abort: bookmark 'unknownbookmark' not found
682 [255]
682 [255]
683 $ hg strip -B unknownbookmark1 -B unknownbookmark2
683 $ hg strip -B unknownbookmark1 -B unknownbookmark2
684 abort: bookmark 'unknownbookmark1,unknownbookmark2' not found
684 abort: bookmark 'unknownbookmark1,unknownbookmark2' not found
685 [255]
685 [255]
686 $ hg strip -B delete -B unknownbookmark
686 $ hg strip -B delete -B unknownbookmark
687 abort: bookmark 'unknownbookmark' not found
687 abort: bookmark 'unknownbookmark' not found
688 [255]
688 [255]
689 $ hg strip -B delete
689 $ hg strip -B delete
690 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
690 saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
691 bookmark 'delete' deleted
691 bookmark 'delete' deleted
692 $ hg id -ir 6:2702dd0c91e7
692 $ hg id -ir 6:2702dd0c91e7
693 abort: unknown revision '2702dd0c91e7'!
693 abort: unknown revision '2702dd0c91e7'!
694 [255]
694 [255]
695 $ hg update B
695 $ hg update B
696 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
696 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
697 (activating bookmark B)
697 (activating bookmark B)
698 $ echo a > a
698 $ echo a > a
699 $ hg add a
699 $ hg add a
700 $ hg strip -B B
700 $ hg strip -B B
701 abort: local changes found
701 abort: local changes found
702 [255]
702 [255]
703 $ hg bookmarks
703 $ hg bookmarks
704 * B 6:ff43616e5d0f
704 * B 6:ff43616e5d0f
705
705
706 Make sure no one adds back a -b option:
706 Make sure no one adds back a -b option:
707
707
708 $ hg strip -b tip
708 $ hg strip -b tip
709 hg strip: option -b not recognized
709 hg strip: option -b not recognized
710 hg strip [-k] [-f] [-B bookmark] [-r] REV...
710 hg strip [-k] [-f] [-B bookmark] [-r] REV...
711
711
712 strip changesets and all their descendants from the repository
712 strip changesets and all their descendants from the repository
713
713
714 (use 'hg help -e strip' to show help for the strip extension)
714 (use 'hg help -e strip' to show help for the strip extension)
715
715
716 options ([+] can be repeated):
716 options ([+] can be repeated):
717
717
718 -r --rev REV [+] strip specified revision (optional, can specify
718 -r --rev REV [+] strip specified revision (optional, can specify
719 revisions without this option)
719 revisions without this option)
720 -f --force force removal of changesets, discard uncommitted
720 -f --force force removal of changesets, discard uncommitted
721 changes (no backup)
721 changes (no backup)
722 --no-backup no backups
722 --no-backup no backups
723 -k --keep do not modify working directory during strip
723 -k --keep do not modify working directory during strip
724 -B --bookmark VALUE [+] remove revs only reachable from given bookmark
724 -B --bookmark VALUE [+] remove revs only reachable from given bookmark
725 --mq operate on patch repository
725 --mq operate on patch repository
726
726
727 (use 'hg strip -h' to show more help)
727 (use 'hg strip -h' to show more help)
728 [255]
728 [255]
729
729
730 $ cd ..
730 $ cd ..
731
731
732 Verify bundles don't get overwritten:
732 Verify bundles don't get overwritten:
733
733
734 $ hg init doublebundle
734 $ hg init doublebundle
735 $ cd doublebundle
735 $ cd doublebundle
736 $ touch a
736 $ touch a
737 $ hg commit -Aqm a
737 $ hg commit -Aqm a
738 $ touch b
738 $ touch b
739 $ hg commit -Aqm b
739 $ hg commit -Aqm b
740 $ hg strip -r 0
740 $ hg strip -r 0
741 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
741 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
742 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg
742 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg
743 $ ls .hg/strip-backup
743 $ ls .hg/strip-backup
744 3903775176ed-e68910bd-backup.hg
744 3903775176ed-e68910bd-backup.hg
745 #if repobundlerepo
745 $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg
746 $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg
746 $ hg strip -r 0
747 $ hg strip -r 0
747 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg
748 saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg
748 $ ls .hg/strip-backup
749 $ ls .hg/strip-backup
749 3903775176ed-54390173-backup.hg
750 3903775176ed-54390173-backup.hg
750 3903775176ed-e68910bd-backup.hg
751 3903775176ed-e68910bd-backup.hg
752 #endif
751 $ cd ..
753 $ cd ..
752
754
753 Test that we only bundle the stripped changesets (issue4736)
755 Test that we only bundle the stripped changesets (issue4736)
754 ------------------------------------------------------------
756 ------------------------------------------------------------
755
757
756 initialization (previous repo is empty anyway)
758 initialization (previous repo is empty anyway)
757
759
758 $ hg init issue4736
760 $ hg init issue4736
759 $ cd issue4736
761 $ cd issue4736
760 $ echo a > a
762 $ echo a > a
761 $ hg add a
763 $ hg add a
762 $ hg commit -m commitA
764 $ hg commit -m commitA
763 $ echo b > b
765 $ echo b > b
764 $ hg add b
766 $ hg add b
765 $ hg commit -m commitB
767 $ hg commit -m commitB
766 $ echo c > c
768 $ echo c > c
767 $ hg add c
769 $ hg add c
768 $ hg commit -m commitC
770 $ hg commit -m commitC
769 $ hg up 'desc(commitB)'
771 $ hg up 'desc(commitB)'
770 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
772 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
771 $ echo d > d
773 $ echo d > d
772 $ hg add d
774 $ hg add d
773 $ hg commit -m commitD
775 $ hg commit -m commitD
774 created new head
776 created new head
775 $ hg up 'desc(commitC)'
777 $ hg up 'desc(commitC)'
776 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
778 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
777 $ hg merge 'desc(commitD)'
779 $ hg merge 'desc(commitD)'
778 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
780 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
779 (branch merge, don't forget to commit)
781 (branch merge, don't forget to commit)
780 $ hg ci -m 'mergeCD'
782 $ hg ci -m 'mergeCD'
781 $ hg log -G
783 $ hg log -G
782 @ changeset: 4:d8db9d137221
784 @ changeset: 4:d8db9d137221
783 |\ tag: tip
785 |\ tag: tip
784 | | parent: 2:5c51d8d6557d
786 | | parent: 2:5c51d8d6557d
785 | | parent: 3:6625a5168474
787 | | parent: 3:6625a5168474
786 | | user: test
788 | | user: test
787 | | date: Thu Jan 01 00:00:00 1970 +0000
789 | | date: Thu Jan 01 00:00:00 1970 +0000
788 | | summary: mergeCD
790 | | summary: mergeCD
789 | |
791 | |
790 | o changeset: 3:6625a5168474
792 | o changeset: 3:6625a5168474
791 | | parent: 1:eca11cf91c71
793 | | parent: 1:eca11cf91c71
792 | | user: test
794 | | user: test
793 | | date: Thu Jan 01 00:00:00 1970 +0000
795 | | date: Thu Jan 01 00:00:00 1970 +0000
794 | | summary: commitD
796 | | summary: commitD
795 | |
797 | |
796 o | changeset: 2:5c51d8d6557d
798 o | changeset: 2:5c51d8d6557d
797 |/ user: test
799 |/ user: test
798 | date: Thu Jan 01 00:00:00 1970 +0000
800 | date: Thu Jan 01 00:00:00 1970 +0000
799 | summary: commitC
801 | summary: commitC
800 |
802 |
801 o changeset: 1:eca11cf91c71
803 o changeset: 1:eca11cf91c71
802 | user: test
804 | user: test
803 | date: Thu Jan 01 00:00:00 1970 +0000
805 | date: Thu Jan 01 00:00:00 1970 +0000
804 | summary: commitB
806 | summary: commitB
805 |
807 |
806 o changeset: 0:105141ef12d0
808 o changeset: 0:105141ef12d0
807 user: test
809 user: test
808 date: Thu Jan 01 00:00:00 1970 +0000
810 date: Thu Jan 01 00:00:00 1970 +0000
809 summary: commitA
811 summary: commitA
810
812
811
813
812 Check bundle behavior:
814 Check bundle behavior:
813
815
814 $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
816 $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg
815 2 changesets found
817 2 changesets found
818 #if repobundlerepo
816 $ hg log -r 'bundle()' -R ../issue4736.hg
819 $ hg log -r 'bundle()' -R ../issue4736.hg
817 changeset: 3:6625a5168474
820 changeset: 3:6625a5168474
818 parent: 1:eca11cf91c71
821 parent: 1:eca11cf91c71
819 user: test
822 user: test
820 date: Thu Jan 01 00:00:00 1970 +0000
823 date: Thu Jan 01 00:00:00 1970 +0000
821 summary: commitD
824 summary: commitD
822
825
823 changeset: 4:d8db9d137221
826 changeset: 4:d8db9d137221
824 tag: tip
827 tag: tip
825 parent: 2:5c51d8d6557d
828 parent: 2:5c51d8d6557d
826 parent: 3:6625a5168474
829 parent: 3:6625a5168474
827 user: test
830 user: test
828 date: Thu Jan 01 00:00:00 1970 +0000
831 date: Thu Jan 01 00:00:00 1970 +0000
829 summary: mergeCD
832 summary: mergeCD
830
833
834 #endif
831
835
832 check strip behavior
836 check strip behavior
833
837
834 $ hg --config extensions.strip= strip 'desc(commitD)' --debug
838 $ hg --config extensions.strip= strip 'desc(commitD)' --debug
835 resolving manifests
839 resolving manifests
836 branchmerge: False, force: True, partial: False
840 branchmerge: False, force: True, partial: False
837 ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
841 ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71
838 c: other deleted -> r
842 c: other deleted -> r
839 removing c
843 removing c
840 d: other deleted -> r
844 d: other deleted -> r
841 removing d
845 removing d
842 starting 4 threads for background file closing (?)
846 starting 4 threads for background file closing (?)
843 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
847 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
844 2 changesets found
848 2 changesets found
845 list of changesets:
849 list of changesets:
846 6625a516847449b6f0fa3737b9ba56e9f0f3032c
850 6625a516847449b6f0fa3737b9ba56e9f0f3032c
847 d8db9d1372214336d2b5570f20ee468d2c72fa8b
851 d8db9d1372214336d2b5570f20ee468d2c72fa8b
848 bundle2-output-bundle: "HG20", (1 params) 3 parts total
852 bundle2-output-bundle: "HG20", (1 params) 3 parts total
849 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
853 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
850 bundle2-output-part: "cache:rev-branch-cache" streamed payload
854 bundle2-output-part: "cache:rev-branch-cache" streamed payload
851 bundle2-output-part: "phase-heads" 24 bytes payload
855 bundle2-output-part: "phase-heads" 24 bytes payload
852 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg
856 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg
853 updating the branch cache
857 updating the branch cache
854 invalid branchheads cache (served): tip differs
858 invalid branchheads cache (served): tip differs
855 $ hg log -G
859 $ hg log -G
856 o changeset: 2:5c51d8d6557d
860 o changeset: 2:5c51d8d6557d
857 | tag: tip
861 | tag: tip
858 | user: test
862 | user: test
859 | date: Thu Jan 01 00:00:00 1970 +0000
863 | date: Thu Jan 01 00:00:00 1970 +0000
860 | summary: commitC
864 | summary: commitC
861 |
865 |
862 @ changeset: 1:eca11cf91c71
866 @ changeset: 1:eca11cf91c71
863 | user: test
867 | user: test
864 | date: Thu Jan 01 00:00:00 1970 +0000
868 | date: Thu Jan 01 00:00:00 1970 +0000
865 | summary: commitB
869 | summary: commitB
866 |
870 |
867 o changeset: 0:105141ef12d0
871 o changeset: 0:105141ef12d0
868 user: test
872 user: test
869 date: Thu Jan 01 00:00:00 1970 +0000
873 date: Thu Jan 01 00:00:00 1970 +0000
870 summary: commitA
874 summary: commitA
871
875
872
876
873 strip backup content
877 strip backup content
874
878
879 #if repobundlerepo
875 $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
880 $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg
876 changeset: 3:6625a5168474
881 changeset: 3:6625a5168474
877 parent: 1:eca11cf91c71
882 parent: 1:eca11cf91c71
878 user: test
883 user: test
879 date: Thu Jan 01 00:00:00 1970 +0000
884 date: Thu Jan 01 00:00:00 1970 +0000
880 summary: commitD
885 summary: commitD
881
886
882 changeset: 4:d8db9d137221
887 changeset: 4:d8db9d137221
883 tag: tip
888 tag: tip
884 parent: 2:5c51d8d6557d
889 parent: 2:5c51d8d6557d
885 parent: 3:6625a5168474
890 parent: 3:6625a5168474
886 user: test
891 user: test
887 date: Thu Jan 01 00:00:00 1970 +0000
892 date: Thu Jan 01 00:00:00 1970 +0000
888 summary: mergeCD
893 summary: mergeCD
889
894
895
896 #endif
897
890 Check that the phase cache is properly invalidated after a strip with bookmark.
898 Check that the phase cache is properly invalidated after a strip with bookmark.
891
899
892 $ cat > ../stripstalephasecache.py << EOF
900 $ cat > ../stripstalephasecache.py << EOF
893 > from mercurial import extensions, localrepo
901 > from mercurial import extensions, localrepo
894 > def transactioncallback(orig, repo, desc, *args, **kwargs):
902 > def transactioncallback(orig, repo, desc, *args, **kwargs):
895 > def test(transaction):
903 > def test(transaction):
896 > # observe cache inconsistency
904 > # observe cache inconsistency
897 > try:
905 > try:
898 > [repo.changelog.node(r) for r in repo.revs(b"not public()")]
906 > [repo.changelog.node(r) for r in repo.revs(b"not public()")]
899 > except IndexError:
907 > except IndexError:
900 > repo.ui.status(b"Index error!\n")
908 > repo.ui.status(b"Index error!\n")
901 > transaction = orig(repo, desc, *args, **kwargs)
909 > transaction = orig(repo, desc, *args, **kwargs)
902 > # warm up the phase cache
910 > # warm up the phase cache
903 > list(repo.revs(b"not public()"))
911 > list(repo.revs(b"not public()"))
904 > if desc != b'strip':
912 > if desc != b'strip':
905 > transaction.addpostclose(b"phase invalidation test", test)
913 > transaction.addpostclose(b"phase invalidation test", test)
906 > return transaction
914 > return transaction
907 > def extsetup(ui):
915 > def extsetup(ui):
908 > extensions.wrapfunction(localrepo.localrepository, b"transaction",
916 > extensions.wrapfunction(localrepo.localrepository, b"transaction",
909 > transactioncallback)
917 > transactioncallback)
910 > EOF
918 > EOF
911 $ hg up -C 2
919 $ hg up -C 2
912 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
920 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
913 $ echo k > k
921 $ echo k > k
914 $ hg add k
922 $ hg add k
915 $ hg commit -m commitK
923 $ hg commit -m commitK
916 $ echo l > l
924 $ echo l > l
917 $ hg add l
925 $ hg add l
918 $ hg commit -m commitL
926 $ hg commit -m commitL
919 $ hg book -r tip blah
927 $ hg book -r tip blah
920 $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py
928 $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py
921 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
929 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
922 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg
930 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg
923 $ hg up -C 1
931 $ hg up -C 1
924 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
932 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
925
933
926 Error during post-close callback of the strip transaction
934 Error during post-close callback of the strip transaction
927 (They should be gracefully handled and reported)
935 (They should be gracefully handled and reported)
928
936
929 $ cat > ../crashstrip.py << EOF
937 $ cat > ../crashstrip.py << EOF
930 > from mercurial import error
938 > from mercurial import error
931 > def reposetup(ui, repo):
939 > def reposetup(ui, repo):
932 > class crashstriprepo(repo.__class__):
940 > class crashstriprepo(repo.__class__):
933 > def transaction(self, desc, *args, **kwargs):
941 > def transaction(self, desc, *args, **kwargs):
934 > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs)
942 > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs)
935 > if desc == b'strip':
943 > if desc == b'strip':
936 > def crash(tra): raise error.Abort(b'boom')
944 > def crash(tra): raise error.Abort(b'boom')
937 > tr.addpostclose(b'crash', crash)
945 > tr.addpostclose(b'crash', crash)
938 > return tr
946 > return tr
939 > repo.__class__ = crashstriprepo
947 > repo.__class__ = crashstriprepo
940 > EOF
948 > EOF
941 $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
949 $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py
942 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg
950 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg
943 strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg'
951 strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg'
944 abort: boom
952 abort: boom
945 [255]
953 [255]
946
954
947 test stripping a working directory parent doesn't switch named branches
955 test stripping a working directory parent doesn't switch named branches
948
956
949 $ hg log -G
957 $ hg log -G
950 @ changeset: 1:eca11cf91c71
958 @ changeset: 1:eca11cf91c71
951 | tag: tip
959 | tag: tip
952 | user: test
960 | user: test
953 | date: Thu Jan 01 00:00:00 1970 +0000
961 | date: Thu Jan 01 00:00:00 1970 +0000
954 | summary: commitB
962 | summary: commitB
955 |
963 |
956 o changeset: 0:105141ef12d0
964 o changeset: 0:105141ef12d0
957 user: test
965 user: test
958 date: Thu Jan 01 00:00:00 1970 +0000
966 date: Thu Jan 01 00:00:00 1970 +0000
959 summary: commitA
967 summary: commitA
960
968
961
969
962 $ hg branch new-branch
970 $ hg branch new-branch
963 marked working directory as branch new-branch
971 marked working directory as branch new-branch
964 (branches are permanent and global, did you want a bookmark?)
972 (branches are permanent and global, did you want a bookmark?)
965 $ hg ci -m "start new branch"
973 $ hg ci -m "start new branch"
966 $ echo 'foo' > foo.txt
974 $ echo 'foo' > foo.txt
967 $ hg ci -Aqm foo
975 $ hg ci -Aqm foo
968 $ hg up default
976 $ hg up default
969 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
977 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
970 $ echo 'bar' > bar.txt
978 $ echo 'bar' > bar.txt
971 $ hg ci -Aqm bar
979 $ hg ci -Aqm bar
972 $ hg up new-branch
980 $ hg up new-branch
973 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
981 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
974 $ hg merge default
982 $ hg merge default
975 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
983 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
976 (branch merge, don't forget to commit)
984 (branch merge, don't forget to commit)
977 $ hg log -G
985 $ hg log -G
978 @ changeset: 4:35358f982181
986 @ changeset: 4:35358f982181
979 | tag: tip
987 | tag: tip
980 | parent: 1:eca11cf91c71
988 | parent: 1:eca11cf91c71
981 | user: test
989 | user: test
982 | date: Thu Jan 01 00:00:00 1970 +0000
990 | date: Thu Jan 01 00:00:00 1970 +0000
983 | summary: bar
991 | summary: bar
984 |
992 |
985 | @ changeset: 3:f62c6c09b707
993 | @ changeset: 3:f62c6c09b707
986 | | branch: new-branch
994 | | branch: new-branch
987 | | user: test
995 | | user: test
988 | | date: Thu Jan 01 00:00:00 1970 +0000
996 | | date: Thu Jan 01 00:00:00 1970 +0000
989 | | summary: foo
997 | | summary: foo
990 | |
998 | |
991 | o changeset: 2:b1d33a8cadd9
999 | o changeset: 2:b1d33a8cadd9
992 |/ branch: new-branch
1000 |/ branch: new-branch
993 | user: test
1001 | user: test
994 | date: Thu Jan 01 00:00:00 1970 +0000
1002 | date: Thu Jan 01 00:00:00 1970 +0000
995 | summary: start new branch
1003 | summary: start new branch
996 |
1004 |
997 o changeset: 1:eca11cf91c71
1005 o changeset: 1:eca11cf91c71
998 | user: test
1006 | user: test
999 | date: Thu Jan 01 00:00:00 1970 +0000
1007 | date: Thu Jan 01 00:00:00 1970 +0000
1000 | summary: commitB
1008 | summary: commitB
1001 |
1009 |
1002 o changeset: 0:105141ef12d0
1010 o changeset: 0:105141ef12d0
1003 user: test
1011 user: test
1004 date: Thu Jan 01 00:00:00 1970 +0000
1012 date: Thu Jan 01 00:00:00 1970 +0000
1005 summary: commitA
1013 summary: commitA
1006
1014
1007
1015
1008 $ hg strip --force -r 35358f982181
1016 $ hg strip --force -r 35358f982181
1009 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1017 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1010 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg
1018 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg
1011 $ hg log -G
1019 $ hg log -G
1012 @ changeset: 3:f62c6c09b707
1020 @ changeset: 3:f62c6c09b707
1013 | branch: new-branch
1021 | branch: new-branch
1014 | tag: tip
1022 | tag: tip
1015 | user: test
1023 | user: test
1016 | date: Thu Jan 01 00:00:00 1970 +0000
1024 | date: Thu Jan 01 00:00:00 1970 +0000
1017 | summary: foo
1025 | summary: foo
1018 |
1026 |
1019 o changeset: 2:b1d33a8cadd9
1027 o changeset: 2:b1d33a8cadd9
1020 | branch: new-branch
1028 | branch: new-branch
1021 | user: test
1029 | user: test
1022 | date: Thu Jan 01 00:00:00 1970 +0000
1030 | date: Thu Jan 01 00:00:00 1970 +0000
1023 | summary: start new branch
1031 | summary: start new branch
1024 |
1032 |
1025 o changeset: 1:eca11cf91c71
1033 o changeset: 1:eca11cf91c71
1026 | user: test
1034 | user: test
1027 | date: Thu Jan 01 00:00:00 1970 +0000
1035 | date: Thu Jan 01 00:00:00 1970 +0000
1028 | summary: commitB
1036 | summary: commitB
1029 |
1037 |
1030 o changeset: 0:105141ef12d0
1038 o changeset: 0:105141ef12d0
1031 user: test
1039 user: test
1032 date: Thu Jan 01 00:00:00 1970 +0000
1040 date: Thu Jan 01 00:00:00 1970 +0000
1033 summary: commitA
1041 summary: commitA
1034
1042
1035
1043
1036 $ hg up default
1044 $ hg up default
1037 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1045 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1038 $ echo 'bar' > bar.txt
1046 $ echo 'bar' > bar.txt
1039 $ hg ci -Aqm bar
1047 $ hg ci -Aqm bar
1040 $ hg up new-branch
1048 $ hg up new-branch
1041 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1049 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1042 $ hg merge default
1050 $ hg merge default
1043 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1051 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1044 (branch merge, don't forget to commit)
1052 (branch merge, don't forget to commit)
1045 $ hg ci -m merge
1053 $ hg ci -m merge
1046 $ hg log -G
1054 $ hg log -G
1047 @ changeset: 5:4cf5e92caec2
1055 @ changeset: 5:4cf5e92caec2
1048 |\ branch: new-branch
1056 |\ branch: new-branch
1049 | | tag: tip
1057 | | tag: tip
1050 | | parent: 3:f62c6c09b707
1058 | | parent: 3:f62c6c09b707
1051 | | parent: 4:35358f982181
1059 | | parent: 4:35358f982181
1052 | | user: test
1060 | | user: test
1053 | | date: Thu Jan 01 00:00:00 1970 +0000
1061 | | date: Thu Jan 01 00:00:00 1970 +0000
1054 | | summary: merge
1062 | | summary: merge
1055 | |
1063 | |
1056 | o changeset: 4:35358f982181
1064 | o changeset: 4:35358f982181
1057 | | parent: 1:eca11cf91c71
1065 | | parent: 1:eca11cf91c71
1058 | | user: test
1066 | | user: test
1059 | | date: Thu Jan 01 00:00:00 1970 +0000
1067 | | date: Thu Jan 01 00:00:00 1970 +0000
1060 | | summary: bar
1068 | | summary: bar
1061 | |
1069 | |
1062 o | changeset: 3:f62c6c09b707
1070 o | changeset: 3:f62c6c09b707
1063 | | branch: new-branch
1071 | | branch: new-branch
1064 | | user: test
1072 | | user: test
1065 | | date: Thu Jan 01 00:00:00 1970 +0000
1073 | | date: Thu Jan 01 00:00:00 1970 +0000
1066 | | summary: foo
1074 | | summary: foo
1067 | |
1075 | |
1068 o | changeset: 2:b1d33a8cadd9
1076 o | changeset: 2:b1d33a8cadd9
1069 |/ branch: new-branch
1077 |/ branch: new-branch
1070 | user: test
1078 | user: test
1071 | date: Thu Jan 01 00:00:00 1970 +0000
1079 | date: Thu Jan 01 00:00:00 1970 +0000
1072 | summary: start new branch
1080 | summary: start new branch
1073 |
1081 |
1074 o changeset: 1:eca11cf91c71
1082 o changeset: 1:eca11cf91c71
1075 | user: test
1083 | user: test
1076 | date: Thu Jan 01 00:00:00 1970 +0000
1084 | date: Thu Jan 01 00:00:00 1970 +0000
1077 | summary: commitB
1085 | summary: commitB
1078 |
1086 |
1079 o changeset: 0:105141ef12d0
1087 o changeset: 0:105141ef12d0
1080 user: test
1088 user: test
1081 date: Thu Jan 01 00:00:00 1970 +0000
1089 date: Thu Jan 01 00:00:00 1970 +0000
1082 summary: commitA
1090 summary: commitA
1083
1091
1084
1092
1085 $ hg strip -r 35358f982181
1093 $ hg strip -r 35358f982181
1086 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1094 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1087 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1095 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1088 $ hg log -G
1096 $ hg log -G
1089 @ changeset: 3:f62c6c09b707
1097 @ changeset: 3:f62c6c09b707
1090 | branch: new-branch
1098 | branch: new-branch
1091 | tag: tip
1099 | tag: tip
1092 | user: test
1100 | user: test
1093 | date: Thu Jan 01 00:00:00 1970 +0000
1101 | date: Thu Jan 01 00:00:00 1970 +0000
1094 | summary: foo
1102 | summary: foo
1095 |
1103 |
1096 o changeset: 2:b1d33a8cadd9
1104 o changeset: 2:b1d33a8cadd9
1097 | branch: new-branch
1105 | branch: new-branch
1098 | user: test
1106 | user: test
1099 | date: Thu Jan 01 00:00:00 1970 +0000
1107 | date: Thu Jan 01 00:00:00 1970 +0000
1100 | summary: start new branch
1108 | summary: start new branch
1101 |
1109 |
1102 o changeset: 1:eca11cf91c71
1110 o changeset: 1:eca11cf91c71
1103 | user: test
1111 | user: test
1104 | date: Thu Jan 01 00:00:00 1970 +0000
1112 | date: Thu Jan 01 00:00:00 1970 +0000
1105 | summary: commitB
1113 | summary: commitB
1106 |
1114 |
1107 o changeset: 0:105141ef12d0
1115 o changeset: 0:105141ef12d0
1108 user: test
1116 user: test
1109 date: Thu Jan 01 00:00:00 1970 +0000
1117 date: Thu Jan 01 00:00:00 1970 +0000
1110 summary: commitA
1118 summary: commitA
1111
1119
1112
1120
1113 $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1121 $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1114 adding changesets
1122 adding changesets
1115 adding manifests
1123 adding manifests
1116 adding file changes
1124 adding file changes
1117 added 2 changesets with 1 changes to 1 files
1125 added 2 changesets with 1 changes to 1 files
1118 new changesets 35358f982181:4cf5e92caec2
1126 new changesets 35358f982181:4cf5e92caec2
1119 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1127 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1120
1128
1121 $ hg strip -k -r 35358f982181
1129 $ hg strip -k -r 35358f982181
1122 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1130 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
1123 $ hg log -G
1131 $ hg log -G
1124 @ changeset: 3:f62c6c09b707
1132 @ changeset: 3:f62c6c09b707
1125 | branch: new-branch
1133 | branch: new-branch
1126 | tag: tip
1134 | tag: tip
1127 | user: test
1135 | user: test
1128 | date: Thu Jan 01 00:00:00 1970 +0000
1136 | date: Thu Jan 01 00:00:00 1970 +0000
1129 | summary: foo
1137 | summary: foo
1130 |
1138 |
1131 o changeset: 2:b1d33a8cadd9
1139 o changeset: 2:b1d33a8cadd9
1132 | branch: new-branch
1140 | branch: new-branch
1133 | user: test
1141 | user: test
1134 | date: Thu Jan 01 00:00:00 1970 +0000
1142 | date: Thu Jan 01 00:00:00 1970 +0000
1135 | summary: start new branch
1143 | summary: start new branch
1136 |
1144 |
1137 o changeset: 1:eca11cf91c71
1145 o changeset: 1:eca11cf91c71
1138 | user: test
1146 | user: test
1139 | date: Thu Jan 01 00:00:00 1970 +0000
1147 | date: Thu Jan 01 00:00:00 1970 +0000
1140 | summary: commitB
1148 | summary: commitB
1141 |
1149 |
1142 o changeset: 0:105141ef12d0
1150 o changeset: 0:105141ef12d0
1143 user: test
1151 user: test
1144 date: Thu Jan 01 00:00:00 1970 +0000
1152 date: Thu Jan 01 00:00:00 1970 +0000
1145 summary: commitA
1153 summary: commitA
1146
1154
1147 $ hg diff
1155 $ hg diff
1148 diff -r f62c6c09b707 bar.txt
1156 diff -r f62c6c09b707 bar.txt
1149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1157 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1150 +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000
1158 +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000
1151 @@ -0,0 +1,1 @@
1159 @@ -0,0 +1,1 @@
1152 +bar
1160 +bar
1153
1161
1154 Use delayedstrip to strip inside a transaction
1162 Use delayedstrip to strip inside a transaction
1155
1163
1156 $ cd $TESTTMP
1164 $ cd $TESTTMP
1157 $ hg init delayedstrip
1165 $ hg init delayedstrip
1158 $ cd delayedstrip
1166 $ cd delayedstrip
1159 $ hg debugdrawdag <<'EOS'
1167 $ hg debugdrawdag <<'EOS'
1160 > D
1168 > D
1161 > |
1169 > |
1162 > C F H # Commit on top of "I",
1170 > C F H # Commit on top of "I",
1163 > | |/| # Strip B+D+I+E+G+H+Z
1171 > | |/| # Strip B+D+I+E+G+H+Z
1164 > I B E G
1172 > I B E G
1165 > \|/
1173 > \|/
1166 > A Z
1174 > A Z
1167 > EOS
1175 > EOS
1168 $ cp -R . ../scmutilcleanup
1176 $ cp -R . ../scmutilcleanup
1169
1177
1170 $ hg up -C I
1178 $ hg up -C I
1171 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1179 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1172 $ echo 3 >> I
1180 $ echo 3 >> I
1173 $ cat > $TESTTMP/delayedstrip.py <<EOF
1181 $ cat > $TESTTMP/delayedstrip.py <<EOF
1174 > from __future__ import absolute_import
1182 > from __future__ import absolute_import
1175 > from mercurial import commands, registrar, repair
1183 > from mercurial import commands, registrar, repair
1176 > cmdtable = {}
1184 > cmdtable = {}
1177 > command = registrar.command(cmdtable)
1185 > command = registrar.command(cmdtable)
1178 > @command(b'testdelayedstrip')
1186 > @command(b'testdelayedstrip')
1179 > def testdelayedstrip(ui, repo):
1187 > def testdelayedstrip(ui, repo):
1180 > def getnodes(expr):
1188 > def getnodes(expr):
1181 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1189 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1182 > with repo.wlock():
1190 > with repo.wlock():
1183 > with repo.lock():
1191 > with repo.lock():
1184 > with repo.transaction(b'delayedstrip'):
1192 > with repo.transaction(b'delayedstrip'):
1185 > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J')
1193 > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J')
1186 > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I')
1194 > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I')
1187 > commands.commit(ui, repo, message=b'J', date=b'0 0')
1195 > commands.commit(ui, repo, message=b'J', date=b'0 0')
1188 > EOF
1196 > EOF
1189 $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py
1197 $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py
1190 warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22
1198 warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22
1191 saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg
1199 saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg
1192
1200
1193 $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)'
1201 $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)'
1194 @ 6:2f2d51af6205 J
1202 @ 6:2f2d51af6205 J
1195 |
1203 |
1196 o 3:08ebfeb61bac I
1204 o 3:08ebfeb61bac I
1197 |
1205 |
1198 | o 5:64a8289d2492 F
1206 | o 5:64a8289d2492 F
1199 | |
1207 | |
1200 | o 2:7fb047a69f22 E
1208 | o 2:7fb047a69f22 E
1201 |/
1209 |/
1202 | o 4:26805aba1e60 C
1210 | o 4:26805aba1e60 C
1203 | |
1211 | |
1204 | o 1:112478962961 B
1212 | o 1:112478962961 B
1205 |/
1213 |/
1206 o 0:426bada5c675 A
1214 o 0:426bada5c675 A
1207
1215
1208 Test high-level scmutil.cleanupnodes API
1216 Test high-level scmutil.cleanupnodes API
1209
1217
1210 $ cd $TESTTMP/scmutilcleanup
1218 $ cd $TESTTMP/scmutilcleanup
1211 $ hg debugdrawdag <<'EOS'
1219 $ hg debugdrawdag <<'EOS'
1212 > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G
1220 > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G
1213 > | | |
1221 > | | |
1214 > C H G
1222 > C H G
1215 > EOS
1223 > EOS
1216 $ for i in B C D F G I Z; do
1224 $ for i in B C D F G I Z; do
1217 > hg bookmark -i -r $i b-$i
1225 > hg bookmark -i -r $i b-$i
1218 > done
1226 > done
1219 $ hg bookmark -i -r E 'b-F@divergent1'
1227 $ hg bookmark -i -r E 'b-F@divergent1'
1220 $ hg bookmark -i -r H 'b-F@divergent2'
1228 $ hg bookmark -i -r H 'b-F@divergent2'
1221 $ hg bookmark -i -r G 'b-F@divergent3'
1229 $ hg bookmark -i -r G 'b-F@divergent3'
1222 $ cp -R . ../scmutilcleanup.obsstore
1230 $ cp -R . ../scmutilcleanup.obsstore
1223
1231
1224 $ cat > $TESTTMP/scmutilcleanup.py <<EOF
1232 $ cat > $TESTTMP/scmutilcleanup.py <<EOF
1225 > from mercurial import registrar, scmutil
1233 > from mercurial import registrar, scmutil
1226 > cmdtable = {}
1234 > cmdtable = {}
1227 > command = registrar.command(cmdtable)
1235 > command = registrar.command(cmdtable)
1228 > @command(b'testnodescleanup')
1236 > @command(b'testnodescleanup')
1229 > def testnodescleanup(ui, repo):
1237 > def testnodescleanup(ui, repo):
1230 > def nodes(expr):
1238 > def nodes(expr):
1231 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1239 > return [repo.changelog.node(r) for r in repo.revs(expr)]
1232 > def node(expr):
1240 > def node(expr):
1233 > return nodes(expr)[0]
1241 > return nodes(expr)[0]
1234 > with repo.wlock():
1242 > with repo.wlock():
1235 > with repo.lock():
1243 > with repo.lock():
1236 > with repo.transaction(b'delayedstrip'):
1244 > with repo.transaction(b'delayedstrip'):
1237 > mapping = {node(b'F'): [node(b'F2')],
1245 > mapping = {node(b'F'): [node(b'F2')],
1238 > node(b'D'): [node(b'D2')],
1246 > node(b'D'): [node(b'D2')],
1239 > node(b'G'): [node(b'G2')]}
1247 > node(b'G'): [node(b'G2')]}
1240 > scmutil.cleanupnodes(repo, mapping, b'replace')
1248 > scmutil.cleanupnodes(repo, mapping, b'replace')
1241 > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2'),
1249 > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2'),
1242 > b'replace')
1250 > b'replace')
1243 > EOF
1251 > EOF
1244 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1252 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1245 warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60
1253 warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60
1246 saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg
1254 saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg
1247
1255
1248 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1256 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1249 o 8:1473d4b996d1 G2 b-F@divergent3 b-G
1257 o 8:1473d4b996d1 G2 b-F@divergent3 b-G
1250 |
1258 |
1251 | o 7:d11b3456a873 F2 b-F
1259 | o 7:d11b3456a873 F2 b-F
1252 | |
1260 | |
1253 | o 5:5cb05ba470a7 H
1261 | o 5:5cb05ba470a7 H
1254 |/|
1262 |/|
1255 | o 3:7fb047a69f22 E b-F@divergent1
1263 | o 3:7fb047a69f22 E b-F@divergent1
1256 | |
1264 | |
1257 | | o 6:7c78f703e465 D2 b-D
1265 | | o 6:7c78f703e465 D2 b-D
1258 | | |
1266 | | |
1259 | | o 4:26805aba1e60 C
1267 | | o 4:26805aba1e60 C
1260 | | |
1268 | | |
1261 | | o 2:112478962961 B
1269 | | o 2:112478962961 B
1262 | |/
1270 | |/
1263 o | 1:1fc8102cda62 G
1271 o | 1:1fc8102cda62 G
1264 /
1272 /
1265 o 0:426bada5c675 A b-B b-C b-I
1273 o 0:426bada5c675 A b-B b-C b-I
1266
1274
1267 $ hg bookmark
1275 $ hg bookmark
1268 b-B 0:426bada5c675
1276 b-B 0:426bada5c675
1269 b-C 0:426bada5c675
1277 b-C 0:426bada5c675
1270 b-D 6:7c78f703e465
1278 b-D 6:7c78f703e465
1271 b-F 7:d11b3456a873
1279 b-F 7:d11b3456a873
1272 b-F@divergent1 3:7fb047a69f22
1280 b-F@divergent1 3:7fb047a69f22
1273 b-F@divergent3 8:1473d4b996d1
1281 b-F@divergent3 8:1473d4b996d1
1274 b-G 8:1473d4b996d1
1282 b-G 8:1473d4b996d1
1275 b-I 0:426bada5c675
1283 b-I 0:426bada5c675
1276 b-Z -1:000000000000
1284 b-Z -1:000000000000
1277
1285
1278 Test the above using obsstore "by the way". Not directly related to strip, but
1286 Test the above using obsstore "by the way". Not directly related to strip, but
1279 we have reusable code here
1287 we have reusable code here
1280
1288
1281 $ cd $TESTTMP/scmutilcleanup.obsstore
1289 $ cd $TESTTMP/scmutilcleanup.obsstore
1282 $ cat >> .hg/hgrc <<EOF
1290 $ cat >> .hg/hgrc <<EOF
1283 > [experimental]
1291 > [experimental]
1284 > evolution=true
1292 > evolution=true
1285 > evolution.track-operation=1
1293 > evolution.track-operation=1
1286 > EOF
1294 > EOF
1287
1295
1288 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1296 $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
1289 4 new orphan changesets
1297 4 new orphan changesets
1290
1298
1291 $ rm .hg/localtags
1299 $ rm .hg/localtags
1292 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1300 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1293 * 12:1473d4b996d1 G2 b-F@divergent3 b-G
1301 * 12:1473d4b996d1 G2 b-F@divergent3 b-G
1294 |
1302 |
1295 | * 11:d11b3456a873 F2 b-F
1303 | * 11:d11b3456a873 F2 b-F
1296 | |
1304 | |
1297 | * 8:5cb05ba470a7 H
1305 | * 8:5cb05ba470a7 H
1298 |/|
1306 |/|
1299 | o 4:7fb047a69f22 E b-F@divergent1
1307 | o 4:7fb047a69f22 E b-F@divergent1
1300 | |
1308 | |
1301 | | * 10:7c78f703e465 D2 b-D
1309 | | * 10:7c78f703e465 D2 b-D
1302 | | |
1310 | | |
1303 | | x 6:26805aba1e60 C
1311 | | x 6:26805aba1e60 C
1304 | | |
1312 | | |
1305 | | x 3:112478962961 B
1313 | | x 3:112478962961 B
1306 | |/
1314 | |/
1307 x | 1:1fc8102cda62 G
1315 x | 1:1fc8102cda62 G
1308 /
1316 /
1309 o 0:426bada5c675 A b-B b-C b-I
1317 o 0:426bada5c675 A b-B b-C b-I
1310
1318
1311 $ hg debugobsolete
1319 $ hg debugobsolete
1312 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1320 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1313 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1321 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'}
1314 f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'}
1322 f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'}
1315 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1323 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1316 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1324 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1317 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1325 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1318 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1326 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'}
1319 $ cd ..
1327 $ cd ..
1320
1328
1321 Test that obsmarkers are restored even when not using generaldelta
1329 Test that obsmarkers are restored even when not using generaldelta
1322
1330
1323 $ hg --config format.usegeneraldelta=no init issue5678
1331 $ hg --config format.usegeneraldelta=no init issue5678
1324 $ cd issue5678
1332 $ cd issue5678
1325 $ cat >> .hg/hgrc <<EOF
1333 $ cat >> .hg/hgrc <<EOF
1326 > [experimental]
1334 > [experimental]
1327 > evolution=true
1335 > evolution=true
1328 > EOF
1336 > EOF
1329 $ echo a > a
1337 $ echo a > a
1330 $ hg ci -Aqm a
1338 $ hg ci -Aqm a
1331 $ hg ci --amend -m a2
1339 $ hg ci --amend -m a2
1332 $ hg debugobsolete
1340 $ hg debugobsolete
1333 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1341 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1334 $ hg strip .
1342 $ hg strip .
1335 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1343 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1336 saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg
1344 saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg
1337 $ hg unbundle -q .hg/strip-backup/*
1345 $ hg unbundle -q .hg/strip-backup/*
1338 $ hg debugobsolete
1346 $ hg debugobsolete
1339 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1347 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
1340 $ cd ..
1348 $ cd ..
@@ -1,1205 +1,1205 b''
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extdiff]
2 > [extdiff]
3 > # for portability:
3 > # for portability:
4 > pdiff = sh "$RUNTESTDIR/pdiff"
4 > pdiff = sh "$RUNTESTDIR/pdiff"
5 > [progress]
5 > [progress]
6 > disable=False
6 > disable=False
7 > assume-tty = 1
7 > assume-tty = 1
8 > delay = 0
8 > delay = 0
9 > # set changedelay really large so we don't see nested topics
9 > # set changedelay really large so we don't see nested topics
10 > changedelay = 30000
10 > changedelay = 30000
11 > format = topic bar number
11 > format = topic bar number
12 > refresh = 0
12 > refresh = 0
13 > width = 60
13 > width = 60
14 > EOF
14 > EOF
15
15
16 Preparing the subrepository 'sub2'
16 Preparing the subrepository 'sub2'
17
17
18 $ hg init sub2
18 $ hg init sub2
19 $ echo sub2 > sub2/sub2
19 $ echo sub2 > sub2/sub2
20 $ hg add -R sub2
20 $ hg add -R sub2
21 adding sub2/sub2
21 adding sub2/sub2
22 $ hg commit -R sub2 -m "sub2 import"
22 $ hg commit -R sub2 -m "sub2 import"
23
23
24 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
24 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
25
25
26 $ hg init sub1
26 $ hg init sub1
27 $ echo sub1 > sub1/sub1
27 $ echo sub1 > sub1/sub1
28 $ echo "sub2 = ../sub2" > sub1/.hgsub
28 $ echo "sub2 = ../sub2" > sub1/.hgsub
29 $ hg clone sub2 sub1/sub2
29 $ hg clone sub2 sub1/sub2
30 \r (no-eol) (esc)
30 \r (no-eol) (esc)
31 linking [ <=> ] 1\r (no-eol) (esc)
31 linking [ <=> ] 1\r (no-eol) (esc)
32 linking [ <=> ] 2\r (no-eol) (esc)
32 linking [ <=> ] 2\r (no-eol) (esc)
33 linking [ <=> ] 3\r (no-eol) (esc)
33 linking [ <=> ] 3\r (no-eol) (esc)
34 linking [ <=> ] 4\r (no-eol) (esc)
34 linking [ <=> ] 4\r (no-eol) (esc)
35 linking [ <=> ] 5\r (no-eol) (esc)
35 linking [ <=> ] 5\r (no-eol) (esc)
36 linking [ <=> ] 6\r (no-eol) (esc)
36 linking [ <=> ] 6\r (no-eol) (esc)
37 \r (no-eol) (esc)
37 \r (no-eol) (esc)
38 \r (no-eol) (esc)
38 \r (no-eol) (esc)
39 updating [===========================================>] 1/1\r (no-eol) (esc)
39 updating [===========================================>] 1/1\r (no-eol) (esc)
40 \r (no-eol) (esc)
40 \r (no-eol) (esc)
41 updating to branch default
41 updating to branch default
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 $ hg add -R sub1
43 $ hg add -R sub1
44 adding sub1/.hgsub
44 adding sub1/.hgsub
45 adding sub1/sub1
45 adding sub1/sub1
46 $ hg commit -R sub1 -m "sub1 import"
46 $ hg commit -R sub1 -m "sub1 import"
47
47
48 Preparing the 'main' repo which depends on the subrepo 'sub1'
48 Preparing the 'main' repo which depends on the subrepo 'sub1'
49
49
50 $ hg init main
50 $ hg init main
51 $ echo main > main/main
51 $ echo main > main/main
52 $ echo "sub1 = ../sub1" > main/.hgsub
52 $ echo "sub1 = ../sub1" > main/.hgsub
53 $ hg clone sub1 main/sub1
53 $ hg clone sub1 main/sub1
54 \r (no-eol) (esc)
54 \r (no-eol) (esc)
55 linking [ <=> ] 1\r (no-eol) (esc)
55 linking [ <=> ] 1\r (no-eol) (esc)
56 linking [ <=> ] 2\r (no-eol) (esc)
56 linking [ <=> ] 2\r (no-eol) (esc)
57 linking [ <=> ] 3\r (no-eol) (esc)
57 linking [ <=> ] 3\r (no-eol) (esc)
58 linking [ <=> ] 4\r (no-eol) (esc)
58 linking [ <=> ] 4\r (no-eol) (esc)
59 linking [ <=> ] 5\r (no-eol) (esc)
59 linking [ <=> ] 5\r (no-eol) (esc)
60 linking [ <=> ] 6\r (no-eol) (esc)
60 linking [ <=> ] 6\r (no-eol) (esc)
61 linking [ <=> ] 7\r (no-eol) (esc)
61 linking [ <=> ] 7\r (no-eol) (esc)
62 linking [ <=> ] 8\r (no-eol) (esc)
62 linking [ <=> ] 8\r (no-eol) (esc)
63 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
63 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
64 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
64 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
65 \r (no-eol) (esc)
65 \r (no-eol) (esc)
66 \r (no-eol) (esc)
66 \r (no-eol) (esc)
67 updating [===========================================>] 3/3\r (no-eol) (esc)
67 updating [===========================================>] 3/3\r (no-eol) (esc)
68 \r (no-eol) (esc)
68 \r (no-eol) (esc)
69 \r (no-eol) (esc)
69 \r (no-eol) (esc)
70 linking [ <=> ] 1\r (no-eol) (esc)
70 linking [ <=> ] 1\r (no-eol) (esc)
71 linking [ <=> ] 2\r (no-eol) (esc)
71 linking [ <=> ] 2\r (no-eol) (esc)
72 linking [ <=> ] 3\r (no-eol) (esc)
72 linking [ <=> ] 3\r (no-eol) (esc)
73 linking [ <=> ] 4\r (no-eol) (esc)
73 linking [ <=> ] 4\r (no-eol) (esc)
74 linking [ <=> ] 5\r (no-eol) (esc)
74 linking [ <=> ] 5\r (no-eol) (esc)
75 linking [ <=> ] 6\r (no-eol) (esc)
75 linking [ <=> ] 6\r (no-eol) (esc)
76 updating [===========================================>] 1/1\r (no-eol) (esc)
76 updating [===========================================>] 1/1\r (no-eol) (esc)
77 \r (no-eol) (esc)
77 \r (no-eol) (esc)
78 updating to branch default
78 updating to branch default
79 cloning subrepo sub2 from $TESTTMP/sub2
79 cloning subrepo sub2 from $TESTTMP/sub2
80 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
81 $ hg add -R main
81 $ hg add -R main
82 adding main/.hgsub
82 adding main/.hgsub
83 adding main/main
83 adding main/main
84 $ hg commit -R main -m "main import"
84 $ hg commit -R main -m "main import"
85
85
86 #if serve
86 #if serve
87
87
88 Unfortunately, subrepos not at their nominal location cannot be cloned. But
88 Unfortunately, subrepos not at their nominal location cannot be cloned. But
89 they are still served from their location within the local repository. The only
89 they are still served from their location within the local repository. The only
90 reason why 'main' can be cloned via the filesystem is because 'sub1' and 'sub2'
90 reason why 'main' can be cloned via the filesystem is because 'sub1' and 'sub2'
91 are also available as siblings of 'main'.
91 are also available as siblings of 'main'.
92
92
93 $ hg serve -R main --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
93 $ hg serve -R main --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
94 adding = $TESTTMP/main
94 adding = $TESTTMP/main
95 adding sub1 = $TESTTMP/main/sub1
95 adding sub1 = $TESTTMP/main/sub1
96 adding sub1/sub2 = $TESTTMP/main/sub1/sub2
96 adding sub1/sub2 = $TESTTMP/main/sub1/sub2
97 listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
97 listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
98 adding = $TESTTMP/main (?)
98 adding = $TESTTMP/main (?)
99 adding sub1 = $TESTTMP/main/sub1 (?)
99 adding sub1 = $TESTTMP/main/sub1 (?)
100 adding sub1/sub2 = $TESTTMP/main/sub1/sub2 (?)
100 adding sub1/sub2 = $TESTTMP/main/sub1/sub2 (?)
101 $ cat hg1.pid >> $DAEMON_PIDS
101 $ cat hg1.pid >> $DAEMON_PIDS
102
102
103 $ hg clone http://localhost:$HGPORT httpclone --config progress.disable=True
103 $ hg clone http://localhost:$HGPORT httpclone --config progress.disable=True
104 requesting all changes
104 requesting all changes
105 adding changesets
105 adding changesets
106 adding manifests
106 adding manifests
107 adding file changes
107 adding file changes
108 added 1 changesets with 3 changes to 3 files
108 added 1 changesets with 3 changes to 3 files
109 new changesets 7f491f53a367
109 new changesets 7f491f53a367
110 updating to branch default
110 updating to branch default
111 abort: HTTP Error 404: Not Found
111 abort: HTTP Error 404: Not Found
112 [255]
112 [255]
113
113
114 $ cat access.log
114 $ cat access.log
115 * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
115 * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
116 * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
116 * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
117 * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
117 * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
118 * "GET /../sub1?cmd=capabilities HTTP/1.1" 404 - (glob)
118 * "GET /../sub1?cmd=capabilities HTTP/1.1" 404 - (glob)
119 $ cat error.log
119 $ cat error.log
120
120
121 $ killdaemons.py
121 $ killdaemons.py
122 $ rm hg1.pid error.log access.log
122 $ rm hg1.pid error.log access.log
123 #endif
123 #endif
124
124
125 Cleaning both repositories, just as a clone -U
125 Cleaning both repositories, just as a clone -U
126
126
127 $ hg up -C -R sub2 null
127 $ hg up -C -R sub2 null
128 \r (no-eol) (esc)
128 \r (no-eol) (esc)
129 updating [===========================================>] 1/1\r (no-eol) (esc)
129 updating [===========================================>] 1/1\r (no-eol) (esc)
130 \r (no-eol) (esc)
130 \r (no-eol) (esc)
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
132 $ hg up -C -R sub1 null
132 $ hg up -C -R sub1 null
133 \r (no-eol) (esc)
133 \r (no-eol) (esc)
134 updating [===========================================>] 1/1\r (no-eol) (esc)
134 updating [===========================================>] 1/1\r (no-eol) (esc)
135 \r (no-eol) (esc)
135 \r (no-eol) (esc)
136 \r (no-eol) (esc)
136 \r (no-eol) (esc)
137 updating [===========================================>] 3/3\r (no-eol) (esc)
137 updating [===========================================>] 3/3\r (no-eol) (esc)
138 \r (no-eol) (esc)
138 \r (no-eol) (esc)
139 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
140 $ hg up -C -R main null
140 $ hg up -C -R main null
141 \r (no-eol) (esc)
141 \r (no-eol) (esc)
142 updating [===========================================>] 1/1\r (no-eol) (esc)
142 updating [===========================================>] 1/1\r (no-eol) (esc)
143 \r (no-eol) (esc)
143 \r (no-eol) (esc)
144 \r (no-eol) (esc)
144 \r (no-eol) (esc)
145 updating [===========================================>] 3/3\r (no-eol) (esc)
145 updating [===========================================>] 3/3\r (no-eol) (esc)
146 \r (no-eol) (esc)
146 \r (no-eol) (esc)
147 \r (no-eol) (esc)
147 \r (no-eol) (esc)
148 updating [===========================================>] 3/3\r (no-eol) (esc)
148 updating [===========================================>] 3/3\r (no-eol) (esc)
149 \r (no-eol) (esc)
149 \r (no-eol) (esc)
150 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
150 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
151 $ rm -rf main/sub1
151 $ rm -rf main/sub1
152 $ rm -rf sub1/sub2
152 $ rm -rf sub1/sub2
153
153
154 Clone main
154 Clone main
155
155
156 $ hg --config extensions.largefiles= clone main cloned
156 $ hg --config extensions.largefiles= clone main cloned
157 \r (no-eol) (esc)
157 \r (no-eol) (esc)
158 linking [ <=> ] 1\r (no-eol) (esc)
158 linking [ <=> ] 1\r (no-eol) (esc)
159 linking [ <=> ] 2\r (no-eol) (esc)
159 linking [ <=> ] 2\r (no-eol) (esc)
160 linking [ <=> ] 3\r (no-eol) (esc)
160 linking [ <=> ] 3\r (no-eol) (esc)
161 linking [ <=> ] 4\r (no-eol) (esc)
161 linking [ <=> ] 4\r (no-eol) (esc)
162 linking [ <=> ] 5\r (no-eol) (esc)
162 linking [ <=> ] 5\r (no-eol) (esc)
163 linking [ <=> ] 6\r (no-eol) (esc)
163 linking [ <=> ] 6\r (no-eol) (esc)
164 linking [ <=> ] 7\r (no-eol) (esc)
164 linking [ <=> ] 7\r (no-eol) (esc)
165 linking [ <=> ] 8\r (no-eol) (esc)
165 linking [ <=> ] 8\r (no-eol) (esc)
166 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
166 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
167 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
167 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
168 \r (no-eol) (esc)
168 \r (no-eol) (esc)
169 \r (no-eol) (esc)
169 \r (no-eol) (esc)
170 updating [===========================================>] 3/3\r (no-eol) (esc)
170 updating [===========================================>] 3/3\r (no-eol) (esc)
171 \r (no-eol) (esc)
171 \r (no-eol) (esc)
172 \r (no-eol) (esc)
172 \r (no-eol) (esc)
173 linking [ <=> ] 1\r (no-eol) (esc)
173 linking [ <=> ] 1\r (no-eol) (esc)
174 linking [ <=> ] 2\r (no-eol) (esc)
174 linking [ <=> ] 2\r (no-eol) (esc)
175 linking [ <=> ] 3\r (no-eol) (esc)
175 linking [ <=> ] 3\r (no-eol) (esc)
176 linking [ <=> ] 4\r (no-eol) (esc)
176 linking [ <=> ] 4\r (no-eol) (esc)
177 linking [ <=> ] 5\r (no-eol) (esc)
177 linking [ <=> ] 5\r (no-eol) (esc)
178 linking [ <=> ] 6\r (no-eol) (esc)
178 linking [ <=> ] 6\r (no-eol) (esc)
179 linking [ <=> ] 7\r (no-eol) (esc)
179 linking [ <=> ] 7\r (no-eol) (esc)
180 linking [ <=> ] 8\r (no-eol) (esc)
180 linking [ <=> ] 8\r (no-eol) (esc)
181 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
181 linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !)
182 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
182 linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !)
183 updating [===========================================>] 3/3\r (no-eol) (esc)
183 updating [===========================================>] 3/3\r (no-eol) (esc)
184 \r (no-eol) (esc)
184 \r (no-eol) (esc)
185 \r (no-eol) (esc)
185 \r (no-eol) (esc)
186 linking [ <=> ] 1\r (no-eol) (esc) (no-reposimplestore !)
186 linking [ <=> ] 1\r (no-eol) (esc) (reporevlogstore !)
187 linking [ <=> ] 2\r (no-eol) (esc) (no-reposimplestore !)
187 linking [ <=> ] 2\r (no-eol) (esc) (reporevlogstore !)
188 linking [ <=> ] 3\r (no-eol) (esc) (no-reposimplestore !)
188 linking [ <=> ] 3\r (no-eol) (esc) (reporevlogstore !)
189 linking [ <=> ] 4\r (no-eol) (esc) (no-reposimplestore !)
189 linking [ <=> ] 4\r (no-eol) (esc) (reporevlogstore !)
190 linking [ <=> ] 5\r (no-eol) (esc) (no-reposimplestore !)
190 linking [ <=> ] 5\r (no-eol) (esc) (reporevlogstore !)
191 linking [ <=> ] 6\r (no-eol) (esc) (no-reposimplestore !)
191 linking [ <=> ] 6\r (no-eol) (esc) (reporevlogstore !)
192 linking [ <=> ] 1\r (no-eol) (esc) (reposimplestore !)
192 linking [ <=> ] 1\r (no-eol) (esc) (reposimplestore !)
193 linking [ <=> ] 2\r (no-eol) (esc) (reposimplestore !)
193 linking [ <=> ] 2\r (no-eol) (esc) (reposimplestore !)
194 linking [ <=> ] 3\r (no-eol) (esc) (reposimplestore !)
194 linking [ <=> ] 3\r (no-eol) (esc) (reposimplestore !)
195 linking [ <=> ] 4\r (no-eol) (esc) (reposimplestore !)
195 linking [ <=> ] 4\r (no-eol) (esc) (reposimplestore !)
196 linking [ <=> ] 5\r (no-eol) (esc) (reposimplestore !)
196 linking [ <=> ] 5\r (no-eol) (esc) (reposimplestore !)
197 linking [ <=> ] 6\r (no-eol) (esc) (reposimplestore !)
197 linking [ <=> ] 6\r (no-eol) (esc) (reposimplestore !)
198 updating [===========================================>] 1/1\r (no-eol) (esc)
198 updating [===========================================>] 1/1\r (no-eol) (esc)
199 \r (no-eol) (esc)
199 \r (no-eol) (esc)
200 updating to branch default
200 updating to branch default
201 cloning subrepo sub1 from $TESTTMP/sub1
201 cloning subrepo sub1 from $TESTTMP/sub1
202 cloning subrepo sub1/sub2 from $TESTTMP/sub2
202 cloning subrepo sub1/sub2 from $TESTTMP/sub2
203 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
203 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
204
204
205 Largefiles is NOT enabled in the clone if the source repo doesn't require it
205 Largefiles is NOT enabled in the clone if the source repo doesn't require it
206 $ cat cloned/.hg/hgrc
206 $ cat cloned/.hg/hgrc
207 # example repository config (see 'hg help config' for more info)
207 # example repository config (see 'hg help config' for more info)
208 [paths]
208 [paths]
209 default = $TESTTMP/main
209 default = $TESTTMP/main
210
210
211 # path aliases to other clones of this repo in URLs or filesystem paths
211 # path aliases to other clones of this repo in URLs or filesystem paths
212 # (see 'hg help config.paths' for more info)
212 # (see 'hg help config.paths' for more info)
213 #
213 #
214 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
214 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
215 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
215 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
216 # my-clone = /home/jdoe/jdoes-clone
216 # my-clone = /home/jdoe/jdoes-clone
217
217
218 [ui]
218 [ui]
219 # name and email (local to this repository, optional), e.g.
219 # name and email (local to this repository, optional), e.g.
220 # username = Jane Doe <jdoe@example.com>
220 # username = Jane Doe <jdoe@example.com>
221
221
222 Checking cloned repo ids
222 Checking cloned repo ids
223
223
224 $ printf "cloned " ; hg id -R cloned
224 $ printf "cloned " ; hg id -R cloned
225 cloned 7f491f53a367 tip
225 cloned 7f491f53a367 tip
226 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
226 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
227 cloned/sub1 fc3b4ce2696f tip
227 cloned/sub1 fc3b4ce2696f tip
228 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
228 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
229 cloned/sub1/sub2 c57a0840e3ba tip
229 cloned/sub1/sub2 c57a0840e3ba tip
230
230
231 debugsub output for main and sub1
231 debugsub output for main and sub1
232
232
233 $ hg debugsub -R cloned
233 $ hg debugsub -R cloned
234 path sub1
234 path sub1
235 source ../sub1
235 source ../sub1
236 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
236 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
237 $ hg debugsub -R cloned/sub1
237 $ hg debugsub -R cloned/sub1
238 path sub2
238 path sub2
239 source ../sub2
239 source ../sub2
240 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
240 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
241
241
242 Modifying deeply nested 'sub2'
242 Modifying deeply nested 'sub2'
243
243
244 $ echo modified > cloned/sub1/sub2/sub2
244 $ echo modified > cloned/sub1/sub2/sub2
245 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
245 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
246 committing subrepository sub1
246 committing subrepository sub1
247 committing subrepository sub1/sub2
247 committing subrepository sub1/sub2
248
248
249 Checking modified node ids
249 Checking modified node ids
250
250
251 $ printf "cloned " ; hg id -R cloned
251 $ printf "cloned " ; hg id -R cloned
252 cloned ffe6649062fe tip
252 cloned ffe6649062fe tip
253 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
253 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
254 cloned/sub1 2ecb03bf44a9 tip
254 cloned/sub1 2ecb03bf44a9 tip
255 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
255 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
256 cloned/sub1/sub2 53dd3430bcaf tip
256 cloned/sub1/sub2 53dd3430bcaf tip
257
257
258 debugsub output for main and sub1
258 debugsub output for main and sub1
259
259
260 $ hg debugsub -R cloned
260 $ hg debugsub -R cloned
261 path sub1
261 path sub1
262 source ../sub1
262 source ../sub1
263 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
263 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
264 $ hg debugsub -R cloned/sub1
264 $ hg debugsub -R cloned/sub1
265 path sub2
265 path sub2
266 source ../sub2
266 source ../sub2
267 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
267 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
268
268
269 Check that deep archiving works
269 Check that deep archiving works
270
270
271 $ cd cloned
271 $ cd cloned
272 $ echo 'test' > sub1/sub2/test.txt
272 $ echo 'test' > sub1/sub2/test.txt
273 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
273 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
274 $ mkdir sub1/sub2/folder
274 $ mkdir sub1/sub2/folder
275 $ echo 'subfolder' > sub1/sub2/folder/test.txt
275 $ echo 'subfolder' > sub1/sub2/folder/test.txt
276 $ hg ci -ASm "add test.txt"
276 $ hg ci -ASm "add test.txt"
277 adding sub1/sub2/folder/test.txt
277 adding sub1/sub2/folder/test.txt
278 committing subrepository sub1
278 committing subrepository sub1
279 committing subrepository sub1/sub2
279 committing subrepository sub1/sub2
280
280
281 $ rm -r main
281 $ rm -r main
282 $ hg archive -S -qr 'wdir()' ../wdir
282 $ hg archive -S -qr 'wdir()' ../wdir
283 $ cat ../wdir/.hg_archival.txt
283 $ cat ../wdir/.hg_archival.txt
284 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
284 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
285 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
285 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
286 branch: default
286 branch: default
287 latesttag: null
287 latesttag: null
288 latesttagdistance: 4
288 latesttagdistance: 4
289 changessincelatesttag: 4
289 changessincelatesttag: 4
290 $ hg update -Cq .
290 $ hg update -Cq .
291
291
292 A deleted subrepo file is flagged as dirty, like the top level repo
292 A deleted subrepo file is flagged as dirty, like the top level repo
293
293
294 $ rm -r ../wdir sub1/sub2/folder/test.txt
294 $ rm -r ../wdir sub1/sub2/folder/test.txt
295 $ hg archive -S -qr 'wdir()' ../wdir
295 $ hg archive -S -qr 'wdir()' ../wdir
296 $ cat ../wdir/.hg_archival.txt
296 $ cat ../wdir/.hg_archival.txt
297 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
297 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
298 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
298 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
299 branch: default
299 branch: default
300 latesttag: null
300 latesttag: null
301 latesttagdistance: 4
301 latesttagdistance: 4
302 changessincelatesttag: 4
302 changessincelatesttag: 4
303 $ hg update -Cq .
303 $ hg update -Cq .
304 $ rm -r ../wdir
304 $ rm -r ../wdir
305
305
306 $ hg archive -S -qr 'wdir()' ../wdir \
306 $ hg archive -S -qr 'wdir()' ../wdir \
307 > --config 'experimental.archivemetatemplate=archived {node|short}\n'
307 > --config 'experimental.archivemetatemplate=archived {node|short}\n'
308 $ cat ../wdir/.hg_archival.txt
308 $ cat ../wdir/.hg_archival.txt
309 archived ffffffffffff
309 archived ffffffffffff
310 $ rm -r ../wdir
310 $ rm -r ../wdir
311
311
312 .. but first take a detour through some deep removal testing
312 .. but first take a detour through some deep removal testing
313
313
314 $ hg remove -S -I 're:.*.txt' .
314 $ hg remove -S -I 're:.*.txt' .
315 \r (no-eol) (esc)
315 \r (no-eol) (esc)
316 searching [==========================================>] 1/1\r (no-eol) (esc)
316 searching [==========================================>] 1/1\r (no-eol) (esc)
317 searching [==========================================>] 1/1\r (no-eol) (esc)
317 searching [==========================================>] 1/1\r (no-eol) (esc)
318 \r (no-eol) (esc)
318 \r (no-eol) (esc)
319 \r (no-eol) (esc)
319 \r (no-eol) (esc)
320 deleting [=====================> ] 1/2\r (no-eol) (esc)
320 deleting [=====================> ] 1/2\r (no-eol) (esc)
321 \r (no-eol) (esc)
321 \r (no-eol) (esc)
322 \r (no-eol) (esc)
322 \r (no-eol) (esc)
323 deleting [===========================================>] 2/2\r (no-eol) (esc)
323 deleting [===========================================>] 2/2\r (no-eol) (esc)
324 \r (no-eol) (esc)
324 \r (no-eol) (esc)
325 removing sub1/sub2/folder/test.txt
325 removing sub1/sub2/folder/test.txt
326 removing sub1/sub2/test.txt
326 removing sub1/sub2/test.txt
327 $ hg status -S
327 $ hg status -S
328 R sub1/sub2/folder/test.txt
328 R sub1/sub2/folder/test.txt
329 R sub1/sub2/test.txt
329 R sub1/sub2/test.txt
330 $ hg update -Cq
330 $ hg update -Cq
331 $ hg remove -I 're:.*.txt' sub1
331 $ hg remove -I 're:.*.txt' sub1
332 \r (no-eol) (esc)
332 \r (no-eol) (esc)
333 searching [==========================================>] 1/1\r (no-eol) (esc)
333 searching [==========================================>] 1/1\r (no-eol) (esc)
334 \r (no-eol) (esc)
334 \r (no-eol) (esc)
335 \r (no-eol) (esc)
335 \r (no-eol) (esc)
336 deleting [===========================================>] 1/1\r (no-eol) (esc)
336 deleting [===========================================>] 1/1\r (no-eol) (esc)
337 \r (no-eol) (esc)
337 \r (no-eol) (esc)
338 $ hg status -S
338 $ hg status -S
339 $ hg remove sub1/sub2/folder/test.txt
339 $ hg remove sub1/sub2/folder/test.txt
340 \r (no-eol) (esc)
340 \r (no-eol) (esc)
341 searching [==========================================>] 1/1\r (no-eol) (esc)
341 searching [==========================================>] 1/1\r (no-eol) (esc)
342 searching [==========================================>] 1/1\r (no-eol) (esc)
342 searching [==========================================>] 1/1\r (no-eol) (esc)
343 \r (no-eol) (esc)
343 \r (no-eol) (esc)
344 \r (no-eol) (esc)
344 \r (no-eol) (esc)
345 deleting [===========================================>] 1/1\r (no-eol) (esc)
345 deleting [===========================================>] 1/1\r (no-eol) (esc)
346 \r (no-eol) (esc)
346 \r (no-eol) (esc)
347 \r (no-eol) (esc)
347 \r (no-eol) (esc)
348 deleting [===========================================>] 1/1\r (no-eol) (esc)
348 deleting [===========================================>] 1/1\r (no-eol) (esc)
349 \r (no-eol) (esc)
349 \r (no-eol) (esc)
350 \r (no-eol) (esc)
350 \r (no-eol) (esc)
351 deleting [===========================================>] 1/1\r (no-eol) (esc)
351 deleting [===========================================>] 1/1\r (no-eol) (esc)
352 \r (no-eol) (esc)
352 \r (no-eol) (esc)
353 $ hg remove sub1/.hgsubstate
353 $ hg remove sub1/.hgsubstate
354 \r (no-eol) (esc)
354 \r (no-eol) (esc)
355 searching [==========================================>] 1/1\r (no-eol) (esc)
355 searching [==========================================>] 1/1\r (no-eol) (esc)
356 \r (no-eol) (esc)
356 \r (no-eol) (esc)
357 \r (no-eol) (esc)
357 \r (no-eol) (esc)
358 deleting [===========================================>] 1/1\r (no-eol) (esc)
358 deleting [===========================================>] 1/1\r (no-eol) (esc)
359 \r (no-eol) (esc)
359 \r (no-eol) (esc)
360 \r (no-eol) (esc)
360 \r (no-eol) (esc)
361 deleting [===========================================>] 1/1\r (no-eol) (esc)
361 deleting [===========================================>] 1/1\r (no-eol) (esc)
362 \r (no-eol) (esc)
362 \r (no-eol) (esc)
363 $ mv sub1/.hgsub sub1/x.hgsub
363 $ mv sub1/.hgsub sub1/x.hgsub
364 $ hg status -S
364 $ hg status -S
365 warning: subrepo spec file 'sub1/.hgsub' not found
365 warning: subrepo spec file 'sub1/.hgsub' not found
366 R sub1/.hgsubstate
366 R sub1/.hgsubstate
367 R sub1/sub2/folder/test.txt
367 R sub1/sub2/folder/test.txt
368 ! sub1/.hgsub
368 ! sub1/.hgsub
369 ? sub1/x.hgsub
369 ? sub1/x.hgsub
370 $ mv sub1/x.hgsub sub1/.hgsub
370 $ mv sub1/x.hgsub sub1/.hgsub
371 $ hg update -Cq
371 $ hg update -Cq
372 $ touch sub1/foo
372 $ touch sub1/foo
373 $ hg forget sub1/sub2/folder/test.txt
373 $ hg forget sub1/sub2/folder/test.txt
374 $ rm sub1/sub2/test.txt
374 $ rm sub1/sub2/test.txt
375
375
376 Test relative path printing + subrepos
376 Test relative path printing + subrepos
377 $ mkdir -p foo/bar
377 $ mkdir -p foo/bar
378 $ cd foo
378 $ cd foo
379 $ touch bar/abc
379 $ touch bar/abc
380 $ hg addremove -S ..
380 $ hg addremove -S ..
381 \r (no-eol) (esc)
381 \r (no-eol) (esc)
382 searching for exact renames [ ] 0/1\r (no-eol) (esc)
382 searching for exact renames [ ] 0/1\r (no-eol) (esc)
383 \r (no-eol) (esc)
383 \r (no-eol) (esc)
384 adding ../sub1/sub2/folder/test.txt
384 adding ../sub1/sub2/folder/test.txt
385 removing ../sub1/sub2/test.txt
385 removing ../sub1/sub2/test.txt
386 adding ../sub1/foo
386 adding ../sub1/foo
387 adding bar/abc
387 adding bar/abc
388 $ cd ..
388 $ cd ..
389 $ hg status -S
389 $ hg status -S
390 A foo/bar/abc
390 A foo/bar/abc
391 A sub1/foo
391 A sub1/foo
392 R sub1/sub2/test.txt
392 R sub1/sub2/test.txt
393
393
394 Archive wdir() with subrepos
394 Archive wdir() with subrepos
395 $ hg rm main
395 $ hg rm main
396 \r (no-eol) (esc)
396 \r (no-eol) (esc)
397 deleting [===========================================>] 1/1\r (no-eol) (esc)
397 deleting [===========================================>] 1/1\r (no-eol) (esc)
398 \r (no-eol) (esc)
398 \r (no-eol) (esc)
399 $ hg archive -S -r 'wdir()' ../wdir
399 $ hg archive -S -r 'wdir()' ../wdir
400 \r (no-eol) (esc)
400 \r (no-eol) (esc)
401 archiving [ ] 0/3\r (no-eol) (esc)
401 archiving [ ] 0/3\r (no-eol) (esc)
402 archiving [=============> ] 1/3\r (no-eol) (esc)
402 archiving [=============> ] 1/3\r (no-eol) (esc)
403 archiving [===========================> ] 2/3\r (no-eol) (esc)
403 archiving [===========================> ] 2/3\r (no-eol) (esc)
404 archiving [==========================================>] 3/3\r (no-eol) (esc)
404 archiving [==========================================>] 3/3\r (no-eol) (esc)
405 \r (no-eol) (esc)
405 \r (no-eol) (esc)
406 \r (no-eol) (esc)
406 \r (no-eol) (esc)
407 archiving (sub1) [ ] 0/4\r (no-eol) (esc)
407 archiving (sub1) [ ] 0/4\r (no-eol) (esc)
408 archiving (sub1) [========> ] 1/4\r (no-eol) (esc)
408 archiving (sub1) [========> ] 1/4\r (no-eol) (esc)
409 archiving (sub1) [=================> ] 2/4\r (no-eol) (esc)
409 archiving (sub1) [=================> ] 2/4\r (no-eol) (esc)
410 archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc)
410 archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc)
411 archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
411 archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
412 \r (no-eol) (esc)
412 \r (no-eol) (esc)
413 \r (no-eol) (esc)
413 \r (no-eol) (esc)
414 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
414 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
415 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
415 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
416 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
416 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
417 \r (no-eol) (esc)
417 \r (no-eol) (esc)
418 $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
418 $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
419 Only in ../wdir: .hg_archival.txt
419 Only in ../wdir: .hg_archival.txt
420
420
421 $ find ../wdir -type f | sort
421 $ find ../wdir -type f | sort
422 ../wdir/.hg_archival.txt
422 ../wdir/.hg_archival.txt
423 ../wdir/.hgsub
423 ../wdir/.hgsub
424 ../wdir/.hgsubstate
424 ../wdir/.hgsubstate
425 ../wdir/foo/bar/abc
425 ../wdir/foo/bar/abc
426 ../wdir/sub1/.hgsub
426 ../wdir/sub1/.hgsub
427 ../wdir/sub1/.hgsubstate
427 ../wdir/sub1/.hgsubstate
428 ../wdir/sub1/foo
428 ../wdir/sub1/foo
429 ../wdir/sub1/sub1
429 ../wdir/sub1/sub1
430 ../wdir/sub1/sub2/folder/test.txt
430 ../wdir/sub1/sub2/folder/test.txt
431 ../wdir/sub1/sub2/sub2
431 ../wdir/sub1/sub2/sub2
432
432
433 $ cat ../wdir/.hg_archival.txt
433 $ cat ../wdir/.hg_archival.txt
434 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
434 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
435 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
435 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
436 branch: default
436 branch: default
437 latesttag: null
437 latesttag: null
438 latesttagdistance: 4
438 latesttagdistance: 4
439 changessincelatesttag: 4
439 changessincelatesttag: 4
440
440
441 Attempting to archive 'wdir()' with a missing file is handled gracefully
441 Attempting to archive 'wdir()' with a missing file is handled gracefully
442 $ rm sub1/sub1
442 $ rm sub1/sub1
443 $ rm -r ../wdir
443 $ rm -r ../wdir
444 $ hg archive -v -S -r 'wdir()' ../wdir
444 $ hg archive -v -S -r 'wdir()' ../wdir
445 \r (no-eol) (esc)
445 \r (no-eol) (esc)
446 archiving [ ] 0/3\r (no-eol) (esc)
446 archiving [ ] 0/3\r (no-eol) (esc)
447 archiving [=============> ] 1/3\r (no-eol) (esc)
447 archiving [=============> ] 1/3\r (no-eol) (esc)
448 archiving [===========================> ] 2/3\r (no-eol) (esc)
448 archiving [===========================> ] 2/3\r (no-eol) (esc)
449 archiving [==========================================>] 3/3\r (no-eol) (esc)
449 archiving [==========================================>] 3/3\r (no-eol) (esc)
450 \r (no-eol) (esc)
450 \r (no-eol) (esc)
451 \r (no-eol) (esc)
451 \r (no-eol) (esc)
452 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
452 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
453 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
453 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
454 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
454 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
455 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
455 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
456 \r (no-eol) (esc)
456 \r (no-eol) (esc)
457 \r (no-eol) (esc)
457 \r (no-eol) (esc)
458 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
458 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
459 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
459 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
460 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
460 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
461 \r (no-eol) (esc)
461 \r (no-eol) (esc)
462 $ find ../wdir -type f | sort
462 $ find ../wdir -type f | sort
463 ../wdir/.hg_archival.txt
463 ../wdir/.hg_archival.txt
464 ../wdir/.hgsub
464 ../wdir/.hgsub
465 ../wdir/.hgsubstate
465 ../wdir/.hgsubstate
466 ../wdir/foo/bar/abc
466 ../wdir/foo/bar/abc
467 ../wdir/sub1/.hgsub
467 ../wdir/sub1/.hgsub
468 ../wdir/sub1/.hgsubstate
468 ../wdir/sub1/.hgsubstate
469 ../wdir/sub1/foo
469 ../wdir/sub1/foo
470 ../wdir/sub1/sub2/folder/test.txt
470 ../wdir/sub1/sub2/folder/test.txt
471 ../wdir/sub1/sub2/sub2
471 ../wdir/sub1/sub2/sub2
472
472
473 Continue relative path printing + subrepos
473 Continue relative path printing + subrepos
474 $ hg update -Cq
474 $ hg update -Cq
475 $ rm -r ../wdir
475 $ rm -r ../wdir
476 $ hg archive -S -r 'wdir()' ../wdir
476 $ hg archive -S -r 'wdir()' ../wdir
477 \r (no-eol) (esc)
477 \r (no-eol) (esc)
478 archiving [ ] 0/3\r (no-eol) (esc)
478 archiving [ ] 0/3\r (no-eol) (esc)
479 archiving [=============> ] 1/3\r (no-eol) (esc)
479 archiving [=============> ] 1/3\r (no-eol) (esc)
480 archiving [===========================> ] 2/3\r (no-eol) (esc)
480 archiving [===========================> ] 2/3\r (no-eol) (esc)
481 archiving [==========================================>] 3/3\r (no-eol) (esc)
481 archiving [==========================================>] 3/3\r (no-eol) (esc)
482 \r (no-eol) (esc)
482 \r (no-eol) (esc)
483 \r (no-eol) (esc)
483 \r (no-eol) (esc)
484 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
484 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
485 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
485 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
486 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
486 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
487 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
487 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
488 \r (no-eol) (esc)
488 \r (no-eol) (esc)
489 \r (no-eol) (esc)
489 \r (no-eol) (esc)
490 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
490 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
491 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
491 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
492 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
492 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
493 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
493 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
494 \r (no-eol) (esc)
494 \r (no-eol) (esc)
495 $ cat ../wdir/.hg_archival.txt
495 $ cat ../wdir/.hg_archival.txt
496 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
496 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
497 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
497 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
498 branch: default
498 branch: default
499 latesttag: null
499 latesttag: null
500 latesttagdistance: 4
500 latesttagdistance: 4
501 changessincelatesttag: 4
501 changessincelatesttag: 4
502
502
503 $ touch sub1/sub2/folder/bar
503 $ touch sub1/sub2/folder/bar
504 $ hg addremove sub1/sub2
504 $ hg addremove sub1/sub2
505 adding sub1/sub2/folder/bar
505 adding sub1/sub2/folder/bar
506 $ hg status -S
506 $ hg status -S
507 A sub1/sub2/folder/bar
507 A sub1/sub2/folder/bar
508 ? foo/bar/abc
508 ? foo/bar/abc
509 ? sub1/foo
509 ? sub1/foo
510 $ hg update -Cq
510 $ hg update -Cq
511 $ hg addremove sub1
511 $ hg addremove sub1
512 adding sub1/sub2/folder/bar
512 adding sub1/sub2/folder/bar
513 adding sub1/foo
513 adding sub1/foo
514 $ hg update -Cq
514 $ hg update -Cq
515 $ rm sub1/sub2/folder/test.txt
515 $ rm sub1/sub2/folder/test.txt
516 $ rm sub1/sub2/test.txt
516 $ rm sub1/sub2/test.txt
517 $ hg ci -ASm "remove test.txt"
517 $ hg ci -ASm "remove test.txt"
518 adding sub1/sub2/folder/bar
518 adding sub1/sub2/folder/bar
519 removing sub1/sub2/folder/test.txt
519 removing sub1/sub2/folder/test.txt
520 removing sub1/sub2/test.txt
520 removing sub1/sub2/test.txt
521 adding sub1/foo
521 adding sub1/foo
522 adding foo/bar/abc
522 adding foo/bar/abc
523 committing subrepository sub1
523 committing subrepository sub1
524 committing subrepository sub1/sub2
524 committing subrepository sub1/sub2
525
525
526 $ hg forget sub1/sub2/sub2
526 $ hg forget sub1/sub2/sub2
527 $ echo x > sub1/sub2/x.txt
527 $ echo x > sub1/sub2/x.txt
528 $ hg add sub1/sub2/x.txt
528 $ hg add sub1/sub2/x.txt
529
529
530 Files sees uncommitted adds and removes in subrepos
530 Files sees uncommitted adds and removes in subrepos
531 $ hg files -S
531 $ hg files -S
532 .hgsub
532 .hgsub
533 .hgsubstate
533 .hgsubstate
534 foo/bar/abc
534 foo/bar/abc
535 main
535 main
536 sub1/.hgsub
536 sub1/.hgsub
537 sub1/.hgsubstate
537 sub1/.hgsubstate
538 sub1/foo
538 sub1/foo
539 sub1/sub1
539 sub1/sub1
540 sub1/sub2/folder/bar
540 sub1/sub2/folder/bar
541 sub1/sub2/x.txt
541 sub1/sub2/x.txt
542
542
543 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
543 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
544 .hgsub
544 .hgsub
545 .hgsubstate
545 .hgsubstate
546 foo/bar/abc
546 foo/bar/abc
547 main
547 main
548 sub1/.hgsub
548 sub1/.hgsub
549 sub1/.hgsubstate
549 sub1/.hgsubstate
550 sub1/foo
550 sub1/foo
551 sub1/sub1
551 sub1/sub1
552 sub1/sub2/folder/bar
552 sub1/sub2/folder/bar
553 sub1/sub2/x.txt
553 sub1/sub2/x.txt
554
554
555 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
555 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
556 .hgsub
556 .hgsub
557 .hgsubstate
557 .hgsubstate
558 main
558 main
559 sub1/.hgsub
559 sub1/.hgsub
560 sub1/.hgsubstate
560 sub1/.hgsubstate
561 sub1/sub1
561 sub1/sub1
562 sub1/sub2/folder/test.txt
562 sub1/sub2/folder/test.txt
563 sub1/sub2/sub2
563 sub1/sub2/sub2
564 sub1/sub2/test.txt
564 sub1/sub2/test.txt
565
565
566 $ hg files sub1
566 $ hg files sub1
567 sub1/.hgsub
567 sub1/.hgsub
568 sub1/.hgsubstate
568 sub1/.hgsubstate
569 sub1/foo
569 sub1/foo
570 sub1/sub1
570 sub1/sub1
571 sub1/sub2/folder/bar
571 sub1/sub2/folder/bar
572 sub1/sub2/x.txt
572 sub1/sub2/x.txt
573
573
574 $ hg files sub1/sub2
574 $ hg files sub1/sub2
575 sub1/sub2/folder/bar
575 sub1/sub2/folder/bar
576 sub1/sub2/x.txt
576 sub1/sub2/x.txt
577
577
578 $ hg files
578 $ hg files
579 .hgsub
579 .hgsub
580 .hgsubstate
580 .hgsubstate
581 foo/bar/abc
581 foo/bar/abc
582 main
582 main
583
583
584 $ hg files -S -r '.^' sub1/sub2/folder
584 $ hg files -S -r '.^' sub1/sub2/folder
585 sub1/sub2/folder/test.txt
585 sub1/sub2/folder/test.txt
586
586
587 $ hg files -S -r '.^' sub1/sub2/missing
587 $ hg files -S -r '.^' sub1/sub2/missing
588 sub1/sub2/missing: no such file in rev 78026e779ea6
588 sub1/sub2/missing: no such file in rev 78026e779ea6
589 [1]
589 [1]
590
590
591 $ hg files -r '.^' sub1/
591 $ hg files -r '.^' sub1/
592 sub1/.hgsub
592 sub1/.hgsub
593 sub1/.hgsubstate
593 sub1/.hgsubstate
594 sub1/sub1
594 sub1/sub1
595 sub1/sub2/folder/test.txt
595 sub1/sub2/folder/test.txt
596 sub1/sub2/sub2
596 sub1/sub2/sub2
597 sub1/sub2/test.txt
597 sub1/sub2/test.txt
598
598
599 $ hg files -r '.^' sub1/sub2
599 $ hg files -r '.^' sub1/sub2
600 sub1/sub2/folder/test.txt
600 sub1/sub2/folder/test.txt
601 sub1/sub2/sub2
601 sub1/sub2/sub2
602 sub1/sub2/test.txt
602 sub1/sub2/test.txt
603
603
604 $ hg rollback -q
604 $ hg rollback -q
605 $ hg up -Cq
605 $ hg up -Cq
606
606
607 $ hg --config extensions.largefiles=! archive -S ../archive_all
607 $ hg --config extensions.largefiles=! archive -S ../archive_all
608 \r (no-eol) (esc)
608 \r (no-eol) (esc)
609 archiving [ ] 0/3\r (no-eol) (esc)
609 archiving [ ] 0/3\r (no-eol) (esc)
610 archiving [=============> ] 1/3\r (no-eol) (esc)
610 archiving [=============> ] 1/3\r (no-eol) (esc)
611 archiving [===========================> ] 2/3\r (no-eol) (esc)
611 archiving [===========================> ] 2/3\r (no-eol) (esc)
612 archiving [==========================================>] 3/3\r (no-eol) (esc)
612 archiving [==========================================>] 3/3\r (no-eol) (esc)
613 \r (no-eol) (esc)
613 \r (no-eol) (esc)
614 \r (no-eol) (esc)
614 \r (no-eol) (esc)
615 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
615 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
616 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
616 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
617 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
617 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
618 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
618 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
619 \r (no-eol) (esc)
619 \r (no-eol) (esc)
620 \r (no-eol) (esc)
620 \r (no-eol) (esc)
621 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
621 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
622 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
622 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
623 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
623 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
624 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
624 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
625 \r (no-eol) (esc)
625 \r (no-eol) (esc)
626 $ find ../archive_all | sort
626 $ find ../archive_all | sort
627 ../archive_all
627 ../archive_all
628 ../archive_all/.hg_archival.txt
628 ../archive_all/.hg_archival.txt
629 ../archive_all/.hgsub
629 ../archive_all/.hgsub
630 ../archive_all/.hgsubstate
630 ../archive_all/.hgsubstate
631 ../archive_all/main
631 ../archive_all/main
632 ../archive_all/sub1
632 ../archive_all/sub1
633 ../archive_all/sub1/.hgsub
633 ../archive_all/sub1/.hgsub
634 ../archive_all/sub1/.hgsubstate
634 ../archive_all/sub1/.hgsubstate
635 ../archive_all/sub1/sub1
635 ../archive_all/sub1/sub1
636 ../archive_all/sub1/sub2
636 ../archive_all/sub1/sub2
637 ../archive_all/sub1/sub2/folder
637 ../archive_all/sub1/sub2/folder
638 ../archive_all/sub1/sub2/folder/test.txt
638 ../archive_all/sub1/sub2/folder/test.txt
639 ../archive_all/sub1/sub2/sub2
639 ../archive_all/sub1/sub2/sub2
640 ../archive_all/sub1/sub2/test.txt
640 ../archive_all/sub1/sub2/test.txt
641
641
642 Check that archive -X works in deep subrepos
642 Check that archive -X works in deep subrepos
643
643
644 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
644 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
645 \r (no-eol) (esc)
645 \r (no-eol) (esc)
646 archiving [ ] 0/3\r (no-eol) (esc)
646 archiving [ ] 0/3\r (no-eol) (esc)
647 archiving [=============> ] 1/3\r (no-eol) (esc)
647 archiving [=============> ] 1/3\r (no-eol) (esc)
648 archiving [===========================> ] 2/3\r (no-eol) (esc)
648 archiving [===========================> ] 2/3\r (no-eol) (esc)
649 archiving [==========================================>] 3/3\r (no-eol) (esc)
649 archiving [==========================================>] 3/3\r (no-eol) (esc)
650 \r (no-eol) (esc)
650 \r (no-eol) (esc)
651 \r (no-eol) (esc)
651 \r (no-eol) (esc)
652 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
652 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
653 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
653 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
654 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
654 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
655 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
655 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
656 \r (no-eol) (esc)
656 \r (no-eol) (esc)
657 \r (no-eol) (esc)
657 \r (no-eol) (esc)
658 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
658 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
659 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
659 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
660 \r (no-eol) (esc)
660 \r (no-eol) (esc)
661 $ find ../archive_exclude | sort
661 $ find ../archive_exclude | sort
662 ../archive_exclude
662 ../archive_exclude
663 ../archive_exclude/.hg_archival.txt
663 ../archive_exclude/.hg_archival.txt
664 ../archive_exclude/.hgsub
664 ../archive_exclude/.hgsub
665 ../archive_exclude/.hgsubstate
665 ../archive_exclude/.hgsubstate
666 ../archive_exclude/main
666 ../archive_exclude/main
667 ../archive_exclude/sub1
667 ../archive_exclude/sub1
668 ../archive_exclude/sub1/.hgsub
668 ../archive_exclude/sub1/.hgsub
669 ../archive_exclude/sub1/.hgsubstate
669 ../archive_exclude/sub1/.hgsubstate
670 ../archive_exclude/sub1/sub1
670 ../archive_exclude/sub1/sub1
671 ../archive_exclude/sub1/sub2
671 ../archive_exclude/sub1/sub2
672 ../archive_exclude/sub1/sub2/sub2
672 ../archive_exclude/sub1/sub2/sub2
673
673
674 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
674 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
675 \r (no-eol) (esc)
675 \r (no-eol) (esc)
676 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
676 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
677 \r (no-eol) (esc)
677 \r (no-eol) (esc)
678 \r (no-eol) (esc)
678 \r (no-eol) (esc)
679 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
679 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
680 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
680 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
681 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
681 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
682 \r (no-eol) (esc)
682 \r (no-eol) (esc)
683 $ find ../archive_include | sort
683 $ find ../archive_include | sort
684 ../archive_include
684 ../archive_include
685 ../archive_include/sub1
685 ../archive_include/sub1
686 ../archive_include/sub1/sub2
686 ../archive_include/sub1/sub2
687 ../archive_include/sub1/sub2/folder
687 ../archive_include/sub1/sub2/folder
688 ../archive_include/sub1/sub2/folder/test.txt
688 ../archive_include/sub1/sub2/folder/test.txt
689 ../archive_include/sub1/sub2/test.txt
689 ../archive_include/sub1/sub2/test.txt
690
690
691 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
691 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
692 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
692 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
693 subrepos are archived properly.
693 subrepos are archived properly.
694 Note that add --large through a subrepo currently adds the file as a normal file
694 Note that add --large through a subrepo currently adds the file as a normal file
695
695
696 $ echo "large" > sub1/sub2/large.bin
696 $ echo "large" > sub1/sub2/large.bin
697 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
697 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
698 $ echo "large" > large.bin
698 $ echo "large" > large.bin
699 $ hg --config extensions.largefiles= add --large large.bin
699 $ hg --config extensions.largefiles= add --large large.bin
700 $ hg --config extensions.largefiles= ci -S -m "add large files"
700 $ hg --config extensions.largefiles= ci -S -m "add large files"
701 committing subrepository sub1
701 committing subrepository sub1
702 committing subrepository sub1/sub2
702 committing subrepository sub1/sub2
703
703
704 $ hg --config extensions.largefiles= archive -S ../archive_lf
704 $ hg --config extensions.largefiles= archive -S ../archive_lf
705 $ find ../archive_lf | sort
705 $ find ../archive_lf | sort
706 ../archive_lf
706 ../archive_lf
707 ../archive_lf/.hg_archival.txt
707 ../archive_lf/.hg_archival.txt
708 ../archive_lf/.hgsub
708 ../archive_lf/.hgsub
709 ../archive_lf/.hgsubstate
709 ../archive_lf/.hgsubstate
710 ../archive_lf/large.bin
710 ../archive_lf/large.bin
711 ../archive_lf/main
711 ../archive_lf/main
712 ../archive_lf/sub1
712 ../archive_lf/sub1
713 ../archive_lf/sub1/.hgsub
713 ../archive_lf/sub1/.hgsub
714 ../archive_lf/sub1/.hgsubstate
714 ../archive_lf/sub1/.hgsubstate
715 ../archive_lf/sub1/sub1
715 ../archive_lf/sub1/sub1
716 ../archive_lf/sub1/sub2
716 ../archive_lf/sub1/sub2
717 ../archive_lf/sub1/sub2/folder
717 ../archive_lf/sub1/sub2/folder
718 ../archive_lf/sub1/sub2/folder/test.txt
718 ../archive_lf/sub1/sub2/folder/test.txt
719 ../archive_lf/sub1/sub2/large.bin
719 ../archive_lf/sub1/sub2/large.bin
720 ../archive_lf/sub1/sub2/sub2
720 ../archive_lf/sub1/sub2/sub2
721 ../archive_lf/sub1/sub2/test.txt
721 ../archive_lf/sub1/sub2/test.txt
722 $ rm -rf ../archive_lf
722 $ rm -rf ../archive_lf
723
723
724 Exclude large files from main and sub-sub repo
724 Exclude large files from main and sub-sub repo
725
725
726 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
726 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
727 $ find ../archive_lf | sort
727 $ find ../archive_lf | sort
728 ../archive_lf
728 ../archive_lf
729 ../archive_lf/.hg_archival.txt
729 ../archive_lf/.hg_archival.txt
730 ../archive_lf/.hgsub
730 ../archive_lf/.hgsub
731 ../archive_lf/.hgsubstate
731 ../archive_lf/.hgsubstate
732 ../archive_lf/main
732 ../archive_lf/main
733 ../archive_lf/sub1
733 ../archive_lf/sub1
734 ../archive_lf/sub1/.hgsub
734 ../archive_lf/sub1/.hgsub
735 ../archive_lf/sub1/.hgsubstate
735 ../archive_lf/sub1/.hgsubstate
736 ../archive_lf/sub1/sub1
736 ../archive_lf/sub1/sub1
737 ../archive_lf/sub1/sub2
737 ../archive_lf/sub1/sub2
738 ../archive_lf/sub1/sub2/folder
738 ../archive_lf/sub1/sub2/folder
739 ../archive_lf/sub1/sub2/folder/test.txt
739 ../archive_lf/sub1/sub2/folder/test.txt
740 ../archive_lf/sub1/sub2/sub2
740 ../archive_lf/sub1/sub2/sub2
741 ../archive_lf/sub1/sub2/test.txt
741 ../archive_lf/sub1/sub2/test.txt
742 $ rm -rf ../archive_lf
742 $ rm -rf ../archive_lf
743
743
744 Exclude normal files from main and sub-sub repo
744 Exclude normal files from main and sub-sub repo
745
745
746 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
746 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
747 $ tar -tzf ../archive_lf.tgz | sort
747 $ tar -tzf ../archive_lf.tgz | sort
748 .hgsub
748 .hgsub
749 .hgsubstate
749 .hgsubstate
750 large.bin
750 large.bin
751 main
751 main
752 sub1/.hgsub
752 sub1/.hgsub
753 sub1/.hgsubstate
753 sub1/.hgsubstate
754 sub1/sub1
754 sub1/sub1
755 sub1/sub2/large.bin
755 sub1/sub2/large.bin
756 sub1/sub2/sub2
756 sub1/sub2/sub2
757
757
758 Include normal files from within a largefiles subrepo
758 Include normal files from within a largefiles subrepo
759
759
760 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
760 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
761 $ find ../archive_lf | sort
761 $ find ../archive_lf | sort
762 ../archive_lf
762 ../archive_lf
763 ../archive_lf/.hg_archival.txt
763 ../archive_lf/.hg_archival.txt
764 ../archive_lf/sub1
764 ../archive_lf/sub1
765 ../archive_lf/sub1/sub2
765 ../archive_lf/sub1/sub2
766 ../archive_lf/sub1/sub2/folder
766 ../archive_lf/sub1/sub2/folder
767 ../archive_lf/sub1/sub2/folder/test.txt
767 ../archive_lf/sub1/sub2/folder/test.txt
768 ../archive_lf/sub1/sub2/test.txt
768 ../archive_lf/sub1/sub2/test.txt
769 $ rm -rf ../archive_lf
769 $ rm -rf ../archive_lf
770
770
771 Include large files from within a largefiles subrepo
771 Include large files from within a largefiles subrepo
772
772
773 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
773 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
774 $ find ../archive_lf | sort
774 $ find ../archive_lf | sort
775 ../archive_lf
775 ../archive_lf
776 ../archive_lf/large.bin
776 ../archive_lf/large.bin
777 ../archive_lf/sub1
777 ../archive_lf/sub1
778 ../archive_lf/sub1/sub2
778 ../archive_lf/sub1/sub2
779 ../archive_lf/sub1/sub2/large.bin
779 ../archive_lf/sub1/sub2/large.bin
780 $ rm -rf ../archive_lf
780 $ rm -rf ../archive_lf
781
781
782 Find an exact largefile match in a largefiles subrepo
782 Find an exact largefile match in a largefiles subrepo
783
783
784 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
784 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
785 $ find ../archive_lf | sort
785 $ find ../archive_lf | sort
786 ../archive_lf
786 ../archive_lf
787 ../archive_lf/sub1
787 ../archive_lf/sub1
788 ../archive_lf/sub1/sub2
788 ../archive_lf/sub1/sub2
789 ../archive_lf/sub1/sub2/large.bin
789 ../archive_lf/sub1/sub2/large.bin
790 $ rm -rf ../archive_lf
790 $ rm -rf ../archive_lf
791
791
792 The local repo enables largefiles if a largefiles repo is cloned
792 The local repo enables largefiles if a largefiles repo is cloned
793 $ hg showconfig extensions
793 $ hg showconfig extensions
794 abort: repository requires features unknown to this Mercurial: largefiles!
794 abort: repository requires features unknown to this Mercurial: largefiles!
795 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
795 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
796 [255]
796 [255]
797 $ hg --config extensions.largefiles= clone -qU . ../lfclone
797 $ hg --config extensions.largefiles= clone -qU . ../lfclone
798 $ cat ../lfclone/.hg/hgrc
798 $ cat ../lfclone/.hg/hgrc
799 # example repository config (see 'hg help config' for more info)
799 # example repository config (see 'hg help config' for more info)
800 [paths]
800 [paths]
801 default = $TESTTMP/cloned
801 default = $TESTTMP/cloned
802
802
803 # path aliases to other clones of this repo in URLs or filesystem paths
803 # path aliases to other clones of this repo in URLs or filesystem paths
804 # (see 'hg help config.paths' for more info)
804 # (see 'hg help config.paths' for more info)
805 #
805 #
806 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
806 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
807 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
807 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
808 # my-clone = /home/jdoe/jdoes-clone
808 # my-clone = /home/jdoe/jdoes-clone
809
809
810 [ui]
810 [ui]
811 # name and email (local to this repository, optional), e.g.
811 # name and email (local to this repository, optional), e.g.
812 # username = Jane Doe <jdoe@example.com>
812 # username = Jane Doe <jdoe@example.com>
813
813
814 [extensions]
814 [extensions]
815 largefiles=
815 largefiles=
816
816
817 Find an exact match to a standin (should archive nothing)
817 Find an exact match to a standin (should archive nothing)
818 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
818 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
819 $ find ../archive_lf 2> /dev/null | sort
819 $ find ../archive_lf 2> /dev/null | sort
820
820
821 $ cat >> $HGRCPATH <<EOF
821 $ cat >> $HGRCPATH <<EOF
822 > [extensions]
822 > [extensions]
823 > largefiles=
823 > largefiles=
824 > [largefiles]
824 > [largefiles]
825 > patterns=glob:**.dat
825 > patterns=glob:**.dat
826 > EOF
826 > EOF
827
827
828 Test forget through a deep subrepo with the largefiles extension, both a
828 Test forget through a deep subrepo with the largefiles extension, both a
829 largefile and a normal file. Then a largefile that hasn't been committed yet.
829 largefile and a normal file. Then a largefile that hasn't been committed yet.
830 $ touch sub1/sub2/untracked.txt
830 $ touch sub1/sub2/untracked.txt
831 $ touch sub1/sub2/large.dat
831 $ touch sub1/sub2/large.dat
832 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
832 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
833 not removing sub1/sub2/untracked.txt: file is already untracked
833 not removing sub1/sub2/untracked.txt: file is already untracked
834 [1]
834 [1]
835 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
835 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
836 adding sub1/sub2/untracked.txt as a largefile
836 adding sub1/sub2/untracked.txt as a largefile
837 $ hg add --large -v sub1/sub2/untracked.txt
837 $ hg add --large -v sub1/sub2/untracked.txt
838 adding sub1/sub2/untracked.txt as a largefile
838 adding sub1/sub2/untracked.txt as a largefile
839 $ hg add --normal -v sub1/sub2/large.dat
839 $ hg add --normal -v sub1/sub2/large.dat
840 adding sub1/sub2/large.dat
840 adding sub1/sub2/large.dat
841 $ hg forget -v sub1/sub2/untracked.txt
841 $ hg forget -v sub1/sub2/untracked.txt
842 removing sub1/sub2/untracked.txt
842 removing sub1/sub2/untracked.txt
843 $ hg status -S
843 $ hg status -S
844 A sub1/sub2/large.dat
844 A sub1/sub2/large.dat
845 R sub1/sub2/large.bin
845 R sub1/sub2/large.bin
846 R sub1/sub2/test.txt
846 R sub1/sub2/test.txt
847 ? foo/bar/abc
847 ? foo/bar/abc
848 ? sub1/sub2/untracked.txt
848 ? sub1/sub2/untracked.txt
849 ? sub1/sub2/x.txt
849 ? sub1/sub2/x.txt
850 $ hg add sub1/sub2
850 $ hg add sub1/sub2
851
851
852 $ hg archive -S -r 'wdir()' ../wdir2
852 $ hg archive -S -r 'wdir()' ../wdir2
853 $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
853 $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
854 Only in ../wdir2: .hg_archival.txt
854 Only in ../wdir2: .hg_archival.txt
855 Only in .: .hglf
855 Only in .: .hglf
856 Only in .: foo
856 Only in .: foo
857 Only in ./sub1/sub2: large.bin
857 Only in ./sub1/sub2: large.bin
858 Only in ./sub1/sub2: test.txt
858 Only in ./sub1/sub2: test.txt
859 Only in ./sub1/sub2: untracked.txt
859 Only in ./sub1/sub2: untracked.txt
860 Only in ./sub1/sub2: x.txt
860 Only in ./sub1/sub2: x.txt
861 $ find ../wdir2 -type f | sort
861 $ find ../wdir2 -type f | sort
862 ../wdir2/.hg_archival.txt
862 ../wdir2/.hg_archival.txt
863 ../wdir2/.hgsub
863 ../wdir2/.hgsub
864 ../wdir2/.hgsubstate
864 ../wdir2/.hgsubstate
865 ../wdir2/large.bin
865 ../wdir2/large.bin
866 ../wdir2/main
866 ../wdir2/main
867 ../wdir2/sub1/.hgsub
867 ../wdir2/sub1/.hgsub
868 ../wdir2/sub1/.hgsubstate
868 ../wdir2/sub1/.hgsubstate
869 ../wdir2/sub1/sub1
869 ../wdir2/sub1/sub1
870 ../wdir2/sub1/sub2/folder/test.txt
870 ../wdir2/sub1/sub2/folder/test.txt
871 ../wdir2/sub1/sub2/large.dat
871 ../wdir2/sub1/sub2/large.dat
872 ../wdir2/sub1/sub2/sub2
872 ../wdir2/sub1/sub2/sub2
873 $ hg status -S -mac -n | sort
873 $ hg status -S -mac -n | sort
874 .hgsub
874 .hgsub
875 .hgsubstate
875 .hgsubstate
876 large.bin
876 large.bin
877 main
877 main
878 sub1/.hgsub
878 sub1/.hgsub
879 sub1/.hgsubstate
879 sub1/.hgsubstate
880 sub1/sub1
880 sub1/sub1
881 sub1/sub2/folder/test.txt
881 sub1/sub2/folder/test.txt
882 sub1/sub2/large.dat
882 sub1/sub2/large.dat
883 sub1/sub2/sub2
883 sub1/sub2/sub2
884
884
885 $ hg ci -Sqm 'forget testing'
885 $ hg ci -Sqm 'forget testing'
886
886
887 Test 'wdir()' modified file archiving with largefiles
887 Test 'wdir()' modified file archiving with largefiles
888 $ echo 'mod' > main
888 $ echo 'mod' > main
889 $ echo 'mod' > large.bin
889 $ echo 'mod' > large.bin
890 $ echo 'mod' > sub1/sub2/large.dat
890 $ echo 'mod' > sub1/sub2/large.dat
891 $ hg archive -S -r 'wdir()' ../wdir3
891 $ hg archive -S -r 'wdir()' ../wdir3
892 $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
892 $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
893 Only in ../wdir3: .hg_archival.txt
893 Only in ../wdir3: .hg_archival.txt
894 Only in .: .hglf
894 Only in .: .hglf
895 Only in .: foo
895 Only in .: foo
896 Only in ./sub1/sub2: large.bin
896 Only in ./sub1/sub2: large.bin
897 Only in ./sub1/sub2: test.txt
897 Only in ./sub1/sub2: test.txt
898 Only in ./sub1/sub2: untracked.txt
898 Only in ./sub1/sub2: untracked.txt
899 Only in ./sub1/sub2: x.txt
899 Only in ./sub1/sub2: x.txt
900 $ find ../wdir3 -type f | sort
900 $ find ../wdir3 -type f | sort
901 ../wdir3/.hg_archival.txt
901 ../wdir3/.hg_archival.txt
902 ../wdir3/.hgsub
902 ../wdir3/.hgsub
903 ../wdir3/.hgsubstate
903 ../wdir3/.hgsubstate
904 ../wdir3/large.bin
904 ../wdir3/large.bin
905 ../wdir3/main
905 ../wdir3/main
906 ../wdir3/sub1/.hgsub
906 ../wdir3/sub1/.hgsub
907 ../wdir3/sub1/.hgsubstate
907 ../wdir3/sub1/.hgsubstate
908 ../wdir3/sub1/sub1
908 ../wdir3/sub1/sub1
909 ../wdir3/sub1/sub2/folder/test.txt
909 ../wdir3/sub1/sub2/folder/test.txt
910 ../wdir3/sub1/sub2/large.dat
910 ../wdir3/sub1/sub2/large.dat
911 ../wdir3/sub1/sub2/sub2
911 ../wdir3/sub1/sub2/sub2
912 $ hg up -Cq
912 $ hg up -Cq
913
913
914 Test issue4330: commit a directory where only normal files have changed
914 Test issue4330: commit a directory where only normal files have changed
915 $ touch foo/bar/large.dat
915 $ touch foo/bar/large.dat
916 $ hg add --large foo/bar/large.dat
916 $ hg add --large foo/bar/large.dat
917 $ hg ci -m 'add foo/bar/large.dat'
917 $ hg ci -m 'add foo/bar/large.dat'
918 $ touch a.txt
918 $ touch a.txt
919 $ touch a.dat
919 $ touch a.dat
920 $ hg add -v foo/bar/abc a.txt a.dat
920 $ hg add -v foo/bar/abc a.txt a.dat
921 adding a.dat as a largefile
921 adding a.dat as a largefile
922 adding a.txt
922 adding a.txt
923 adding foo/bar/abc
923 adding foo/bar/abc
924 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
924 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
925 $ hg status
925 $ hg status
926 A a.dat
926 A a.dat
927 A a.txt
927 A a.txt
928
928
929 Test a directory commit with a changed largefile and a changed normal file
929 Test a directory commit with a changed largefile and a changed normal file
930 $ echo changed > foo/bar/large.dat
930 $ echo changed > foo/bar/large.dat
931 $ echo changed > foo/bar/abc
931 $ echo changed > foo/bar/abc
932 $ hg ci -m 'dir commit with normal and lf file deltas' foo
932 $ hg ci -m 'dir commit with normal and lf file deltas' foo
933 $ hg status
933 $ hg status
934 A a.dat
934 A a.dat
935 A a.txt
935 A a.txt
936
936
937 $ hg ci -m "add a.*"
937 $ hg ci -m "add a.*"
938 $ hg mv a.dat b.dat
938 $ hg mv a.dat b.dat
939 $ hg mv foo/bar/abc foo/bar/def
939 $ hg mv foo/bar/abc foo/bar/def
940 $ hg status -C
940 $ hg status -C
941 A b.dat
941 A b.dat
942 a.dat
942 a.dat
943 A foo/bar/def
943 A foo/bar/def
944 foo/bar/abc
944 foo/bar/abc
945 R a.dat
945 R a.dat
946 R foo/bar/abc
946 R foo/bar/abc
947
947
948 $ hg ci -m "move large and normal"
948 $ hg ci -m "move large and normal"
949 $ hg status -C --rev '.^' --rev .
949 $ hg status -C --rev '.^' --rev .
950 A b.dat
950 A b.dat
951 a.dat
951 a.dat
952 A foo/bar/def
952 A foo/bar/def
953 foo/bar/abc
953 foo/bar/abc
954 R a.dat
954 R a.dat
955 R foo/bar/abc
955 R foo/bar/abc
956
956
957
957
958 $ echo foo > main
958 $ echo foo > main
959 $ hg ci -m "mod parent only"
959 $ hg ci -m "mod parent only"
960 $ hg init sub3
960 $ hg init sub3
961 $ echo "sub3 = sub3" >> .hgsub
961 $ echo "sub3 = sub3" >> .hgsub
962 $ echo xyz > sub3/a.txt
962 $ echo xyz > sub3/a.txt
963 $ hg add sub3/a.txt
963 $ hg add sub3/a.txt
964 $ hg ci -Sm "add sub3"
964 $ hg ci -Sm "add sub3"
965 committing subrepository sub3
965 committing subrepository sub3
966 $ cat .hgsub | grep -v sub3 > .hgsub1
966 $ cat .hgsub | grep -v sub3 > .hgsub1
967 $ mv .hgsub1 .hgsub
967 $ mv .hgsub1 .hgsub
968 $ hg ci -m "remove sub3"
968 $ hg ci -m "remove sub3"
969
969
970 $ hg log -r "subrepo()" --style compact
970 $ hg log -r "subrepo()" --style compact
971 0 7f491f53a367 1970-01-01 00:00 +0000 test
971 0 7f491f53a367 1970-01-01 00:00 +0000 test
972 main import
972 main import
973
973
974 1 ffe6649062fe 1970-01-01 00:00 +0000 test
974 1 ffe6649062fe 1970-01-01 00:00 +0000 test
975 deep nested modif should trigger a commit
975 deep nested modif should trigger a commit
976
976
977 2 9bb10eebee29 1970-01-01 00:00 +0000 test
977 2 9bb10eebee29 1970-01-01 00:00 +0000 test
978 add test.txt
978 add test.txt
979
979
980 3 7c64f035294f 1970-01-01 00:00 +0000 test
980 3 7c64f035294f 1970-01-01 00:00 +0000 test
981 add large files
981 add large files
982
982
983 4 f734a59e2e35 1970-01-01 00:00 +0000 test
983 4 f734a59e2e35 1970-01-01 00:00 +0000 test
984 forget testing
984 forget testing
985
985
986 11 9685a22af5db 1970-01-01 00:00 +0000 test
986 11 9685a22af5db 1970-01-01 00:00 +0000 test
987 add sub3
987 add sub3
988
988
989 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
989 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
990 remove sub3
990 remove sub3
991
991
992 $ hg log -r "subrepo('sub3')" --style compact
992 $ hg log -r "subrepo('sub3')" --style compact
993 11 9685a22af5db 1970-01-01 00:00 +0000 test
993 11 9685a22af5db 1970-01-01 00:00 +0000 test
994 add sub3
994 add sub3
995
995
996 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
996 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
997 remove sub3
997 remove sub3
998
998
999 $ hg log -r "subrepo('bogus')" --style compact
999 $ hg log -r "subrepo('bogus')" --style compact
1000
1000
1001
1001
1002 Test .hgsubstate in the R state
1002 Test .hgsubstate in the R state
1003
1003
1004 $ hg rm .hgsub .hgsubstate
1004 $ hg rm .hgsub .hgsubstate
1005 \r (no-eol) (esc)
1005 \r (no-eol) (esc)
1006 deleting [=====================> ] 1/2\r (no-eol) (esc)
1006 deleting [=====================> ] 1/2\r (no-eol) (esc)
1007 deleting [===========================================>] 2/2\r (no-eol) (esc)
1007 deleting [===========================================>] 2/2\r (no-eol) (esc)
1008 \r (no-eol) (esc)
1008 \r (no-eol) (esc)
1009 $ hg ci -m 'trash subrepo tracking'
1009 $ hg ci -m 'trash subrepo tracking'
1010
1010
1011 $ hg log -r "subrepo('re:sub\d+')" --style compact
1011 $ hg log -r "subrepo('re:sub\d+')" --style compact
1012 0 7f491f53a367 1970-01-01 00:00 +0000 test
1012 0 7f491f53a367 1970-01-01 00:00 +0000 test
1013 main import
1013 main import
1014
1014
1015 1 ffe6649062fe 1970-01-01 00:00 +0000 test
1015 1 ffe6649062fe 1970-01-01 00:00 +0000 test
1016 deep nested modif should trigger a commit
1016 deep nested modif should trigger a commit
1017
1017
1018 2 9bb10eebee29 1970-01-01 00:00 +0000 test
1018 2 9bb10eebee29 1970-01-01 00:00 +0000 test
1019 add test.txt
1019 add test.txt
1020
1020
1021 3 7c64f035294f 1970-01-01 00:00 +0000 test
1021 3 7c64f035294f 1970-01-01 00:00 +0000 test
1022 add large files
1022 add large files
1023
1023
1024 4 f734a59e2e35 1970-01-01 00:00 +0000 test
1024 4 f734a59e2e35 1970-01-01 00:00 +0000 test
1025 forget testing
1025 forget testing
1026
1026
1027 11 9685a22af5db 1970-01-01 00:00 +0000 test
1027 11 9685a22af5db 1970-01-01 00:00 +0000 test
1028 add sub3
1028 add sub3
1029
1029
1030 12 2e0485b475b9 1970-01-01 00:00 +0000 test
1030 12 2e0485b475b9 1970-01-01 00:00 +0000 test
1031 remove sub3
1031 remove sub3
1032
1032
1033 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
1033 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
1034 trash subrepo tracking
1034 trash subrepo tracking
1035
1035
1036
1036
1037 Restore the trashed subrepo tracking
1037 Restore the trashed subrepo tracking
1038
1038
1039 $ hg rollback -q
1039 $ hg rollback -q
1040 $ hg update -Cq .
1040 $ hg update -Cq .
1041
1041
1042 Interaction with extdiff, largefiles and subrepos
1042 Interaction with extdiff, largefiles and subrepos
1043
1043
1044 $ hg --config extensions.extdiff= pdiff -S
1044 $ hg --config extensions.extdiff= pdiff -S
1045
1045
1046 $ hg --config extensions.extdiff= pdiff -r '.^' -S
1046 $ hg --config extensions.extdiff= pdiff -r '.^' -S
1047 \r (no-eol) (esc)
1047 \r (no-eol) (esc)
1048 archiving [ ] 0/2\r (no-eol) (esc)
1048 archiving [ ] 0/2\r (no-eol) (esc)
1049 archiving [====================> ] 1/2\r (no-eol) (esc)
1049 archiving [====================> ] 1/2\r (no-eol) (esc)
1050 archiving [==========================================>] 2/2\r (no-eol) (esc)
1050 archiving [==========================================>] 2/2\r (no-eol) (esc)
1051 \r (no-eol) (esc)
1051 \r (no-eol) (esc)
1052 \r (no-eol) (esc)
1052 \r (no-eol) (esc)
1053 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1053 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1054 \r (no-eol) (esc)
1054 \r (no-eol) (esc)
1055 \r (no-eol) (esc)
1055 \r (no-eol) (esc)
1056 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1056 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1057 \r (no-eol) (esc)
1057 \r (no-eol) (esc)
1058 \r (no-eol) (esc)
1058 \r (no-eol) (esc)
1059 archiving (sub3) [ <=> ] 0\r (no-eol) (esc)
1059 archiving (sub3) [ <=> ] 0\r (no-eol) (esc)
1060 \r (no-eol) (esc)
1060 \r (no-eol) (esc)
1061 \r (no-eol) (esc)
1061 \r (no-eol) (esc)
1062 archiving [ ] 0/2\r (no-eol) (esc)
1062 archiving [ ] 0/2\r (no-eol) (esc)
1063 archiving [====================> ] 1/2\r (no-eol) (esc)
1063 archiving [====================> ] 1/2\r (no-eol) (esc)
1064 archiving [==========================================>] 2/2\r (no-eol) (esc)
1064 archiving [==========================================>] 2/2\r (no-eol) (esc)
1065 \r (no-eol) (esc)
1065 \r (no-eol) (esc)
1066 \r (no-eol) (esc)
1066 \r (no-eol) (esc)
1067 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1067 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1068 \r (no-eol) (esc)
1068 \r (no-eol) (esc)
1069 \r (no-eol) (esc)
1069 \r (no-eol) (esc)
1070 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1070 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
1071 \r (no-eol) (esc)
1071 \r (no-eol) (esc)
1072 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
1072 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
1073 --- cloned.*/.hgsub * (glob)
1073 --- cloned.*/.hgsub * (glob)
1074 +++ cloned/.hgsub * (glob)
1074 +++ cloned/.hgsub * (glob)
1075 @@ -1,2 +1* @@ (glob)
1075 @@ -1,2 +1* @@ (glob)
1076 sub1 = ../sub1
1076 sub1 = ../sub1
1077 -sub3 = sub3
1077 -sub3 = sub3
1078 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
1078 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
1079 --- cloned.*/.hgsubstate * (glob)
1079 --- cloned.*/.hgsubstate * (glob)
1080 +++ cloned/.hgsubstate * (glob)
1080 +++ cloned/.hgsubstate * (glob)
1081 @@ -1,2 +1* @@ (glob)
1081 @@ -1,2 +1* @@ (glob)
1082 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1082 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1083 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1083 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1084 [1]
1084 [1]
1085
1085
1086 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
1086 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
1087 \r (no-eol) (esc)
1087 \r (no-eol) (esc)
1088 archiving [ ] 0/3\r (no-eol) (esc)
1088 archiving [ ] 0/3\r (no-eol) (esc)
1089 archiving [=============> ] 1/3\r (no-eol) (esc)
1089 archiving [=============> ] 1/3\r (no-eol) (esc)
1090 archiving [===========================> ] 2/3\r (no-eol) (esc)
1090 archiving [===========================> ] 2/3\r (no-eol) (esc)
1091 archiving [==========================================>] 3/3\r (no-eol) (esc)
1091 archiving [==========================================>] 3/3\r (no-eol) (esc)
1092 \r (no-eol) (esc)
1092 \r (no-eol) (esc)
1093 \r (no-eol) (esc)
1093 \r (no-eol) (esc)
1094 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1094 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1095 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1095 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1096 \r (no-eol) (esc)
1096 \r (no-eol) (esc)
1097 \r (no-eol) (esc)
1097 \r (no-eol) (esc)
1098 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1098 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1099 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1099 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1100 \r (no-eol) (esc)
1100 \r (no-eol) (esc)
1101 \r (no-eol) (esc)
1101 \r (no-eol) (esc)
1102 archiving [ ] 0/8\r (no-eol) (esc)
1102 archiving [ ] 0/8\r (no-eol) (esc)
1103 archiving [====> ] 1/8\r (no-eol) (esc)
1103 archiving [====> ] 1/8\r (no-eol) (esc)
1104 archiving [=========> ] 2/8\r (no-eol) (esc)
1104 archiving [=========> ] 2/8\r (no-eol) (esc)
1105 archiving [===============> ] 3/8\r (no-eol) (esc)
1105 archiving [===============> ] 3/8\r (no-eol) (esc)
1106 archiving [====================> ] 4/8\r (no-eol) (esc)
1106 archiving [====================> ] 4/8\r (no-eol) (esc)
1107 archiving [=========================> ] 5/8\r (no-eol) (esc)
1107 archiving [=========================> ] 5/8\r (no-eol) (esc)
1108 archiving [===============================> ] 6/8\r (no-eol) (esc)
1108 archiving [===============================> ] 6/8\r (no-eol) (esc)
1109 archiving [====================================> ] 7/8\r (no-eol) (esc)
1109 archiving [====================================> ] 7/8\r (no-eol) (esc)
1110 archiving [==========================================>] 8/8\r (no-eol) (esc)
1110 archiving [==========================================>] 8/8\r (no-eol) (esc)
1111 \r (no-eol) (esc)
1111 \r (no-eol) (esc)
1112 \r (no-eol) (esc)
1112 \r (no-eol) (esc)
1113 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1113 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1114 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1114 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1115 \r (no-eol) (esc)
1115 \r (no-eol) (esc)
1116 \r (no-eol) (esc)
1116 \r (no-eol) (esc)
1117 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
1117 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
1118 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
1118 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
1119 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
1119 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
1120 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
1120 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
1121 \r (no-eol) (esc)
1121 \r (no-eol) (esc)
1122 \r (no-eol) (esc)
1122 \r (no-eol) (esc)
1123 archiving (sub3) [ ] 0/1\r (no-eol) (esc)
1123 archiving (sub3) [ ] 0/1\r (no-eol) (esc)
1124 archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
1124 archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
1125 \r (no-eol) (esc)
1125 \r (no-eol) (esc)
1126 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
1126 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
1127 --- cloned.*/.hglf/b.dat * (glob)
1127 --- cloned.*/.hglf/b.dat * (glob)
1128 +++ cloned.*/.hglf/b.dat * (glob)
1128 +++ cloned.*/.hglf/b.dat * (glob)
1129 @@ -*,0 +1* @@ (glob)
1129 @@ -*,0 +1* @@ (glob)
1130 +da39a3ee5e6b4b0d3255bfef95601890afd80709
1130 +da39a3ee5e6b4b0d3255bfef95601890afd80709
1131 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
1131 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
1132 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
1132 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
1133 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
1133 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
1134 @@ -*,0 +1* @@ (glob)
1134 @@ -*,0 +1* @@ (glob)
1135 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
1135 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
1136 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
1136 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
1137 --- cloned.*/.hglf/large.bin * (glob)
1137 --- cloned.*/.hglf/large.bin * (glob)
1138 +++ cloned.*/.hglf/large.bin * (glob)
1138 +++ cloned.*/.hglf/large.bin * (glob)
1139 @@ -*,0 +1* @@ (glob)
1139 @@ -*,0 +1* @@ (glob)
1140 +7f7097b041ccf68cc5561e9600da4655d21c6d18
1140 +7f7097b041ccf68cc5561e9600da4655d21c6d18
1141 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
1141 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
1142 --- cloned.*/.hgsub * (glob)
1142 --- cloned.*/.hgsub * (glob)
1143 +++ cloned.*/.hgsub * (glob)
1143 +++ cloned.*/.hgsub * (glob)
1144 @@ -1* +1,2 @@ (glob)
1144 @@ -1* +1,2 @@ (glob)
1145 sub1 = ../sub1
1145 sub1 = ../sub1
1146 +sub3 = sub3
1146 +sub3 = sub3
1147 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
1147 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
1148 --- cloned.*/.hgsubstate * (glob)
1148 --- cloned.*/.hgsubstate * (glob)
1149 +++ cloned.*/.hgsubstate * (glob)
1149 +++ cloned.*/.hgsubstate * (glob)
1150 @@ -1* +1,2 @@ (glob)
1150 @@ -1* +1,2 @@ (glob)
1151 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
1151 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
1152 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1152 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1153 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1153 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1154 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
1154 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
1155 --- cloned.*/foo/bar/def * (glob)
1155 --- cloned.*/foo/bar/def * (glob)
1156 +++ cloned.*/foo/bar/def * (glob)
1156 +++ cloned.*/foo/bar/def * (glob)
1157 @@ -*,0 +1* @@ (glob)
1157 @@ -*,0 +1* @@ (glob)
1158 +changed
1158 +changed
1159 diff -Nru cloned.*/main cloned.*/main (glob)
1159 diff -Nru cloned.*/main cloned.*/main (glob)
1160 --- cloned.*/main * (glob)
1160 --- cloned.*/main * (glob)
1161 +++ cloned.*/main * (glob)
1161 +++ cloned.*/main * (glob)
1162 @@ -1* +1* @@ (glob)
1162 @@ -1* +1* @@ (glob)
1163 -main
1163 -main
1164 +foo
1164 +foo
1165 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
1165 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
1166 --- cloned.*/sub1/.hgsubstate * (glob)
1166 --- cloned.*/sub1/.hgsubstate * (glob)
1167 +++ cloned.*/sub1/.hgsubstate * (glob)
1167 +++ cloned.*/sub1/.hgsubstate * (glob)
1168 @@ -1* +1* @@ (glob)
1168 @@ -1* +1* @@ (glob)
1169 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
1169 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
1170 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
1170 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
1171 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
1171 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
1172 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
1172 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
1173 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
1173 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
1174 @@ -*,0 +1* @@ (glob)
1174 @@ -*,0 +1* @@ (glob)
1175 +subfolder
1175 +subfolder
1176 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
1176 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
1177 --- cloned.*/sub1/sub2/sub2 * (glob)
1177 --- cloned.*/sub1/sub2/sub2 * (glob)
1178 +++ cloned.*/sub1/sub2/sub2 * (glob)
1178 +++ cloned.*/sub1/sub2/sub2 * (glob)
1179 @@ -1* +1* @@ (glob)
1179 @@ -1* +1* @@ (glob)
1180 -sub2
1180 -sub2
1181 +modified
1181 +modified
1182 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
1182 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
1183 --- cloned.*/sub3/a.txt * (glob)
1183 --- cloned.*/sub3/a.txt * (glob)
1184 +++ cloned.*/sub3/a.txt * (glob)
1184 +++ cloned.*/sub3/a.txt * (glob)
1185 @@ -*,0 +1* @@ (glob)
1185 @@ -*,0 +1* @@ (glob)
1186 +xyz
1186 +xyz
1187 [1]
1187 [1]
1188
1188
1189 $ echo mod > sub1/sub2/sub2
1189 $ echo mod > sub1/sub2/sub2
1190 $ hg --config extensions.extdiff= pdiff -S
1190 $ hg --config extensions.extdiff= pdiff -S
1191 \r (no-eol) (esc)
1191 \r (no-eol) (esc)
1192 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1192 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1193 \r (no-eol) (esc)
1193 \r (no-eol) (esc)
1194 \r (no-eol) (esc)
1194 \r (no-eol) (esc)
1195 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1195 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1196 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1196 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1197 \r (no-eol) (esc)
1197 \r (no-eol) (esc)
1198 --- */cloned.*/sub1/sub2/sub2 * (glob)
1198 --- */cloned.*/sub1/sub2/sub2 * (glob)
1199 +++ */cloned/sub1/sub2/sub2 * (glob)
1199 +++ */cloned/sub1/sub2/sub2 * (glob)
1200 @@ -1* +1* @@ (glob)
1200 @@ -1* +1* @@ (glob)
1201 -modified
1201 -modified
1202 +mod
1202 +mod
1203 [1]
1203 [1]
1204
1204
1205 $ cd ..
1205 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now