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'<