# HG changeset patch # User Christian Ebert # Date 2010-05-31 23:05:45 # Node ID 56f30623825639729c261a7c11d1cf8fd12d51aa # Parent c61442f6d106ae2b91672898715e0fee26eeb54d keyword: force dirstate normal when all changes in a file are recorded Before this bugfix a file whose changes were entirely recorded was still considered modified by "hg status". Note: the test must use hg record -l/--logfile, because this is not reproducible with hg record -m/--message. diff --git a/hgext/keyword.py b/hgext/keyword.py --- a/hgext/keyword.py +++ b/hgext/keyword.py @@ -220,6 +220,8 @@ class kwtemplater(object): self.repo.wwrite(f, data, mf.flags(f)) if node is None: self.repo.dirstate.normal(f) + elif self.record: + self.repo.dirstate.normallookup(f) self.restrict = False def shrinktext(self, text): diff --git a/tests/test-keyword b/tests/test-keyword --- a/tests/test-keyword +++ b/tests/test-keyword @@ -142,7 +142,7 @@ hg -v kwexpand echo % compare changenodes in a c cat a c -echo % record +echo % record chunk python -c \ 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);' hg record -d '1 10' -m rectest< msg +# do not use "hg record -m" here! +hg record -l msg -d '1 11'<