Mercurial > hg
changeset 20:a664c2b624cf
The actual hg remove fix from Thomas Hein
author | mpm@selenic.com |
---|---|
date | Wed, 04 May 2005 15:42:30 -0800 |
parents | 12360c04fa48 |
children | 54a57a5ebcb1 |
files | mercurial/hg.py |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Wed May 04 15:32:16 2005 -0800 +++ b/mercurial/hg.py Wed May 04 15:42:30 2005 -0800 @@ -137,9 +137,10 @@ pass class dircache: - def __init__(self, opener): + def __init__(self, opener, ui): self.opener = opener self.dirty = 0 + self.ui = ui self.map = None def __del__(self): if self.dirty: self.write() @@ -190,8 +191,11 @@ self.read() self.dirty = 1 for f in files: - try: del self.map[f] - except KeyError: pass + try: + del self.map[f] + except KeyError: + self.ui.warn("Not in dircache: %s\n" % f) + pass def clear(self): self.map = {} @@ -256,7 +260,7 @@ self.ignorelist = None if not self.remote: - self.dircache = dircache(self.opener) + self.dircache = dircache(self.opener, ui) try: self.current = bin(self.opener("current").read()) except IOError: @@ -399,6 +403,7 @@ if co == cn: cn = -1 edittext = "\n"+"".join(["HG: changed %s\n" % f for f in new]) + edittext += "".join(["HG: removed %s\n" % f for f in remove]) edittext = self.ui.edit(edittext) n = self.changelog.add(node, new, edittext, tr, co, cn)