Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 5323:46455285c6b5
Merge with crew-stable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 23 Sep 2007 15:29:58 +0200 |
parents | a0229e4e4b73 ef65d6ec114e |
children | 61462e7d62ed |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Sep 22 19:05:36 2007 +0200 +++ b/mercurial/localrepo.py Sun Sep 23 15:29:58 2007 +0200 @@ -1045,14 +1045,14 @@ def undelete(self, list): wlock = None try: - p = self.dirstate.parents()[0] - mn = self.changelog.read(p)[0] - m = self.manifest.read(mn) + manifests = [self.manifest.read(self.changelog.read(p)[0]) + for p in self.dirstate.parents() if p != nullid] wlock = self.wlock() for f in list: if self.dirstate[f] != 'r': self.ui.warn("%s not removed!\n" % f) else: + m = f in manifests[0] and manifests[0] or manifests[1] t = self.file(f).read(m[f]) self.wwrite(f, t, m.flags(f)) self.dirstate.normal(f)