Show More
@@ -205,11 +205,11 b' class kwtemplater(object):' | |||||
205 |
|
205 | |||
206 | def overwrite(self, ctx, candidates, lookup, expand, rekw=False): |
|
206 | def overwrite(self, ctx, candidates, lookup, expand, rekw=False): | |
207 | '''Overwrites selected files expanding/shrinking keywords.''' |
|
207 | '''Overwrites selected files expanding/shrinking keywords.''' | |
208 | if self.restrict or lookup: # exclude kw_copy |
|
208 | if self.restrict or lookup or self.record: # exclude kw_copy | |
209 | candidates = self.iskwfile(candidates, ctx) |
|
209 | candidates = self.iskwfile(candidates, ctx) | |
210 | if not candidates: |
|
210 | if not candidates: | |
211 | return |
|
211 | return | |
212 |
|
|
212 | kwcmd = self.restrict and lookup # kwexpand/kwshrink | |
213 | if self.restrict or expand and lookup: |
|
213 | if self.restrict or expand and lookup: | |
214 | mf = ctx.manifest() |
|
214 | mf = ctx.manifest() | |
215 | fctx = ctx |
|
215 | fctx = ctx | |
@@ -234,7 +234,7 b' class kwtemplater(object):' | |||||
234 | if found: |
|
234 | if found: | |
235 | self.ui.note(msg % f) |
|
235 | self.ui.note(msg % f) | |
236 | self.repo.wwrite(f, data, ctx.flags(f)) |
|
236 | self.repo.wwrite(f, data, ctx.flags(f)) | |
237 |
if |
|
237 | if kwcmd: | |
238 | self.repo.dirstate.normal(f) |
|
238 | self.repo.dirstate.normal(f) | |
239 | elif self.record: |
|
239 | elif self.record: | |
240 | self.repo.dirstate.normallookup(f) |
|
240 | self.repo.dirstate.normallookup(f) |
@@ -440,6 +440,24 b' record added file alone' | |||||
440 | $ hg update -C |
|
440 | $ hg update -C | |
441 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
441 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
442 |
|
442 | |||
|
443 | record added keyword ignored file | |||
|
444 | ||||
|
445 | $ echo '$Id$' > i | |||
|
446 | $ hg add i | |||
|
447 | $ hg --verbose record -d '1 13' -m recignored<<EOF | |||
|
448 | > y | |||
|
449 | > EOF | |||
|
450 | diff --git a/i b/i | |||
|
451 | new file mode 100644 | |||
|
452 | examine changes to 'i'? [Ynsfdaq?] | |||
|
453 | i | |||
|
454 | committed changeset 3:5f40fe93bbdc | |||
|
455 | $ cat i | |||
|
456 | $Id$ | |||
|
457 | $ hg -q rollback | |||
|
458 | $ hg forget i | |||
|
459 | $ rm i | |||
|
460 | ||||
443 | Test patch queue repo |
|
461 | Test patch queue repo | |
444 |
|
462 | |||
445 | $ hg init --mq |
|
463 | $ hg init --mq | |
@@ -775,8 +793,12 b' kwexpand/kwshrink on selected files' | |||||
775 |
|
793 | |||
776 | $ mkdir x |
|
794 | $ mkdir x | |
777 | $ hg copy a x/a |
|
795 | $ hg copy a x/a | |
|
796 | $ hg --verbose kwshrink a | |||
|
797 | overwriting a shrinking keywords | |||
|
798 | $ hg status a | |||
778 | $ hg --verbose kwexpand a |
|
799 | $ hg --verbose kwexpand a | |
779 | overwriting a expanding keywords |
|
800 | overwriting a expanding keywords | |
|
801 | $ hg status a | |||
780 |
|
802 | |||
781 | kwexpand x/a should abort |
|
803 | kwexpand x/a should abort | |
782 |
|
804 |
General Comments 0
You need to be logged in to leave comments.
Login now