Mercurial > hg > mercurial-crew-with-dirclash
diff hgext/mq.py @ 3499:ceaa3fefc10c
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 24 Oct 2006 13:46:04 -0500 |
parents | 0e68608bd11d |
children | fbf8320f25c8 |
line wrap: on
line diff
--- a/hgext/mq.py +++ b/hgext/mq.py @@ -408,14 +408,15 @@ class queue: def patch(self, repo, patchfile): '''Apply patchfile to the working directory. patchfile: file name of patch''' + files = {} try: - (files, fuzz) = patch.patch(patchfile, self.ui, strip=1, - cwd=repo.root) + fuzz = patch.patch(patchfile, self.ui, strip=1, cwd=repo.root, + files=files) except Exception, inst: self.ui.note(str(inst) + '\n') if not self.ui.verbose: self.ui.warn("patch failed, unable to continue (try -v)\n") - return (False, [], False) + return (False, files, False) return (True, files, fuzz) @@ -592,7 +593,7 @@ class queue: if stop in chlog.nodemap: stoprev = chlog.rev(stop) - for r in range(chlog.count() - 1, -1, -1): + for r in xrange(chlog.count() - 1, -1, -1): n = chlog.node(r) if n not in p: h.append(n) @@ -954,7 +955,7 @@ class queue: if comments: # Remove existing message. ci = 0 - for mi in range(len(message)): + for mi in xrange(len(message)): while message[mi] != comments[ci]: ci += 1 del comments[ci] @@ -1035,7 +1036,7 @@ class queue: # if the patch excludes a modified file, mark that file with mtime=0 # so status can see it. mm = [] - for i in range(len(m)-1, -1, -1): + for i in xrange(len(m)-1, -1, -1): if not matchfn(m[i]): mm.append(m[i]) del m[i] @@ -1103,7 +1104,7 @@ class queue: if not length: length = len(self.series) - start if not missing: - for i in range(start, start+length): + for i in xrange(start, start+length): pfx = '' patch = pname(i) if self.ui.verbose: