##// END OF EJS Templates
progress: stop excessive clearing (issue4801)...
Matt Mackall -
r29089:222b8170 stable
parent child Browse files
Show More
@@ -1,256 +1,256 b''
1 1 # progress.py progress bars related code
2 2 #
3 3 # Copyright (C) 2010 Augie Fackler <durin42@gmail.com>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from __future__ import absolute_import
9 9
10 10 import sys
11 11 import threading
12 12 import time
13 13
14 14 from .i18n import _
15 15 from . import encoding
16 16
17 17 def spacejoin(*args):
18 18 return ' '.join(s for s in args if s)
19 19
20 20 def shouldprint(ui):
21 21 return not (ui.quiet or ui.plain('progress')) and (
22 22 ui._isatty(sys.stderr) or ui.configbool('progress', 'assume-tty'))
23 23
24 24 def fmtremaining(seconds):
25 25 """format a number of remaining seconds in human readable way
26 26
27 27 This will properly display seconds, minutes, hours, days if needed"""
28 28 if seconds < 60:
29 29 # i18n: format XX seconds as "XXs"
30 30 return _("%02ds") % (seconds)
31 31 minutes = seconds // 60
32 32 if minutes < 60:
33 33 seconds -= minutes * 60
34 34 # i18n: format X minutes and YY seconds as "XmYYs"
35 35 return _("%dm%02ds") % (minutes, seconds)
36 36 # we're going to ignore seconds in this case
37 37 minutes += 1
38 38 hours = minutes // 60
39 39 minutes -= hours * 60
40 40 if hours < 30:
41 41 # i18n: format X hours and YY minutes as "XhYYm"
42 42 return _("%dh%02dm") % (hours, minutes)
43 43 # we're going to ignore minutes in this case
44 44 hours += 1
45 45 days = hours // 24
46 46 hours -= days * 24
47 47 if days < 15:
48 48 # i18n: format X days and YY hours as "XdYYh"
49 49 return _("%dd%02dh") % (days, hours)
50 50 # we're going to ignore hours in this case
51 51 days += 1
52 52 weeks = days // 7
53 53 days -= weeks * 7
54 54 if weeks < 55:
55 55 # i18n: format X weeks and YY days as "XwYYd"
56 56 return _("%dw%02dd") % (weeks, days)
57 57 # we're going to ignore days and treat a year as 52 weeks
58 58 weeks += 1
59 59 years = weeks // 52
60 60 weeks -= years * 52
61 61 # i18n: format X years and YY weeks as "XyYYw"
62 62 return _("%dy%02dw") % (years, weeks)
63 63
64 64 class progbar(object):
65 65 def __init__(self, ui):
66 66 self.ui = ui
67 67 self._refreshlock = threading.Lock()
68 68 self.resetstate()
69 69
70 70 def resetstate(self):
71 71 self.topics = []
72 72 self.topicstates = {}
73 73 self.starttimes = {}
74 74 self.startvals = {}
75 75 self.printed = False
76 76 self.lastprint = time.time() + float(self.ui.config(
77 77 'progress', 'delay', default=3))
78 78 self.curtopic = None
79 79 self.lasttopic = None
80 80 self.indetcount = 0
81 81 self.refresh = float(self.ui.config(
82 82 'progress', 'refresh', default=0.1))
83 83 self.changedelay = max(3 * self.refresh,
84 84 float(self.ui.config(
85 85 'progress', 'changedelay', default=1)))
86 86 self.order = self.ui.configlist(
87 87 'progress', 'format',
88 88 default=['topic', 'bar', 'number', 'estimate'])
89 89
90 90 def show(self, now, topic, pos, item, unit, total):
91 91 if not shouldprint(self.ui):
92 92 return
93 93 termwidth = self.width()
94 94 self.printed = True
95 95 head = ''
96 96 needprogress = False
97 97 tail = ''
98 98 for indicator in self.order:
99 99 add = ''
100 100 if indicator == 'topic':
101 101 add = topic
102 102 elif indicator == 'number':
103 103 if total:
104 104 add = ('% ' + str(len(str(total))) +
105 105 's/%s') % (pos, total)
106 106 else:
107 107 add = str(pos)
108 108 elif indicator.startswith('item') and item:
109 109 slice = 'end'
110 110 if '-' in indicator:
111 111 wid = int(indicator.split('-')[1])
112 112 elif '+' in indicator:
113 113 slice = 'beginning'
114 114 wid = int(indicator.split('+')[1])
115 115 else:
116 116 wid = 20
117 117 if slice == 'end':
118 118 add = encoding.trim(item, wid, leftside=True)
119 119 else:
120 120 add = encoding.trim(item, wid)
121 121 add += (wid - encoding.colwidth(add)) * ' '
122 122 elif indicator == 'bar':
123 123 add = ''
124 124 needprogress = True
125 125 elif indicator == 'unit' and unit:
126 126 add = unit
127 127 elif indicator == 'estimate':
128 128 add = self.estimate(topic, pos, total, now)
129 129 elif indicator == 'speed':
130 130 add = self.speed(topic, pos, unit, now)
131 131 if not needprogress:
132 132 head = spacejoin(head, add)
133 133 else:
134 134 tail = spacejoin(tail, add)
135 135 if needprogress:
136 136 used = 0
137 137 if head:
138 138 used += encoding.colwidth(head) + 1
139 139 if tail:
140 140 used += encoding.colwidth(tail) + 1
141 141 progwidth = termwidth - used - 3
142 142 if total and pos <= total:
143 143 amt = pos * progwidth // total
144 144 bar = '=' * (amt - 1)
145 145 if amt > 0:
146 146 bar += '>'
147 147 bar += ' ' * (progwidth - amt)
148 148 else:
149 149 progwidth -= 3
150 150 self.indetcount += 1
151 151 # mod the count by twice the width so we can make the
152 152 # cursor bounce between the right and left sides
153 153 amt = self.indetcount % (2 * progwidth)
154 154 amt -= progwidth
155 155 bar = (' ' * int(progwidth - abs(amt)) + '<=>' +
156 156 ' ' * int(abs(amt)))
157 157 prog = ''.join(('[', bar , ']'))
158 158 out = spacejoin(head, prog, tail)
159 159 else:
160 160 out = spacejoin(head, tail)
161 161 sys.stderr.write('\r' + encoding.trim(out, termwidth))
162 162 self.lasttopic = topic
163 163 sys.stderr.flush()
164 164
165 165 def clear(self):
166 if not shouldprint(self.ui):
166 if not self.printed or not self.lastprint or not shouldprint(self.ui):
167 167 return
168 168 sys.stderr.write('\r%s\r' % (' ' * self.width()))
169 169 if self.printed:
170 170 # force immediate re-paint of progress bar
171 171 self.lastprint = 0
172 172
173 173 def complete(self):
174 174 if not shouldprint(self.ui):
175 175 return
176 176 if self.ui.configbool('progress', 'clear-complete', default=True):
177 177 self.clear()
178 178 else:
179 179 sys.stderr.write('\n')
180 180 sys.stderr.flush()
181 181
182 182 def width(self):
183 183 tw = self.ui.termwidth()
184 184 return min(int(self.ui.config('progress', 'width', default=tw)), tw)
185 185
186 186 def estimate(self, topic, pos, total, now):
187 187 if total is None:
188 188 return ''
189 189 initialpos = self.startvals[topic]
190 190 target = total - initialpos
191 191 delta = pos - initialpos
192 192 if delta > 0:
193 193 elapsed = now - self.starttimes[topic]
194 194 # experimental config: progress.estimate
195 195 if elapsed > float(
196 196 self.ui.config('progress', 'estimate', default=2)):
197 197 seconds = (elapsed * (target - delta)) // delta + 1
198 198 return fmtremaining(seconds)
199 199 return ''
200 200
201 201 def speed(self, topic, pos, unit, now):
202 202 initialpos = self.startvals[topic]
203 203 delta = pos - initialpos
204 204 elapsed = now - self.starttimes[topic]
205 205 if elapsed > float(
206 206 self.ui.config('progress', 'estimate', default=2)):
207 207 return _('%d %s/sec') % (delta / elapsed, unit)
208 208 return ''
209 209
210 210 def _oktoprint(self, now):
211 211 '''Check if conditions are met to print - e.g. changedelay elapsed'''
212 212 if (self.lasttopic is None # first time we printed
213 213 # not a topic change
214 214 or self.curtopic == self.lasttopic
215 215 # it's been long enough we should print anyway
216 216 or now - self.lastprint >= self.changedelay):
217 217 return True
218 218 else:
219 219 return False
220 220
221 221 def progress(self, topic, pos, item='', unit='', total=None):
222 222 now = time.time()
223 223 self._refreshlock.acquire()
224 224 try:
225 225 if pos is None:
226 226 self.starttimes.pop(topic, None)
227 227 self.startvals.pop(topic, None)
228 228 self.topicstates.pop(topic, None)
229 229 # reset the progress bar if this is the outermost topic
230 230 if self.topics and self.topics[0] == topic and self.printed:
231 231 self.complete()
232 232 self.resetstate()
233 233 # truncate the list of topics assuming all topics within
234 234 # this one are also closed
235 235 if topic in self.topics:
236 236 self.topics = self.topics[:self.topics.index(topic)]
237 237 # reset the last topic to the one we just unwound to,
238 238 # so that higher-level topics will be stickier than
239 239 # lower-level topics
240 240 if self.topics:
241 241 self.lasttopic = self.topics[-1]
242 242 else:
243 243 self.lasttopic = None
244 244 else:
245 245 if topic not in self.topics:
246 246 self.starttimes[topic] = now
247 247 self.startvals[topic] = pos
248 248 self.topics.append(topic)
249 249 self.topicstates[topic] = pos, item, unit, total
250 250 self.curtopic = topic
251 251 if now - self.lastprint >= self.refresh and self.topics:
252 252 if self._oktoprint(now):
253 253 self.lastprint = now
254 254 self.show(now, topic, *self.topicstates[topic])
255 255 finally:
256 256 self._refreshlock.release()
@@ -1,477 +1,465 b''
1 1 $ remove() {
2 2 > hg rm $@
3 3 > echo "exit code: $?"
4 4 > hg st
5 5 > # do not use ls -R, which recurses in .hg subdirs on Mac OS X 10.5
6 6 > find . -name .hg -prune -o -type f -print | sort
7 7 > hg up -C
8 8 > }
9 9
10 10 $ cat >> $HGRCPATH <<EOF
11 11 > [progress]
12 12 > disable=False
13 13 > assume-tty = 1
14 14 > delay = 0
15 15 > # set changedelay really large so we don't see nested topics
16 16 > changedelay = 30000
17 17 > format = topic bar number
18 18 > refresh = 0
19 19 > width = 60
20 20 > EOF
21 21
22 22 $ hg init a
23 23 $ cd a
24 24 $ echo a > foo
25 25
26 26 file not managed
27 27
28 28 $ remove foo
29 29 \r (no-eol) (esc)
30 30 deleting [===========================================>] 1/1\r (no-eol) (esc)
31 31 \r (no-eol) (esc)
32 32 not removing foo: file is untracked
33 33 exit code: 1
34 34 ? foo
35 35 ./foo
36 36 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 37
38 38 $ hg add foo
39 39 $ hg commit -m1
40 40
41 41 the table cases
42 42 00 state added, options none
43 43
44 44 $ echo b > bar
45 45 $ hg add bar
46 46 $ remove bar
47 47 \r (no-eol) (esc)
48 48 deleting [===========================================>] 1/1\r (no-eol) (esc)
49 49 \r (no-eol) (esc)
50 50 \r (no-eol) (esc)
51 51 skipping [===========================================>] 1/1\r (no-eol) (esc)
52 52 \r (no-eol) (esc)
53 53 not removing bar: file has been marked for add (use forget to undo)
54 54 exit code: 1
55 55 A bar
56 56 ./bar
57 57 ./foo
58 58 \r (no-eol) (esc)
59 59 updating [===========================================>] 1/1\r (no-eol) (esc)
60 60 \r (no-eol) (esc)
61 61 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 62
63 63 01 state clean, options none
64 64
65 65 $ remove foo
66 66 \r (no-eol) (esc)
67 67 deleting [===========================================>] 1/1\r (no-eol) (esc)
68 68 \r (no-eol) (esc)
69 69 exit code: 0
70 70 R foo
71 71 ? bar
72 72 ./bar
73 73 \r (no-eol) (esc)
74 74 updating [===========================================>] 1/1\r (no-eol) (esc)
75 75 \r (no-eol) (esc)
76 76 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 77
78 78 02 state modified, options none
79 79
80 80 $ echo b >> foo
81 81 $ remove foo
82 82 \r (no-eol) (esc)
83 83 deleting [===========================================>] 1/1\r (no-eol) (esc)
84 84 \r (no-eol) (esc)
85 85 \r (no-eol) (esc)
86 86 skipping [===========================================>] 1/1\r (no-eol) (esc)
87 87 \r (no-eol) (esc)
88 88 not removing foo: file is modified (use -f to force removal)
89 89 exit code: 1
90 90 M foo
91 91 ? bar
92 92 ./bar
93 93 ./foo
94 94 \r (no-eol) (esc)
95 95 updating [===========================================>] 1/1\r (no-eol) (esc)
96 96 \r (no-eol) (esc)
97 97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 98
99 99 03 state missing, options none
100 100
101 101 $ rm foo
102 102 $ remove foo
103 103 \r (no-eol) (esc)
104 104 deleting [===========================================>] 1/1\r (no-eol) (esc)
105 105 \r (no-eol) (esc)
106 106 exit code: 0
107 107 R foo
108 108 ? bar
109 109 ./bar
110 110 \r (no-eol) (esc)
111 111 updating [===========================================>] 1/1\r (no-eol) (esc)
112 112 \r (no-eol) (esc)
113 113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 114
115 115 10 state added, options -f
116 116
117 117 $ echo b > bar
118 118 $ hg add bar
119 119 $ remove -f bar
120 120 \r (no-eol) (esc)
121 121 deleting [===========================================>] 1/1\r (no-eol) (esc)
122 122 \r (no-eol) (esc)
123 123 exit code: 0
124 124 ? bar
125 125 ./bar
126 126 ./foo
127 127 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
128 128 $ rm bar
129 129
130 130 11 state clean, options -f
131 131
132 132 $ remove -f foo
133 133 \r (no-eol) (esc)
134 134 deleting [===========================================>] 1/1\r (no-eol) (esc)
135 135 \r (no-eol) (esc)
136 136 exit code: 0
137 137 R foo
138 138 \r (no-eol) (esc)
139 139 updating [===========================================>] 1/1\r (no-eol) (esc)
140 140 \r (no-eol) (esc)
141 141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
142 142
143 143 12 state modified, options -f
144 144
145 145 $ echo b >> foo
146 146 $ remove -f foo
147 147 \r (no-eol) (esc)
148 148 deleting [===========================================>] 1/1\r (no-eol) (esc)
149 149 \r (no-eol) (esc)
150 150 exit code: 0
151 151 R foo
152 152 \r (no-eol) (esc)
153 153 updating [===========================================>] 1/1\r (no-eol) (esc)
154 154 \r (no-eol) (esc)
155 155 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
156 156
157 157 13 state missing, options -f
158 158
159 159 $ rm foo
160 160 $ remove -f foo
161 161 \r (no-eol) (esc)
162 162 deleting [===========================================>] 1/1\r (no-eol) (esc)
163 163 \r (no-eol) (esc)
164 164 exit code: 0
165 165 R foo
166 166 \r (no-eol) (esc)
167 167 updating [===========================================>] 1/1\r (no-eol) (esc)
168 168 \r (no-eol) (esc)
169 169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 170
171 171 20 state added, options -A
172 172
173 173 $ echo b > bar
174 174 $ hg add bar
175 175 $ remove -A bar
176 176 \r (no-eol) (esc)
177 177 deleting [===========================================>] 1/1\r (no-eol) (esc)
178 178 \r (no-eol) (esc)
179 179 \r (no-eol) (esc)
180 180 skipping [===========================================>] 1/1\r (no-eol) (esc)
181 181 \r (no-eol) (esc)
182 182 not removing bar: file still exists
183 183 exit code: 1
184 184 A bar
185 185 ./bar
186 186 ./foo
187 187 \r (no-eol) (esc)
188 188 updating [===========================================>] 1/1\r (no-eol) (esc)
189 189 \r (no-eol) (esc)
190 190 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 191
192 192 21 state clean, options -A
193 193
194 194 $ remove -A foo
195 195 \r (no-eol) (esc)
196 196 deleting [===========================================>] 1/1\r (no-eol) (esc)
197 197 \r (no-eol) (esc)
198 198 \r (no-eol) (esc)
199 199 skipping [===========================================>] 1/1\r (no-eol) (esc)
200 200 \r (no-eol) (esc)
201 201 not removing foo: file still exists
202 202 exit code: 1
203 203 ? bar
204 204 ./bar
205 205 ./foo
206 206 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
207 207
208 208 22 state modified, options -A
209 209
210 210 $ echo b >> foo
211 211 $ remove -A foo
212 212 \r (no-eol) (esc)
213 213 deleting [===========================================>] 1/1\r (no-eol) (esc)
214 214 \r (no-eol) (esc)
215 215 \r (no-eol) (esc)
216 216 skipping [===========================================>] 1/1\r (no-eol) (esc)
217 217 \r (no-eol) (esc)
218 218 not removing foo: file still exists
219 219 exit code: 1
220 220 M foo
221 221 ? bar
222 222 ./bar
223 223 ./foo
224 224 \r (no-eol) (esc)
225 225 updating [===========================================>] 1/1\r (no-eol) (esc)
226 226 \r (no-eol) (esc)
227 227 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 228
229 229 23 state missing, options -A
230 230
231 231 $ rm foo
232 232 $ remove -A foo
233 233 \r (no-eol) (esc)
234 234 deleting [===========================================>] 1/1\r (no-eol) (esc)
235 235 \r (no-eol) (esc)
236 236 exit code: 0
237 237 R foo
238 238 ? bar
239 239 ./bar
240 240 \r (no-eol) (esc)
241 241 updating [===========================================>] 1/1\r (no-eol) (esc)
242 242 \r (no-eol) (esc)
243 243 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 244
245 245 30 state added, options -Af
246 246
247 247 $ echo b > bar
248 248 $ hg add bar
249 249 $ remove -Af bar
250 250 \r (no-eol) (esc)
251 251 deleting [===========================================>] 1/1\r (no-eol) (esc)
252 252 \r (no-eol) (esc)
253 253 exit code: 0
254 254 ? bar
255 255 ./bar
256 256 ./foo
257 257 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 258 $ rm bar
259 259
260 260 31 state clean, options -Af
261 261
262 262 $ remove -Af foo
263 263 \r (no-eol) (esc)
264 264 deleting [===========================================>] 1/1\r (no-eol) (esc)
265 265 \r (no-eol) (esc)
266 266 exit code: 0
267 267 R foo
268 268 ./foo
269 269 \r (no-eol) (esc)
270 270 updating [===========================================>] 1/1\r (no-eol) (esc)
271 271 \r (no-eol) (esc)
272 272 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
273 273
274 274 32 state modified, options -Af
275 275
276 276 $ echo b >> foo
277 277 $ remove -Af foo
278 278 \r (no-eol) (esc)
279 279 deleting [===========================================>] 1/1\r (no-eol) (esc)
280 280 \r (no-eol) (esc)
281 281 exit code: 0
282 282 R foo
283 283 ./foo
284 284 \r (no-eol) (esc)
285 285 updating [===========================================>] 1/1\r (no-eol) (esc)
286 286 \r (no-eol) (esc)
287 287 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
288 288
289 289 33 state missing, options -Af
290 290
291 291 $ rm foo
292 292 $ remove -Af foo
293 293 \r (no-eol) (esc)
294 294 deleting [===========================================>] 1/1\r (no-eol) (esc)
295 295 \r (no-eol) (esc)
296 296 exit code: 0
297 297 R foo
298 298 \r (no-eol) (esc)
299 299 updating [===========================================>] 1/1\r (no-eol) (esc)
300 300 \r (no-eol) (esc)
301 301 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
302 302
303 303 test some directory stuff
304 304
305 305 $ mkdir test
306 306 $ echo a > test/foo
307 307 $ echo b > test/bar
308 308 $ hg ci -Am2
309 309 adding test/bar
310 310 adding test/foo
311 311
312 312 dir, options none
313 313
314 314 $ rm test/bar
315 315 $ remove test
316 316 \r (no-eol) (esc)
317 317 deleting [===========================================>] 1/1\r (no-eol) (esc)
318 318 \r (no-eol) (esc)
319 319 \r (no-eol) (esc)
320 320 deleting [=====================> ] 1/2\r (no-eol) (esc)
321 321 \r (no-eol) (esc)
322 322 \r (no-eol) (esc)
323 323 deleting [===========================================>] 2/2\r (no-eol) (esc)
324 324 \r (no-eol) (esc)
325 \r (no-eol) (esc)
326 \r (no-eol) (esc)
327 325 removing test/bar (glob)
328 326 removing test/foo (glob)
329 327 exit code: 0
330 328 R test/bar
331 329 R test/foo
332 330 ./foo
333 331 \r (no-eol) (esc)
334 332 updating [===========================================>] 2/2\r (no-eol) (esc)
335 333 \r (no-eol) (esc)
336 334 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
337 335
338 336 dir, options -f
339 337
340 338 $ rm test/bar
341 339 $ remove -f test
342 340 \r (no-eol) (esc)
343 341 deleting [===========================================>] 1/1\r (no-eol) (esc)
344 342 \r (no-eol) (esc)
345 343 \r (no-eol) (esc)
346 344 deleting [=====================> ] 1/2\r (no-eol) (esc)
347 345 \r (no-eol) (esc)
348 346 \r (no-eol) (esc)
349 347 deleting [===========================================>] 2/2\r (no-eol) (esc)
350 348 \r (no-eol) (esc)
351 \r (no-eol) (esc)
352 \r (no-eol) (esc)
353 349 removing test/bar (glob)
354 350 removing test/foo (glob)
355 351 exit code: 0
356 352 R test/bar
357 353 R test/foo
358 354 ./foo
359 355 \r (no-eol) (esc)
360 356 updating [===========================================>] 2/2\r (no-eol) (esc)
361 357 \r (no-eol) (esc)
362 358 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
363 359
364 360 dir, options -A
365 361
366 362 $ rm test/bar
367 363 $ remove -A test
368 364 \r (no-eol) (esc)
369 365 deleting [===========================================>] 1/1\r (no-eol) (esc)
370 366 \r (no-eol) (esc)
371 367 \r (no-eol) (esc)
372 368 skipping [===========================================>] 1/1\r (no-eol) (esc)
373 369 \r (no-eol) (esc)
374 370 \r (no-eol) (esc)
375 371 deleting [===========================================>] 1/1\r (no-eol) (esc)
376 372 \r (no-eol) (esc)
377 \r (no-eol) (esc)
378 \r (no-eol) (esc)
379 373 removing test/bar (glob)
380 374 not removing test/foo: file still exists (glob)
381 375 exit code: 1
382 376 R test/bar
383 377 ./foo
384 378 ./test/foo
385 379 \r (no-eol) (esc)
386 380 updating [===========================================>] 1/1\r (no-eol) (esc)
387 381 \r (no-eol) (esc)
388 382 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
389 383
390 384 dir, options -Af
391 385
392 386 $ rm test/bar
393 387 $ remove -Af test
394 388 \r (no-eol) (esc)
395 389 deleting [===========================================>] 1/1\r (no-eol) (esc)
396 390 \r (no-eol) (esc)
397 391 \r (no-eol) (esc)
398 392 deleting [=====================> ] 1/2\r (no-eol) (esc)
399 393 \r (no-eol) (esc)
400 394 \r (no-eol) (esc)
401 395 deleting [===========================================>] 2/2\r (no-eol) (esc)
402 396 \r (no-eol) (esc)
403 \r (no-eol) (esc)
404 \r (no-eol) (esc)
405 397 removing test/bar (glob)
406 398 removing test/foo (glob)
407 399 exit code: 0
408 400 R test/bar
409 401 R test/foo
410 402 ./foo
411 403 ./test/foo
412 404 \r (no-eol) (esc)
413 405 updating [===========================================>] 2/2\r (no-eol) (esc)
414 406 \r (no-eol) (esc)
415 407 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
416 408
417 409 test remove dropping empty trees (issue1861)
418 410
419 411 $ mkdir -p issue1861/b/c
420 412 $ echo x > issue1861/x
421 413 $ echo y > issue1861/b/c/y
422 414 $ hg ci -Am add
423 415 adding issue1861/b/c/y
424 416 adding issue1861/x
425 417 $ hg rm issue1861/b
426 418 \r (no-eol) (esc)
427 419 deleting [===========================================>] 1/1\r (no-eol) (esc)
428 420 \r (no-eol) (esc)
429 421 \r (no-eol) (esc)
430 422 deleting [===========================================>] 1/1\r (no-eol) (esc)
431 423 \r (no-eol) (esc)
432 \r (no-eol) (esc)
433 \r (no-eol) (esc)
434 424 removing issue1861/b/c/y (glob)
435 425 $ hg ci -m remove
436 426 $ ls issue1861
437 427 x
438 428
439 429 test that commit does not crash if the user removes a newly added file
440 430
441 431 $ touch f1
442 432 $ hg add f1
443 433 $ rm f1
444 434 $ hg ci -A -mx
445 435 removing f1
446 436 nothing changed
447 437 [1]
448 438
449 439 handling of untracked directories and missing files
450 440
451 441 $ mkdir d1
452 442 $ echo a > d1/a
453 443 $ hg rm --after d1
454 444 \r (no-eol) (esc)
455 445 deleting [===========================================>] 1/1\r (no-eol) (esc)
456 446 \r (no-eol) (esc)
457 447 not removing d1: no tracked files
458 448 [1]
459 449 $ hg add d1/a
460 450 $ rm d1/a
461 451 $ hg rm --after d1
462 452 \r (no-eol) (esc)
463 453 deleting [===========================================>] 1/1\r (no-eol) (esc)
464 454 \r (no-eol) (esc)
465 455 \r (no-eol) (esc)
466 456 deleting [===========================================>] 1/1\r (no-eol) (esc)
467 457 \r (no-eol) (esc)
468 \r (no-eol) (esc)
469 \r (no-eol) (esc)
470 458 removing d1/a (glob)
471 459
472 460 $ hg rm --after nosuch
473 461 nosuch: * (glob)
474 462 \r (no-eol) (esc)
475 463 deleting [===========================================>] 1/1\r (no-eol) (esc)
476 464 \r (no-eol) (esc)
477 465 [1]
@@ -1,1099 +1,1097 b''
1 1 $ cat >> $HGRCPATH <<EOF
2 2 > [extdiff]
3 3 > # for portability:
4 4 > pdiff = sh "$RUNTESTDIR/pdiff"
5 5 > [progress]
6 6 > disable=False
7 7 > assume-tty = 1
8 8 > delay = 0
9 9 > # set changedelay really large so we don't see nested topics
10 10 > changedelay = 30000
11 11 > format = topic bar number
12 12 > refresh = 0
13 13 > width = 60
14 14 > EOF
15 15
16 16 Preparing the subrepository 'sub2'
17 17
18 18 $ hg init sub2
19 19 $ echo sub2 > sub2/sub2
20 20 $ hg add -R sub2
21 21 adding sub2/sub2 (glob)
22 22 $ hg commit -R sub2 -m "sub2 import"
23 23
24 24 Preparing the 'sub1' repo which depends on the subrepo 'sub2'
25 25
26 26 $ hg init sub1
27 27 $ echo sub1 > sub1/sub1
28 28 $ echo "sub2 = ../sub2" > sub1/.hgsub
29 29 $ hg clone sub2 sub1/sub2
30 30 \r (no-eol) (esc)
31 31 linking [ <=> ] 1\r (no-eol) (esc)
32 32 linking [ <=> ] 2\r (no-eol) (esc)
33 33 linking [ <=> ] 3\r (no-eol) (esc)
34 34 linking [ <=> ] 4\r (no-eol) (esc)
35 35 linking [ <=> ] 5\r (no-eol) (esc)
36 36 linking [ <=> ] 6\r (no-eol) (esc)
37 37 \r (no-eol) (esc)
38 38 \r (no-eol) (esc)
39 39 updating [===========================================>] 1/1\r (no-eol) (esc)
40 40 \r (no-eol) (esc)
41 41 updating to branch default
42 42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 43 $ hg add -R sub1
44 44 adding sub1/.hgsub (glob)
45 45 adding sub1/sub1 (glob)
46 46 $ hg commit -R sub1 -m "sub1 import"
47 47
48 48 Preparing the 'main' repo which depends on the subrepo 'sub1'
49 49
50 50 $ hg init main
51 51 $ echo main > main/main
52 52 $ echo "sub1 = ../sub1" > main/.hgsub
53 53 $ hg clone sub1 main/sub1
54 54 \r (no-eol) (esc)
55 55 linking [ <=> ] 1\r (no-eol) (esc)
56 56 linking [ <=> ] 2\r (no-eol) (esc)
57 57 linking [ <=> ] 3\r (no-eol) (esc)
58 58 linking [ <=> ] 4\r (no-eol) (esc)
59 59 linking [ <=> ] 5\r (no-eol) (esc)
60 60 linking [ <=> ] 6\r (no-eol) (esc)
61 61 linking [ <=> ] 7\r (no-eol) (esc)
62 62 linking [ <=> ] 8\r (no-eol) (esc)
63 63 \r (no-eol) (esc)
64 64 \r (no-eol) (esc)
65 65 updating [===========================================>] 3/3\r (no-eol) (esc)
66 66 updating [===========================================>] 1/1\r (no-eol) (esc)
67 67 \r (no-eol) (esc)
68 68 updating to branch default
69 69 cloning subrepo sub2 from $TESTTMP/sub2
70 70 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 71 $ hg add -R main
72 72 adding main/.hgsub (glob)
73 73 adding main/main (glob)
74 74 $ hg commit -R main -m "main import"
75 75
76 76 Cleaning both repositories, just as a clone -U
77 77
78 78 $ hg up -C -R sub2 null
79 79 \r (no-eol) (esc)
80 80 updating [===========================================>] 1/1\r (no-eol) (esc)
81 81 \r (no-eol) (esc)
82 82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
83 83 $ hg up -C -R sub1 null
84 84 \r (no-eol) (esc)
85 85 updating [===========================================>] 1/1\r (no-eol) (esc)
86 86 \r (no-eol) (esc)
87 87 \r (no-eol) (esc)
88 88 updating [===========================================>] 3/3\r (no-eol) (esc)
89 89 \r (no-eol) (esc)
90 90 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
91 91 $ hg up -C -R main null
92 92 \r (no-eol) (esc)
93 93 updating [===========================================>] 1/1\r (no-eol) (esc)
94 94 \r (no-eol) (esc)
95 95 \r (no-eol) (esc)
96 96 updating [===========================================>] 3/3\r (no-eol) (esc)
97 97 \r (no-eol) (esc)
98 98 \r (no-eol) (esc)
99 99 updating [===========================================>] 3/3\r (no-eol) (esc)
100 100 \r (no-eol) (esc)
101 101 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
102 102 $ rm -rf main/sub1
103 103 $ rm -rf sub1/sub2
104 104
105 105 Clone main
106 106
107 107 $ hg --config extensions.largefiles= clone main cloned
108 108 \r (no-eol) (esc)
109 109 linking [ <=> ] 1\r (no-eol) (esc)
110 110 linking [ <=> ] 2\r (no-eol) (esc)
111 111 linking [ <=> ] 3\r (no-eol) (esc)
112 112 linking [ <=> ] 4\r (no-eol) (esc)
113 113 linking [ <=> ] 5\r (no-eol) (esc)
114 114 linking [ <=> ] 6\r (no-eol) (esc)
115 115 linking [ <=> ] 7\r (no-eol) (esc)
116 116 linking [ <=> ] 8\r (no-eol) (esc)
117 117 \r (no-eol) (esc)
118 118 \r (no-eol) (esc)
119 119 updating [===========================================>] 3/3\r (no-eol) (esc)
120 120 updating [===========================================>] 3/3\r (no-eol) (esc)
121 121 updating [===========================================>] 1/1\r (no-eol) (esc)
122 122 \r (no-eol) (esc)
123 123 updating to branch default
124 124 cloning subrepo sub1 from $TESTTMP/sub1
125 125 cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob)
126 126 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 127
128 128 Largefiles is NOT enabled in the clone if the source repo doesn't require it
129 129 $ cat cloned/.hg/hgrc
130 130 # example repository config (see "hg help config" for more info)
131 131 [paths]
132 132 default = $TESTTMP/main (glob)
133 133
134 134 # path aliases to other clones of this repo in URLs or filesystem paths
135 135 # (see "hg help config.paths" for more info)
136 136 #
137 137 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
138 138 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
139 139 # my-clone = /home/jdoe/jdoes-clone
140 140
141 141 [ui]
142 142 # name and email (local to this repository, optional), e.g.
143 143 # username = Jane Doe <jdoe@example.com>
144 144
145 145 Checking cloned repo ids
146 146
147 147 $ printf "cloned " ; hg id -R cloned
148 148 cloned 7f491f53a367 tip
149 149 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
150 150 cloned/sub1 fc3b4ce2696f tip
151 151 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
152 152 cloned/sub1/sub2 c57a0840e3ba tip
153 153
154 154 debugsub output for main and sub1
155 155
156 156 $ hg debugsub -R cloned
157 157 path sub1
158 158 source ../sub1
159 159 revision fc3b4ce2696f7741438c79207583768f2ce6b0dd
160 160 $ hg debugsub -R cloned/sub1
161 161 path sub2
162 162 source ../sub2
163 163 revision c57a0840e3badd667ef3c3ef65471609acb2ba3c
164 164
165 165 Modifying deeply nested 'sub2'
166 166
167 167 $ echo modified > cloned/sub1/sub2/sub2
168 168 $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
169 169 committing subrepository sub1
170 170 committing subrepository sub1/sub2 (glob)
171 171
172 172 Checking modified node ids
173 173
174 174 $ printf "cloned " ; hg id -R cloned
175 175 cloned ffe6649062fe tip
176 176 $ printf "cloned/sub1 " ; hg id -R cloned/sub1
177 177 cloned/sub1 2ecb03bf44a9 tip
178 178 $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2
179 179 cloned/sub1/sub2 53dd3430bcaf tip
180 180
181 181 debugsub output for main and sub1
182 182
183 183 $ hg debugsub -R cloned
184 184 path sub1
185 185 source ../sub1
186 186 revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9
187 187 $ hg debugsub -R cloned/sub1
188 188 path sub2
189 189 source ../sub2
190 190 revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
191 191
192 192 Check that deep archiving works
193 193
194 194 $ cd cloned
195 195 $ echo 'test' > sub1/sub2/test.txt
196 196 $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
197 197 $ mkdir sub1/sub2/folder
198 198 $ echo 'subfolder' > sub1/sub2/folder/test.txt
199 199 $ hg ci -ASm "add test.txt"
200 200 adding sub1/sub2/folder/test.txt
201 201 committing subrepository sub1
202 202 committing subrepository sub1/sub2 (glob)
203 203
204 204 .. but first take a detour through some deep removal testing
205 205
206 206 $ hg remove -S -I 're:.*.txt' .
207 207 \r (no-eol) (esc)
208 208 searching [==========================================>] 1/1\r (no-eol) (esc)
209 209 searching [==========================================>] 1/1\r (no-eol) (esc)
210 210 \r (no-eol) (esc)
211 211 \r (no-eol) (esc)
212 212 deleting [=====================> ] 1/2\r (no-eol) (esc)
213 213 \r (no-eol) (esc)
214 214 \r (no-eol) (esc)
215 215 deleting [===========================================>] 2/2\r (no-eol) (esc)
216 216 \r (no-eol) (esc)
217 \r (no-eol) (esc)
218 \r (no-eol) (esc)
219 217 removing sub1/sub2/folder/test.txt (glob)
220 218 removing sub1/sub2/test.txt (glob)
221 219 $ hg status -S
222 220 R sub1/sub2/folder/test.txt
223 221 R sub1/sub2/test.txt
224 222 $ hg update -Cq
225 223 $ hg remove -I 're:.*.txt' sub1
226 224 \r (no-eol) (esc)
227 225 searching [==========================================>] 1/1\r (no-eol) (esc)
228 226 \r (no-eol) (esc)
229 227 \r (no-eol) (esc)
230 228 deleting [===========================================>] 1/1\r (no-eol) (esc)
231 229 \r (no-eol) (esc)
232 230 $ hg status -S
233 231 $ hg remove sub1/sub2/folder/test.txt
234 232 \r (no-eol) (esc)
235 233 searching [==========================================>] 1/1\r (no-eol) (esc)
236 234 searching [==========================================>] 1/1\r (no-eol) (esc)
237 235 \r (no-eol) (esc)
238 236 \r (no-eol) (esc)
239 237 deleting [===========================================>] 1/1\r (no-eol) (esc)
240 238 \r (no-eol) (esc)
241 239 \r (no-eol) (esc)
242 240 deleting [===========================================>] 1/1\r (no-eol) (esc)
243 241 \r (no-eol) (esc)
244 242 \r (no-eol) (esc)
245 243 deleting [===========================================>] 1/1\r (no-eol) (esc)
246 244 \r (no-eol) (esc)
247 245 $ hg remove sub1/.hgsubstate
248 246 \r (no-eol) (esc)
249 247 searching [==========================================>] 1/1\r (no-eol) (esc)
250 248 \r (no-eol) (esc)
251 249 \r (no-eol) (esc)
252 250 deleting [===========================================>] 1/1\r (no-eol) (esc)
253 251 \r (no-eol) (esc)
254 252 \r (no-eol) (esc)
255 253 deleting [===========================================>] 1/1\r (no-eol) (esc)
256 254 \r (no-eol) (esc)
257 255 $ mv sub1/.hgsub sub1/x.hgsub
258 256 $ hg status -S
259 257 warning: subrepo spec file 'sub1/.hgsub' not found
260 258 R sub1/.hgsubstate
261 259 R sub1/sub2/folder/test.txt
262 260 ! sub1/.hgsub
263 261 ? sub1/x.hgsub
264 262 $ mv sub1/x.hgsub sub1/.hgsub
265 263 $ hg update -Cq
266 264 $ touch sub1/foo
267 265 $ hg forget sub1/sub2/folder/test.txt
268 266 $ rm sub1/sub2/test.txt
269 267
270 268 Test relative path printing + subrepos
271 269 $ mkdir -p foo/bar
272 270 $ cd foo
273 271 $ touch bar/abc
274 272 $ hg addremove -S ..
275 273 \r (no-eol) (esc)
276 274 searching for exact renames [ ] 0/1\r (no-eol) (esc)
277 275 \r (no-eol) (esc)
278 276 adding ../sub1/sub2/folder/test.txt (glob)
279 277 removing ../sub1/sub2/test.txt (glob)
280 278 adding ../sub1/foo (glob)
281 279 adding bar/abc (glob)
282 280 $ cd ..
283 281 $ hg status -S
284 282 A foo/bar/abc
285 283 A sub1/foo
286 284 R sub1/sub2/test.txt
287 285
288 286 Archive wdir() with subrepos
289 287 $ hg rm main
290 288 \r (no-eol) (esc)
291 289 deleting [===========================================>] 1/1\r (no-eol) (esc)
292 290 \r (no-eol) (esc)
293 291 $ hg archive -S -r 'wdir()' ../wdir
294 292 \r (no-eol) (esc)
295 293 archiving [ ] 0/3\r (no-eol) (esc)
296 294 archiving [=============> ] 1/3\r (no-eol) (esc)
297 295 archiving [===========================> ] 2/3\r (no-eol) (esc)
298 296 archiving [==========================================>] 3/3\r (no-eol) (esc)
299 297 \r (no-eol) (esc)
300 298 \r (no-eol) (esc)
301 299 archiving (sub1) [ ] 0/4\r (no-eol) (esc)
302 300 archiving (sub1) [========> ] 1/4\r (no-eol) (esc)
303 301 archiving (sub1) [=================> ] 2/4\r (no-eol) (esc)
304 302 archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc)
305 303 archiving (sub1) [===================================>] 4/4\r (no-eol) (esc)
306 304 \r (no-eol) (esc)
307 305 \r (no-eol) (esc)
308 306 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
309 307 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
310 308 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
311 309 \r (no-eol) (esc)
312 310 $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:'
313 311 Only in ../wdir: .hg_archival.txt
314 312
315 313 $ find ../wdir -type f | sort
316 314 ../wdir/.hg_archival.txt
317 315 ../wdir/.hgsub
318 316 ../wdir/.hgsubstate
319 317 ../wdir/foo/bar/abc
320 318 ../wdir/sub1/.hgsub
321 319 ../wdir/sub1/.hgsubstate
322 320 ../wdir/sub1/foo
323 321 ../wdir/sub1/sub1
324 322 ../wdir/sub1/sub2/folder/test.txt
325 323 ../wdir/sub1/sub2/sub2
326 324
327 325 $ cat ../wdir/.hg_archival.txt
328 326 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
329 327 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+
330 328 branch: default
331 329 latesttag: null
332 330 latesttagdistance: 4
333 331 changessincelatesttag: 4
334 332
335 333 Attempting to archive 'wdir()' with a missing file is handled gracefully
336 334 $ rm sub1/sub1
337 335 $ rm -r ../wdir
338 336 $ hg archive -v -S -r 'wdir()' ../wdir
339 337 \r (no-eol) (esc)
340 338 archiving [ ] 0/3\r (no-eol) (esc)
341 339 archiving [=============> ] 1/3\r (no-eol) (esc)
342 340 archiving [===========================> ] 2/3\r (no-eol) (esc)
343 341 archiving [==========================================>] 3/3\r (no-eol) (esc)
344 342 \r (no-eol) (esc)
345 343 \r (no-eol) (esc)
346 344 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
347 345 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
348 346 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
349 347 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
350 348 \r (no-eol) (esc)
351 349 \r (no-eol) (esc)
352 350 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
353 351 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
354 352 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
355 353 \r (no-eol) (esc)
356 354 $ find ../wdir -type f | sort
357 355 ../wdir/.hg_archival.txt
358 356 ../wdir/.hgsub
359 357 ../wdir/.hgsubstate
360 358 ../wdir/foo/bar/abc
361 359 ../wdir/sub1/.hgsub
362 360 ../wdir/sub1/.hgsubstate
363 361 ../wdir/sub1/foo
364 362 ../wdir/sub1/sub2/folder/test.txt
365 363 ../wdir/sub1/sub2/sub2
366 364
367 365 Continue relative path printing + subrepos
368 366 $ hg update -Cq
369 367 $ rm -r ../wdir
370 368 $ hg archive -S -r 'wdir()' ../wdir
371 369 \r (no-eol) (esc)
372 370 archiving [ ] 0/3\r (no-eol) (esc)
373 371 archiving [=============> ] 1/3\r (no-eol) (esc)
374 372 archiving [===========================> ] 2/3\r (no-eol) (esc)
375 373 archiving [==========================================>] 3/3\r (no-eol) (esc)
376 374 \r (no-eol) (esc)
377 375 \r (no-eol) (esc)
378 376 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
379 377 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
380 378 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
381 379 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
382 380 \r (no-eol) (esc)
383 381 \r (no-eol) (esc)
384 382 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
385 383 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
386 384 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
387 385 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
388 386 \r (no-eol) (esc)
389 387 $ cat ../wdir/.hg_archival.txt
390 388 repo: 7f491f53a367861f47ee64a80eb997d1f341b77a
391 389 node: 9bb10eebee29dc0f1201dcf5977b811a540255fd
392 390 branch: default
393 391 latesttag: null
394 392 latesttagdistance: 4
395 393 changessincelatesttag: 4
396 394
397 395 $ touch sub1/sub2/folder/bar
398 396 $ hg addremove sub1/sub2
399 397 adding sub1/sub2/folder/bar (glob)
400 398 $ hg status -S
401 399 A sub1/sub2/folder/bar
402 400 ? foo/bar/abc
403 401 ? sub1/foo
404 402 $ hg update -Cq
405 403 $ hg addremove sub1
406 404 adding sub1/sub2/folder/bar (glob)
407 405 adding sub1/foo (glob)
408 406 $ hg update -Cq
409 407 $ rm sub1/sub2/folder/test.txt
410 408 $ rm sub1/sub2/test.txt
411 409 $ hg ci -ASm "remove test.txt"
412 410 adding sub1/sub2/folder/bar
413 411 removing sub1/sub2/folder/test.txt
414 412 removing sub1/sub2/test.txt
415 413 adding sub1/foo
416 414 adding foo/bar/abc
417 415 committing subrepository sub1
418 416 committing subrepository sub1/sub2 (glob)
419 417
420 418 $ hg forget sub1/sub2/sub2
421 419 $ echo x > sub1/sub2/x.txt
422 420 $ hg add sub1/sub2/x.txt
423 421
424 422 Files sees uncommitted adds and removes in subrepos
425 423 $ hg files -S
426 424 .hgsub
427 425 .hgsubstate
428 426 foo/bar/abc (glob)
429 427 main
430 428 sub1/.hgsub (glob)
431 429 sub1/.hgsubstate (glob)
432 430 sub1/foo (glob)
433 431 sub1/sub1 (glob)
434 432 sub1/sub2/folder/bar (glob)
435 433 sub1/sub2/x.txt (glob)
436 434
437 435 $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')"
438 436 .hgsub
439 437 .hgsubstate
440 438 foo/bar/abc (glob)
441 439 main
442 440 sub1/.hgsub (glob)
443 441 sub1/.hgsubstate (glob)
444 442 sub1/foo (glob)
445 443 sub1/sub1 (glob)
446 444 sub1/sub2/folder/bar (glob)
447 445 sub1/sub2/x.txt (glob)
448 446
449 447 $ hg files -r '.^' -S "set:eol('dos') or eol('unix')"
450 448 .hgsub
451 449 .hgsubstate
452 450 main
453 451 sub1/.hgsub (glob)
454 452 sub1/.hgsubstate (glob)
455 453 sub1/sub1 (glob)
456 454 sub1/sub2/folder/test.txt (glob)
457 455 sub1/sub2/sub2 (glob)
458 456 sub1/sub2/test.txt (glob)
459 457
460 458 $ hg files sub1
461 459 sub1/.hgsub (glob)
462 460 sub1/.hgsubstate (glob)
463 461 sub1/foo (glob)
464 462 sub1/sub1 (glob)
465 463 sub1/sub2/folder/bar (glob)
466 464 sub1/sub2/x.txt (glob)
467 465
468 466 $ hg files sub1/sub2
469 467 sub1/sub2/folder/bar (glob)
470 468 sub1/sub2/x.txt (glob)
471 469
472 470 $ hg files
473 471 .hgsub
474 472 .hgsubstate
475 473 foo/bar/abc (glob)
476 474 main
477 475
478 476 $ hg files -S -r '.^' sub1/sub2/folder
479 477 sub1/sub2/folder/test.txt (glob)
480 478
481 479 $ hg files -S -r '.^' sub1/sub2/missing
482 480 sub1/sub2/missing: no such file in rev 78026e779ea6 (glob)
483 481 [1]
484 482
485 483 $ hg files -r '.^' sub1/
486 484 sub1/.hgsub (glob)
487 485 sub1/.hgsubstate (glob)
488 486 sub1/sub1 (glob)
489 487 sub1/sub2/folder/test.txt (glob)
490 488 sub1/sub2/sub2 (glob)
491 489 sub1/sub2/test.txt (glob)
492 490
493 491 $ hg files -r '.^' sub1/sub2
494 492 sub1/sub2/folder/test.txt (glob)
495 493 sub1/sub2/sub2 (glob)
496 494 sub1/sub2/test.txt (glob)
497 495
498 496 $ hg rollback -q
499 497 $ hg up -Cq
500 498
501 499 $ hg --config extensions.largefiles=! archive -S ../archive_all
502 500 \r (no-eol) (esc)
503 501 archiving [ ] 0/3\r (no-eol) (esc)
504 502 archiving [=============> ] 1/3\r (no-eol) (esc)
505 503 archiving [===========================> ] 2/3\r (no-eol) (esc)
506 504 archiving [==========================================>] 3/3\r (no-eol) (esc)
507 505 \r (no-eol) (esc)
508 506 \r (no-eol) (esc)
509 507 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
510 508 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
511 509 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
512 510 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
513 511 \r (no-eol) (esc)
514 512 \r (no-eol) (esc)
515 513 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
516 514 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
517 515 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
518 516 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
519 517 \r (no-eol) (esc)
520 518 $ find ../archive_all | sort
521 519 ../archive_all
522 520 ../archive_all/.hg_archival.txt
523 521 ../archive_all/.hgsub
524 522 ../archive_all/.hgsubstate
525 523 ../archive_all/main
526 524 ../archive_all/sub1
527 525 ../archive_all/sub1/.hgsub
528 526 ../archive_all/sub1/.hgsubstate
529 527 ../archive_all/sub1/sub1
530 528 ../archive_all/sub1/sub2
531 529 ../archive_all/sub1/sub2/folder
532 530 ../archive_all/sub1/sub2/folder/test.txt
533 531 ../archive_all/sub1/sub2/sub2
534 532 ../archive_all/sub1/sub2/test.txt
535 533
536 534 Check that archive -X works in deep subrepos
537 535
538 536 $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
539 537 \r (no-eol) (esc)
540 538 archiving [ ] 0/3\r (no-eol) (esc)
541 539 archiving [=============> ] 1/3\r (no-eol) (esc)
542 540 archiving [===========================> ] 2/3\r (no-eol) (esc)
543 541 archiving [==========================================>] 3/3\r (no-eol) (esc)
544 542 \r (no-eol) (esc)
545 543 \r (no-eol) (esc)
546 544 archiving (sub1) [ ] 0/3\r (no-eol) (esc)
547 545 archiving (sub1) [===========> ] 1/3\r (no-eol) (esc)
548 546 archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc)
549 547 archiving (sub1) [===================================>] 3/3\r (no-eol) (esc)
550 548 \r (no-eol) (esc)
551 549 \r (no-eol) (esc)
552 550 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
553 551 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
554 552 \r (no-eol) (esc)
555 553 $ find ../archive_exclude | sort
556 554 ../archive_exclude
557 555 ../archive_exclude/.hg_archival.txt
558 556 ../archive_exclude/.hgsub
559 557 ../archive_exclude/.hgsubstate
560 558 ../archive_exclude/main
561 559 ../archive_exclude/sub1
562 560 ../archive_exclude/sub1/.hgsub
563 561 ../archive_exclude/sub1/.hgsubstate
564 562 ../archive_exclude/sub1/sub1
565 563 ../archive_exclude/sub1/sub2
566 564 ../archive_exclude/sub1/sub2/sub2
567 565
568 566 $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
569 567 \r (no-eol) (esc)
570 568 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
571 569 \r (no-eol) (esc)
572 570 \r (no-eol) (esc)
573 571 archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc)
574 572 archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc)
575 573 archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc)
576 574 \r (no-eol) (esc)
577 575 $ find ../archive_include | sort
578 576 ../archive_include
579 577 ../archive_include/sub1
580 578 ../archive_include/sub1/sub2
581 579 ../archive_include/sub1/sub2/folder
582 580 ../archive_include/sub1/sub2/folder/test.txt
583 581 ../archive_include/sub1/sub2/test.txt
584 582
585 583 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
586 584 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
587 585 subrepos are archived properly.
588 586 Note that add --large through a subrepo currently adds the file as a normal file
589 587
590 588 $ echo "large" > sub1/sub2/large.bin
591 589 $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
592 590 $ echo "large" > large.bin
593 591 $ hg --config extensions.largefiles= add --large large.bin
594 592 $ hg --config extensions.largefiles= ci -S -m "add large files"
595 593 committing subrepository sub1
596 594 committing subrepository sub1/sub2 (glob)
597 595
598 596 $ hg --config extensions.largefiles= archive -S ../archive_lf
599 597 $ find ../archive_lf | sort
600 598 ../archive_lf
601 599 ../archive_lf/.hg_archival.txt
602 600 ../archive_lf/.hgsub
603 601 ../archive_lf/.hgsubstate
604 602 ../archive_lf/large.bin
605 603 ../archive_lf/main
606 604 ../archive_lf/sub1
607 605 ../archive_lf/sub1/.hgsub
608 606 ../archive_lf/sub1/.hgsubstate
609 607 ../archive_lf/sub1/sub1
610 608 ../archive_lf/sub1/sub2
611 609 ../archive_lf/sub1/sub2/folder
612 610 ../archive_lf/sub1/sub2/folder/test.txt
613 611 ../archive_lf/sub1/sub2/large.bin
614 612 ../archive_lf/sub1/sub2/sub2
615 613 ../archive_lf/sub1/sub2/test.txt
616 614 $ rm -rf ../archive_lf
617 615
618 616 Exclude large files from main and sub-sub repo
619 617
620 618 $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
621 619 $ find ../archive_lf | sort
622 620 ../archive_lf
623 621 ../archive_lf/.hg_archival.txt
624 622 ../archive_lf/.hgsub
625 623 ../archive_lf/.hgsubstate
626 624 ../archive_lf/main
627 625 ../archive_lf/sub1
628 626 ../archive_lf/sub1/.hgsub
629 627 ../archive_lf/sub1/.hgsubstate
630 628 ../archive_lf/sub1/sub1
631 629 ../archive_lf/sub1/sub2
632 630 ../archive_lf/sub1/sub2/folder
633 631 ../archive_lf/sub1/sub2/folder/test.txt
634 632 ../archive_lf/sub1/sub2/sub2
635 633 ../archive_lf/sub1/sub2/test.txt
636 634 $ rm -rf ../archive_lf
637 635
638 636 Exclude normal files from main and sub-sub repo
639 637
640 638 $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz
641 639 $ tar -tzf ../archive_lf.tgz | sort
642 640 .hgsub
643 641 .hgsubstate
644 642 large.bin
645 643 main
646 644 sub1/.hgsub
647 645 sub1/.hgsubstate
648 646 sub1/sub1
649 647 sub1/sub2/large.bin
650 648 sub1/sub2/sub2
651 649
652 650 Include normal files from within a largefiles subrepo
653 651
654 652 $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
655 653 $ find ../archive_lf | sort
656 654 ../archive_lf
657 655 ../archive_lf/.hg_archival.txt
658 656 ../archive_lf/sub1
659 657 ../archive_lf/sub1/sub2
660 658 ../archive_lf/sub1/sub2/folder
661 659 ../archive_lf/sub1/sub2/folder/test.txt
662 660 ../archive_lf/sub1/sub2/test.txt
663 661 $ rm -rf ../archive_lf
664 662
665 663 Include large files from within a largefiles subrepo
666 664
667 665 $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
668 666 $ find ../archive_lf | sort
669 667 ../archive_lf
670 668 ../archive_lf/large.bin
671 669 ../archive_lf/sub1
672 670 ../archive_lf/sub1/sub2
673 671 ../archive_lf/sub1/sub2/large.bin
674 672 $ rm -rf ../archive_lf
675 673
676 674 Find an exact largefile match in a largefiles subrepo
677 675
678 676 $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
679 677 $ find ../archive_lf | sort
680 678 ../archive_lf
681 679 ../archive_lf/sub1
682 680 ../archive_lf/sub1/sub2
683 681 ../archive_lf/sub1/sub2/large.bin
684 682 $ rm -rf ../archive_lf
685 683
686 684 The local repo enables largefiles if a largefiles repo is cloned
687 685 $ hg showconfig extensions
688 686 abort: repository requires features unknown to this Mercurial: largefiles!
689 687 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
690 688 [255]
691 689 $ hg --config extensions.largefiles= clone -qU . ../lfclone
692 690 $ cat ../lfclone/.hg/hgrc
693 691 # example repository config (see "hg help config" for more info)
694 692 [paths]
695 693 default = $TESTTMP/cloned (glob)
696 694
697 695 # path aliases to other clones of this repo in URLs or filesystem paths
698 696 # (see "hg help config.paths" for more info)
699 697 #
700 698 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
701 699 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
702 700 # my-clone = /home/jdoe/jdoes-clone
703 701
704 702 [ui]
705 703 # name and email (local to this repository, optional), e.g.
706 704 # username = Jane Doe <jdoe@example.com>
707 705
708 706 [extensions]
709 707 largefiles=
710 708
711 709 Find an exact match to a standin (should archive nothing)
712 710 $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
713 711 $ find ../archive_lf 2> /dev/null | sort
714 712
715 713 $ cat >> $HGRCPATH <<EOF
716 714 > [extensions]
717 715 > largefiles=
718 716 > [largefiles]
719 717 > patterns=glob:**.dat
720 718 > EOF
721 719
722 720 Test forget through a deep subrepo with the largefiles extension, both a
723 721 largefile and a normal file. Then a largefile that hasn't been committed yet.
724 722 $ touch sub1/sub2/untracked.txt
725 723 $ touch sub1/sub2/large.dat
726 724 $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt
727 725 not removing sub1/sub2/untracked.txt: file is already untracked (glob)
728 726 [1]
729 727 $ hg add --large --dry-run -v sub1/sub2/untracked.txt
730 728 adding sub1/sub2/untracked.txt as a largefile (glob)
731 729 $ hg add --large -v sub1/sub2/untracked.txt
732 730 adding sub1/sub2/untracked.txt as a largefile (glob)
733 731 $ hg add --normal -v sub1/sub2/large.dat
734 732 adding sub1/sub2/large.dat (glob)
735 733 $ hg forget -v sub1/sub2/untracked.txt
736 734 removing sub1/sub2/untracked.txt (glob)
737 735 $ hg status -S
738 736 A sub1/sub2/large.dat
739 737 R sub1/sub2/large.bin
740 738 R sub1/sub2/test.txt
741 739 ? foo/bar/abc
742 740 ? sub1/sub2/untracked.txt
743 741 ? sub1/sub2/x.txt
744 742 $ hg add sub1/sub2
745 743
746 744 $ hg archive -S -r 'wdir()' ../wdir2
747 745 $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:'
748 746 Only in ../wdir2: .hg_archival.txt
749 747 Only in .: .hglf
750 748 Only in .: foo
751 749 Only in ./sub1/sub2: large.bin
752 750 Only in ./sub1/sub2: test.txt
753 751 Only in ./sub1/sub2: untracked.txt
754 752 Only in ./sub1/sub2: x.txt
755 753 $ find ../wdir2 -type f | sort
756 754 ../wdir2/.hg_archival.txt
757 755 ../wdir2/.hgsub
758 756 ../wdir2/.hgsubstate
759 757 ../wdir2/large.bin
760 758 ../wdir2/main
761 759 ../wdir2/sub1/.hgsub
762 760 ../wdir2/sub1/.hgsubstate
763 761 ../wdir2/sub1/sub1
764 762 ../wdir2/sub1/sub2/folder/test.txt
765 763 ../wdir2/sub1/sub2/large.dat
766 764 ../wdir2/sub1/sub2/sub2
767 765 $ hg status -S -mac -n | sort
768 766 .hgsub
769 767 .hgsubstate
770 768 large.bin
771 769 main
772 770 sub1/.hgsub
773 771 sub1/.hgsubstate
774 772 sub1/sub1
775 773 sub1/sub2/folder/test.txt
776 774 sub1/sub2/large.dat
777 775 sub1/sub2/sub2
778 776
779 777 $ hg ci -Sqm 'forget testing'
780 778
781 779 Test 'wdir()' modified file archiving with largefiles
782 780 $ echo 'mod' > main
783 781 $ echo 'mod' > large.bin
784 782 $ echo 'mod' > sub1/sub2/large.dat
785 783 $ hg archive -S -r 'wdir()' ../wdir3
786 784 $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories'
787 785 Only in ../wdir3: .hg_archival.txt
788 786 Only in .: .hglf
789 787 Only in .: foo
790 788 Only in ./sub1/sub2: large.bin
791 789 Only in ./sub1/sub2: test.txt
792 790 Only in ./sub1/sub2: untracked.txt
793 791 Only in ./sub1/sub2: x.txt
794 792 $ find ../wdir3 -type f | sort
795 793 ../wdir3/.hg_archival.txt
796 794 ../wdir3/.hgsub
797 795 ../wdir3/.hgsubstate
798 796 ../wdir3/large.bin
799 797 ../wdir3/main
800 798 ../wdir3/sub1/.hgsub
801 799 ../wdir3/sub1/.hgsubstate
802 800 ../wdir3/sub1/sub1
803 801 ../wdir3/sub1/sub2/folder/test.txt
804 802 ../wdir3/sub1/sub2/large.dat
805 803 ../wdir3/sub1/sub2/sub2
806 804 $ hg up -Cq
807 805
808 806 Test issue4330: commit a directory where only normal files have changed
809 807 $ touch foo/bar/large.dat
810 808 $ hg add --large foo/bar/large.dat
811 809 $ hg ci -m 'add foo/bar/large.dat'
812 810 $ touch a.txt
813 811 $ touch a.dat
814 812 $ hg add -v foo/bar/abc a.txt a.dat
815 813 adding a.dat as a largefile
816 814 adding a.txt
817 815 adding foo/bar/abc (glob)
818 816 $ hg ci -m 'dir commit with only normal file deltas' foo/bar
819 817 $ hg status
820 818 A a.dat
821 819 A a.txt
822 820
823 821 Test a directory commit with a changed largefile and a changed normal file
824 822 $ echo changed > foo/bar/large.dat
825 823 $ echo changed > foo/bar/abc
826 824 $ hg ci -m 'dir commit with normal and lf file deltas' foo
827 825 $ hg status
828 826 A a.dat
829 827 A a.txt
830 828
831 829 $ hg ci -m "add a.*"
832 830 $ hg mv a.dat b.dat
833 831 $ hg mv foo/bar/abc foo/bar/def
834 832 $ hg status -C
835 833 A b.dat
836 834 a.dat
837 835 A foo/bar/def
838 836 foo/bar/abc
839 837 R a.dat
840 838 R foo/bar/abc
841 839
842 840 $ hg ci -m "move large and normal"
843 841 $ hg status -C --rev '.^' --rev .
844 842 A b.dat
845 843 a.dat
846 844 A foo/bar/def
847 845 foo/bar/abc
848 846 R a.dat
849 847 R foo/bar/abc
850 848
851 849
852 850 $ echo foo > main
853 851 $ hg ci -m "mod parent only"
854 852 $ hg init sub3
855 853 $ echo "sub3 = sub3" >> .hgsub
856 854 $ echo xyz > sub3/a.txt
857 855 $ hg add sub3/a.txt
858 856 $ hg ci -Sm "add sub3"
859 857 committing subrepository sub3
860 858 $ cat .hgsub | grep -v sub3 > .hgsub1
861 859 $ mv .hgsub1 .hgsub
862 860 $ hg ci -m "remove sub3"
863 861
864 862 $ hg log -r "subrepo()" --style compact
865 863 0 7f491f53a367 1970-01-01 00:00 +0000 test
866 864 main import
867 865
868 866 1 ffe6649062fe 1970-01-01 00:00 +0000 test
869 867 deep nested modif should trigger a commit
870 868
871 869 2 9bb10eebee29 1970-01-01 00:00 +0000 test
872 870 add test.txt
873 871
874 872 3 7c64f035294f 1970-01-01 00:00 +0000 test
875 873 add large files
876 874
877 875 4 f734a59e2e35 1970-01-01 00:00 +0000 test
878 876 forget testing
879 877
880 878 11 9685a22af5db 1970-01-01 00:00 +0000 test
881 879 add sub3
882 880
883 881 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
884 882 remove sub3
885 883
886 884 $ hg log -r "subrepo('sub3')" --style compact
887 885 11 9685a22af5db 1970-01-01 00:00 +0000 test
888 886 add sub3
889 887
890 888 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test
891 889 remove sub3
892 890
893 891 $ hg log -r "subrepo('bogus')" --style compact
894 892
895 893
896 894 Test .hgsubstate in the R state
897 895
898 896 $ hg rm .hgsub .hgsubstate
899 897 \r (no-eol) (esc)
900 898 deleting [=====================> ] 1/2\r (no-eol) (esc)
901 899 deleting [===========================================>] 2/2\r (no-eol) (esc)
902 900 \r (no-eol) (esc)
903 901 $ hg ci -m 'trash subrepo tracking'
904 902
905 903 $ hg log -r "subrepo('re:sub\d+')" --style compact
906 904 0 7f491f53a367 1970-01-01 00:00 +0000 test
907 905 main import
908 906
909 907 1 ffe6649062fe 1970-01-01 00:00 +0000 test
910 908 deep nested modif should trigger a commit
911 909
912 910 2 9bb10eebee29 1970-01-01 00:00 +0000 test
913 911 add test.txt
914 912
915 913 3 7c64f035294f 1970-01-01 00:00 +0000 test
916 914 add large files
917 915
918 916 4 f734a59e2e35 1970-01-01 00:00 +0000 test
919 917 forget testing
920 918
921 919 11 9685a22af5db 1970-01-01 00:00 +0000 test
922 920 add sub3
923 921
924 922 12 2e0485b475b9 1970-01-01 00:00 +0000 test
925 923 remove sub3
926 924
927 925 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test
928 926 trash subrepo tracking
929 927
930 928
931 929 Restore the trashed subrepo tracking
932 930
933 931 $ hg rollback -q
934 932 $ hg update -Cq .
935 933
936 934 Interaction with extdiff, largefiles and subrepos
937 935
938 936 $ hg --config extensions.extdiff= pdiff -S
939 937
940 938 $ hg --config extensions.extdiff= pdiff -r '.^' -S
941 939 \r (no-eol) (esc)
942 940 archiving [ ] 0/2\r (no-eol) (esc)
943 941 archiving [====================> ] 1/2\r (no-eol) (esc)
944 942 archiving [==========================================>] 2/2\r (no-eol) (esc)
945 943 \r (no-eol) (esc)
946 944 \r (no-eol) (esc)
947 945 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
948 946 \r (no-eol) (esc)
949 947 \r (no-eol) (esc)
950 948 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
951 949 \r (no-eol) (esc)
952 950 \r (no-eol) (esc)
953 951 archiving (sub3) [ <=> ] 0\r (no-eol) (esc)
954 952 \r (no-eol) (esc)
955 953 \r (no-eol) (esc)
956 954 archiving [ ] 0/2\r (no-eol) (esc)
957 955 archiving [====================> ] 1/2\r (no-eol) (esc)
958 956 archiving [==========================================>] 2/2\r (no-eol) (esc)
959 957 \r (no-eol) (esc)
960 958 \r (no-eol) (esc)
961 959 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
962 960 \r (no-eol) (esc)
963 961 \r (no-eol) (esc)
964 962 archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc)
965 963 \r (no-eol) (esc)
966 964 diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
967 965 --- cloned.*/.hgsub * (glob)
968 966 +++ cloned/.hgsub * (glob)
969 967 @@ -1,2 +1* @@ (glob)
970 968 sub1 = ../sub1
971 969 -sub3 = sub3
972 970 diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob)
973 971 --- cloned.*/.hgsubstate * (glob)
974 972 +++ cloned/.hgsubstate * (glob)
975 973 @@ -1,2 +1* @@ (glob)
976 974 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
977 975 -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
978 976 [1]
979 977
980 978 $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
981 979 \r (no-eol) (esc)
982 980 archiving [ ] 0/3\r (no-eol) (esc)
983 981 archiving [=============> ] 1/3\r (no-eol) (esc)
984 982 archiving [===========================> ] 2/3\r (no-eol) (esc)
985 983 archiving [==========================================>] 3/3\r (no-eol) (esc)
986 984 \r (no-eol) (esc)
987 985 \r (no-eol) (esc)
988 986 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
989 987 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
990 988 \r (no-eol) (esc)
991 989 \r (no-eol) (esc)
992 990 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
993 991 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
994 992 \r (no-eol) (esc)
995 993 \r (no-eol) (esc)
996 994 archiving [ ] 0/8\r (no-eol) (esc)
997 995 archiving [====> ] 1/8\r (no-eol) (esc)
998 996 archiving [=========> ] 2/8\r (no-eol) (esc)
999 997 archiving [===============> ] 3/8\r (no-eol) (esc)
1000 998 archiving [====================> ] 4/8\r (no-eol) (esc)
1001 999 archiving [=========================> ] 5/8\r (no-eol) (esc)
1002 1000 archiving [===============================> ] 6/8\r (no-eol) (esc)
1003 1001 archiving [====================================> ] 7/8\r (no-eol) (esc)
1004 1002 archiving [==========================================>] 8/8\r (no-eol) (esc)
1005 1003 \r (no-eol) (esc)
1006 1004 \r (no-eol) (esc)
1007 1005 archiving (sub1) [ ] 0/1\r (no-eol) (esc)
1008 1006 archiving (sub1) [===================================>] 1/1\r (no-eol) (esc)
1009 1007 \r (no-eol) (esc)
1010 1008 \r (no-eol) (esc)
1011 1009 archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc)
1012 1010 archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc)
1013 1011 archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc)
1014 1012 archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc)
1015 1013 \r (no-eol) (esc)
1016 1014 \r (no-eol) (esc)
1017 1015 archiving (sub3) [ ] 0/1\r (no-eol) (esc)
1018 1016 archiving (sub3) [===================================>] 1/1\r (no-eol) (esc)
1019 1017 \r (no-eol) (esc)
1020 1018 diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
1021 1019 --- cloned.*/.hglf/b.dat * (glob)
1022 1020 +++ cloned.*/.hglf/b.dat * (glob)
1023 1021 @@ -*,0 +1* @@ (glob)
1024 1022 +da39a3ee5e6b4b0d3255bfef95601890afd80709
1025 1023 diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
1026 1024 --- cloned.*/.hglf/foo/bar/large.dat * (glob)
1027 1025 +++ cloned.*/.hglf/foo/bar/large.dat * (glob)
1028 1026 @@ -*,0 +1* @@ (glob)
1029 1027 +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
1030 1028 diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
1031 1029 --- cloned.*/.hglf/large.bin * (glob)
1032 1030 +++ cloned.*/.hglf/large.bin * (glob)
1033 1031 @@ -*,0 +1* @@ (glob)
1034 1032 +7f7097b041ccf68cc5561e9600da4655d21c6d18
1035 1033 diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
1036 1034 --- cloned.*/.hgsub * (glob)
1037 1035 +++ cloned.*/.hgsub * (glob)
1038 1036 @@ -1* +1,2 @@ (glob)
1039 1037 sub1 = ../sub1
1040 1038 +sub3 = sub3
1041 1039 diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob)
1042 1040 --- cloned.*/.hgsubstate * (glob)
1043 1041 +++ cloned.*/.hgsubstate * (glob)
1044 1042 @@ -1* +1,2 @@ (glob)
1045 1043 -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1
1046 1044 +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1
1047 1045 +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
1048 1046 diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
1049 1047 --- cloned.*/foo/bar/def * (glob)
1050 1048 +++ cloned.*/foo/bar/def * (glob)
1051 1049 @@ -*,0 +1* @@ (glob)
1052 1050 +changed
1053 1051 diff -Nru cloned.*/main cloned.*/main (glob)
1054 1052 --- cloned.*/main * (glob)
1055 1053 +++ cloned.*/main * (glob)
1056 1054 @@ -1* +1* @@ (glob)
1057 1055 -main
1058 1056 +foo
1059 1057 diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob)
1060 1058 --- cloned.*/sub1/.hgsubstate * (glob)
1061 1059 +++ cloned.*/sub1/.hgsubstate * (glob)
1062 1060 @@ -1* +1* @@ (glob)
1063 1061 -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2
1064 1062 +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2
1065 1063 diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
1066 1064 --- cloned.*/sub1/sub2/folder/test.txt * (glob)
1067 1065 +++ cloned.*/sub1/sub2/folder/test.txt * (glob)
1068 1066 @@ -*,0 +1* @@ (glob)
1069 1067 +subfolder
1070 1068 diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
1071 1069 --- cloned.*/sub1/sub2/sub2 * (glob)
1072 1070 +++ cloned.*/sub1/sub2/sub2 * (glob)
1073 1071 @@ -1* +1* @@ (glob)
1074 1072 -sub2
1075 1073 +modified
1076 1074 diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
1077 1075 --- cloned.*/sub3/a.txt * (glob)
1078 1076 +++ cloned.*/sub3/a.txt * (glob)
1079 1077 @@ -*,0 +1* @@ (glob)
1080 1078 +xyz
1081 1079 [1]
1082 1080
1083 1081 $ echo mod > sub1/sub2/sub2
1084 1082 $ hg --config extensions.extdiff= pdiff -S
1085 1083 \r (no-eol) (esc)
1086 1084 archiving (sub1) [ <=> ] 0\r (no-eol) (esc)
1087 1085 \r (no-eol) (esc)
1088 1086 \r (no-eol) (esc)
1089 1087 archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc)
1090 1088 archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc)
1091 1089 \r (no-eol) (esc)
1092 1090 --- */cloned.*/sub1/sub2/sub2 * (glob)
1093 1091 +++ */cloned/sub1/sub2/sub2 * (glob)
1094 1092 @@ -1* +1* @@ (glob)
1095 1093 -modified
1096 1094 +mod
1097 1095 [1]
1098 1096
1099 1097 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now