Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 18743:70e2a22fd66e
merge with stable
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Fri, 01 Mar 2013 10:05:37 -0600 |
parents | 7790d69af6d6 5b7175377bab |
children | 0377352eb7d3 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Feb 28 21:58:37 2013 -0600 +++ b/mercurial/localrepo.py Fri Mar 01 10:05:37 2013 -0600 @@ -705,14 +705,18 @@ def setparents(self, p1, p2=nullid): copies = self.dirstate.setparents(p1, p2) + pctx = self[p1] if copies: # Adjust copy records, the dirstate cannot do it, it # requires access to parents manifests. Preserve them # only for entries added to first parent. - pctx = self[p1] for f in copies: if f not in pctx and copies[f] in pctx: self.dirstate.copy(copies[f], f) + if p2 == nullid: + for f, s in sorted(self.dirstate.copies().items()): + if f not in pctx and s not in pctx: + self.dirstate.copy(None, f) def filectx(self, path, changeid=None, fileid=None): """changeid can be a changeset revision, node, or tag.