Show More
@@ -45,8 +45,9 b' create other, independent patch queues w' | |||
|
45 | 45 | from mercurial.i18n import _ |
|
46 | 46 | from mercurial.node import bin, hex, short, nullid, nullrev |
|
47 | 47 | from mercurial.lock import release |
|
48 |
from mercurial import commands, cmdutil, hg, |
|
|
48 | from mercurial import commands, cmdutil, hg, scmutil, util, revset | |
|
49 | 49 | from mercurial import repair, extensions, url, error |
|
50 | from mercurial import patch as patchmod | |
|
50 | 51 | import os, sys, re, errno, shutil |
|
51 | 52 | |
|
52 | 53 | commands.norepo += " qclone" |
@@ -321,7 +322,7 b' class queue(object):' | |||
|
321 | 322 | self.active_guards = None |
|
322 | 323 | |
|
323 | 324 | def diffopts(self, opts={}, patchfn=None): |
|
324 | diffopts = patch.diffopts(self.ui, opts) | |
|
325 | diffopts = patchmod.diffopts(self.ui, opts) | |
|
325 | 326 | if self.gitmode == 'auto': |
|
326 | 327 | diffopts.upgrade = True |
|
327 | 328 | elif self.gitmode == 'keep': |
@@ -613,7 +614,7 b' class queue(object):' | |||
|
613 | 614 | patchfile: name of patch file''' |
|
614 | 615 | files = {} |
|
615 | 616 | try: |
|
616 | fuzz = patch.patch(patchfile, self.ui, strip=1, cwd=repo.root, | |
|
617 | fuzz = patchmod.patch(patchfile, self.ui, strip=1, cwd=repo.root, | |
|
617 | 618 | files=files, eolmode=None) |
|
618 | 619 | except Exception, inst: |
|
619 | 620 | self.ui.note(str(inst) + '\n') |
@@ -947,7 +948,7 b' class queue(object):' | |||
|
947 | 948 | p.write(msg) |
|
948 | 949 | if commitfiles: |
|
949 | 950 | parent = self.qparents(repo, n) |
|
950 | chunks = patch.diff(repo, node1=parent, node2=n, | |
|
951 | chunks = patchmod.diff(repo, node1=parent, node2=n, | |
|
951 | 952 | match=match, opts=diffopts) |
|
952 | 953 | for chunk in chunks: |
|
953 | 954 | p.write(chunk) |
@@ -1407,7 +1408,7 b' class queue(object):' | |||
|
1407 | 1408 | a = list(aa) |
|
1408 | 1409 | c = [filter(matchfn, l) for l in (m, a, r)] |
|
1409 | 1410 | match = cmdutil.matchfiles(repo, set(c[0] + c[1] + c[2] + inclsubs)) |
|
1410 | chunks = patch.diff(repo, patchparent, match=match, | |
|
1411 | chunks = patchmod.diff(repo, patchparent, match=match, | |
|
1411 | 1412 | changes=c, opts=diffopts) |
|
1412 | 1413 | for chunk in chunks: |
|
1413 | 1414 | patchf.write(chunk) |
General Comments 0
You need to be logged in to leave comments.
Login now