##// END OF EJS Templates
merge with stable
Matt Mackall -
r24148:7a219447 merge default
parent child Browse files
Show More
@@ -322,7 +322,7 b' def shellquote(s):'
322 global _needsshellquote
322 global _needsshellquote
323 if _needsshellquote is None:
323 if _needsshellquote is None:
324 _needsshellquote = re.compile(r'[^a-zA-Z0-9._/-]').search
324 _needsshellquote = re.compile(r'[^a-zA-Z0-9._/-]').search
325 if not _needsshellquote(s):
325 if s and not _needsshellquote(s):
326 # "s" shouldn't have to be quoted
326 # "s" shouldn't have to be quoted
327 return s
327 return s
328 else:
328 else:
@@ -245,7 +245,7 b' def submerge(repo, wctx, mctx, actx, ove'
245 'use (c)hanged version or (d)elete?'
245 'use (c)hanged version or (d)elete?'
246 '$$ &Changed $$ &Delete') % s, 0) == 0:
246 '$$ &Changed $$ &Delete') % s, 0) == 0:
247 debug(s, "prompt recreate", r)
247 debug(s, "prompt recreate", r)
248 wctx.sub(s).get(r)
248 mctx.sub(s).get(r)
249 sm[s] = r
249 sm[s] = r
250
250
251 # record merged .hgsubstate
251 # record merged .hgsubstate
@@ -39,7 +39,7 b''
39 <h2 class="no-link no-border">changeset</h2>
39 <h2 class="no-link no-border">changeset</h2>
40
40
41 <h3 class="changeset"><a href="{url|urlescape}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span></a></h3>
41 <h3 class="changeset"><a href="{url|urlescape}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span></a></h3>
42 <p class="changeset-age age">{date|rfc822date}</p>
42 <p class="changeset-age"><span class="age">{date|rfc822date}</span></p>
43
43
44 <dl class="overview">
44 <dl class="overview">
45 <dt>author</dt>
45 <dt>author</dt>
@@ -41,7 +41,7 b''
41
41
42 <h2 class="no-link no-border">{file|escape}@{node|short} (annotated)</h2>
42 <h2 class="no-link no-border">{file|escape}@{node|short} (annotated)</h2>
43 <h3 class="changeset">{file|escape}</h3>
43 <h3 class="changeset">{file|escape}</h3>
44 <p class="changeset-age age">{date|rfc822date}</p>
44 <p class="changeset-age"><span class="age">{date|rfc822date}</span></p>
45
45
46 <dl class="overview">
46 <dl class="overview">
47 <dt>author</dt>
47 <dt>author</dt>
@@ -41,7 +41,7 b''
41
41
42 <h2 class="no-link no-border">{file|escape}@{node|short}</h2>
42 <h2 class="no-link no-border">{file|escape}@{node|short}</h2>
43 <h3 class="changeset">{file|escape}</h3>
43 <h3 class="changeset">{file|escape}</h3>
44 <p class="changeset-age age">{date|rfc822date}</p>
44 <p class="changeset-age"><span class="age">{date|rfc822date}</span></p>
45
45
46 <dl class="overview">
46 <dl class="overview">
47 <dt>author</dt>
47 <dt>author</dt>
@@ -167,7 +167,7 b' def shellquote(s):'
167 # they are used as a part of path name (and the latter doesn't
167 # they are used as a part of path name (and the latter doesn't
168 # work as "escape character", like one on posix) on Windows
168 # work as "escape character", like one on posix) on Windows
169 _needsshellquote = re.compile(r'[^a-zA-Z0-9._:/\\-]').search
169 _needsshellquote = re.compile(r'[^a-zA-Z0-9._:/\\-]').search
170 if not _needsshellquote(s) and not _quotere.search(s):
170 if s and not _needsshellquote(s) and not _quotere.search(s):
171 # "s" shouldn't have to be quoted
171 # "s" shouldn't have to be quoted
172 return s
172 return s
173 return '"%s"' % _quotere.sub(r'\1\1\\\2', s)
173 return '"%s"' % _quotere.sub(r'\1\1\\\2', s)
@@ -182,6 +182,22 b' TODO'
182 running "*/bin/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)
182 running "*/bin/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)
183 #endif
183 #endif
184
184
185 Empty argument must be quoted
186
187 $ cat <<EOF >> $HGRCPATH
188 > [extdiff]
189 > kdiff3 = echo
190 > [merge-tools]
191 > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child
192 > EOF
193 #if windows
194 $ hg --debug kdiff3 -r0 | grep '^running'
195 running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob)
196 #else
197 $ hg --debug kdiff3 -r0 | grep '^running'
198 running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob)
199 #endif
200
185 #if execbit
201 #if execbit
186
202
187 Test extdiff of multiple files in tmp dir:
203 Test extdiff of multiple files in tmp dir:
@@ -311,6 +311,138 b' should conflict'
311 t3
311 t3
312 >>>>>>> other: 7af322bc1198 - test: 7
312 >>>>>>> other: 7af322bc1198 - test: 7
313
313
314 11: remove subrepo t
315
316 $ hg co -C 5
317 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
318 $ hg revert -r 4 .hgsub # remove t
319 $ hg ci -m11
320 created new head
321 $ hg debugsub
322 path s
323 source s
324 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
325
326 local removed, remote changed, keep changed
327
328 $ hg merge 6
329 remote changed subrepository t which local removed
330 use (c)hanged version or (d)elete? c
331 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
332 (branch merge, don't forget to commit)
333 BROKEN: should include subrepo t
334 $ hg debugsub
335 path s
336 source s
337 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
338 $ cat .hgsubstate
339 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
340 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t
341 $ hg ci -m 'local removed, remote changed, keep changed'
342 BROKEN: should include subrepo t
343 $ hg debugsub
344 path s
345 source s
346 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
347 BROKEN: should include subrepo t
348 $ cat .hgsubstate
349 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
350 $ cat t/t
351 t2
352
353 local removed, remote changed, keep removed
354
355 $ hg co -C 11
356 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
357 $ hg merge --config ui.interactive=true 6 <<EOF
358 > d
359 > EOF
360 remote changed subrepository t which local removed
361 use (c)hanged version or (d)elete? d
362 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
363 (branch merge, don't forget to commit)
364 $ hg debugsub
365 path s
366 source s
367 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
368 $ cat .hgsubstate
369 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
370 $ hg ci -m 'local removed, remote changed, keep removed'
371 created new head
372 $ hg debugsub
373 path s
374 source s
375 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
376 $ cat .hgsubstate
377 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
378
379 local changed, remote removed, keep changed
380
381 $ hg co -C 6
382 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
383 $ hg merge 11
384 local changed subrepository t which remote removed
385 use (c)hanged version or (d)elete? c
386 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
387 (branch merge, don't forget to commit)
388 BROKEN: should include subrepo t
389 $ hg debugsub
390 path s
391 source s
392 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
393 BROKEN: should include subrepo t
394 $ cat .hgsubstate
395 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
396 $ hg ci -m 'local changed, remote removed, keep changed'
397 created new head
398 BROKEN: should include subrepo t
399 $ hg debugsub
400 path s
401 source s
402 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
403 BROKEN: should include subrepo t
404 $ cat .hgsubstate
405 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
406 $ cat t/t
407 t2
408
409 local changed, remote removed, keep removed
410
411 $ hg co -C 6
412 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
413 $ hg merge --config ui.interactive=true 11 <<EOF
414 > d
415 > EOF
416 local changed subrepository t which remote removed
417 use (c)hanged version or (d)elete? d
418 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
419 (branch merge, don't forget to commit)
420 $ hg debugsub
421 path s
422 source s
423 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
424 $ cat .hgsubstate
425 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
426 $ hg ci -m 'local changed, remote removed, keep removed'
427 created new head
428 $ hg debugsub
429 path s
430 source s
431 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
432 $ cat .hgsubstate
433 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
434
435 clean up to avoid having to fix up the tests below
436
437 $ hg co -C 10
438 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
439 $ cat >> $HGRCPATH <<EOF
440 > [extensions]
441 > strip=
442 > EOF
443 $ hg strip -r 11:15
444 saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob)
445
314 clone
446 clone
315
447
316 $ cd ..
448 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now