Mercurial > hg
diff hgext/mq.py @ 4336:1cc5fc1d0994
Merge with crew-stable.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 09 Apr 2007 04:57:25 -0300 |
parents | 815ad65cfca9 4e5e1638b165 |
children | 077aafddd35f |
line wrap: on
line diff
--- a/hgext/mq.py Sat Apr 07 04:45:27 2007 -0300 +++ b/hgext/mq.py Mon Apr 09 04:57:25 2007 -0300 @@ -471,8 +471,16 @@ patcherr = not patcherr if merge and files: - # Mark as merged and update dirstate parent info - repo.dirstate.update(repo.dirstate.filterfiles(files.keys()), 'm') + # Mark as removed/merged and update dirstate parent info + removed = [] + merged = [] + for f in files: + if os.path.exists(repo.dirstate.wjoin(f)): + merged.append(f) + else: + removed.append(f) + repo.dirstate.update(repo.dirstate.filterfiles(removed), 'r') + repo.dirstate.update(repo.dirstate.filterfiles(merged), 'm') p1, p2 = repo.dirstate.parents() repo.dirstate.setparents(p1, merge) files = patch.updatedir(self.ui, repo, files, wlock=wlock)