Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/convert/hg.py @ 5279:2dbd750b3ddd
convert: clear the dirstate before a conversion, invalidate it afterwards
Clearing it before the conversion protects us from whatever data were
there (file copies in particular).
Invalidating it after the conversion avoids writing a possibly
inconsistent dirstate to disk.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 01 Sep 2007 02:49:18 -0300 |
parents | 70e9a527cc61 |
children | 11e1e574da02 |
comparison
equal
deleted
inserted
replaced
5278:70e9a527cc61 | 5279:2dbd750b3ddd |
---|---|
30 self.wlock = None | 30 self.wlock = None |
31 | 31 |
32 def before(self): | 32 def before(self): |
33 self.wlock = self.repo.wlock() | 33 self.wlock = self.repo.wlock() |
34 self.lock = self.repo.lock() | 34 self.lock = self.repo.lock() |
35 self.repo.dirstate.clear() | |
35 | 36 |
36 def after(self): | 37 def after(self): |
38 self.repo.dirstate.invalidate() | |
37 self.lock = None | 39 self.lock = None |
38 self.wlock = None | 40 self.wlock = None |
39 | 41 |
40 def revmapfile(self): | 42 def revmapfile(self): |
41 return os.path.join(self.path, ".hg", "shamap") | 43 return os.path.join(self.path, ".hg", "shamap") |