Mercurial > hg > mercurial-crew-with-dirclash
diff hgext/convert/hg.py @ 5278:70e9a527cc61
convert: avoid dirstate checks; add a test
During a conversion, the dirstate contents are not consistent - there
are files that may be missing from the dirstate and there may be files
that shouldn't be in the dirstate.
While this is not fixed, don't mark files as added - put them directly
in state 'n'ormal.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 01 Sep 2007 02:49:18 -0300 |
parents | be4835ad9a85 |
children | 2dbd750b3ddd |
line wrap: on
line diff
--- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -50,7 +50,7 @@ class mercurial_sink(converter_sink): def putfile(self, f, e, data): self.repo.wwrite(f, data, e) if f not in self.repo.dirstate: - self.repo.dirstate.add(f) + self.repo.dirstate.normallookup(f) def copyfile(self, source, dest): self.repo.copy(source, dest) @@ -111,7 +111,7 @@ class mercurial_sink(converter_sink): p2 = parents.pop(0) a = self.repo.rawcommit(files, text, commit.author, commit.date, bin(p1), bin(p2), extra=extra) - self.repo.dirstate.invalidate() + self.repo.dirstate.clear() text = "(octopus merge fixup)\n" p2 = hg.hex(self.repo.changelog.tip())