##// END OF EJS Templates
Merge with stable
Martin Geisler -
r10118:333193c0 merge default
parent child Browse files
Show More
@@ -93,7 +93,8 b" nokwcommands = ('add addremove annotate "
93 93
94 94 # hg commands that trigger expansion only when writing to working dir,
95 95 # not when reading filelog, and unexpand when reading from working dir
96 restricted = 'merge record resolve qfold qimport qnew qpush qrefresh qrecord'
96 restricted = ('merge record resolve qfold qimport qnew qpush qrefresh qrecord'
97 ' transplant')
97 98
98 99 # provide cvs-like UTC date filter
99 100 utcdate = lambda x: util.datestr(x, '%Y/%m/%d %H:%M:%S')
@@ -537,7 +538,8 b' def reposetup(ui, repo):'
537 538 repo.__class__ = kwrepo
538 539
539 540 extensions.wrapfunction(patch.patchfile, '__init__', kwpatchfile_init)
540 extensions.wrapfunction(patch, 'diff', kw_diff)
541 if not kwt.restrict:
542 extensions.wrapfunction(patch, 'diff', kw_diff)
541 543 for c in 'annotate changeset rev filediff diff'.split():
542 544 extensions.wrapfunction(webcommands, c, kwweb_skip)
543 545
@@ -5,6 +5,7 b' cat <<EOF >> $HGRCPATH'
5 5 hgext.keyword =
6 6 hgext.mq =
7 7 hgext.notify =
8 hgext.transplant =
8 9 EOF
9 10
10 11 # demo before [keyword] files are set up
@@ -337,6 +338,23 b' HGMERGE=internal:local hg resolve -a'
337 338 hg commit -m localresolve
338 339 cat m
339 340
341 echo % test restricted mode with transplant -b
342 hg update 6
343 hg branch foo
344 mv a a.bak
345 echo foobranch > a
346 cat a.bak >> a
347 rm a.bak
348 hg commit -m 9foobranch
349 hg update default
350 hg -y transplant -b foo tip
351 echo % no expansion in changeset
352 hg tip -p
353 echo % expansion in file
354 head -n 2 a
355 hg -q rollback
356 hg -q update -C
357
340 358 echo % switch off expansion
341 359 echo % kwshrink with unknown file u
342 360 cp a u
@@ -420,6 +420,33 b' foo'
420 420 % resolve to local
421 421 $Id: m 43dfd2854b5b Thu, 01 Jan 1970 00:00:00 +0000 test $
422 422 bar
423 % test restricted mode with transplant -b
424 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
425 marked working directory as branch foo
426 created new head
427 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
428 applying 1c4378f51c4d
429 1c4378f51c4d transplanted to 7d855abcab87
430 % no expansion in changeset
431 changeset: 11:7d855abcab87
432 tag: tip
433 parent: 9:43dfd2854b5b
434 user: test
435 date: Thu Jan 01 00:00:00 1970 +0000
436 summary: 9foobranch
437
438 diff -r 43dfd2854b5b -r 7d855abcab87 a
439 --- a/a Thu Jan 01 00:00:00 1970 +0000
440 +++ b/a Thu Jan 01 00:00:00 1970 +0000
441 @@ -1,3 +1,4 @@
442 +foobranch
443 expand $Id$
444 do not process $Id:
445 xxx $
446
447 % expansion in file
448 foobranch
449 expand $Id: a 7d855abcab87 Thu, 01 Jan 1970 00:00:00 +0000 test $
423 450 % switch off expansion
424 451 % kwshrink with unknown file u
425 452 overwriting a shrinking keywords
General Comments 0
You need to be logged in to leave comments. Login now