Show More
@@ -297,7 +297,7 b' class AbortNoCleanup(error.Abort):' | |||
|
297 | 297 | pass |
|
298 | 298 | |
|
299 | 299 | class queue(object): |
|
300 | def __init__(self, ui, path, patchdir=None): | |
|
300 | def __init__(self, ui, baseui, path, patchdir=None): | |
|
301 | 301 | self.basepath = path |
|
302 | 302 | try: |
|
303 | 303 | fh = open(os.path.join(path, 'patches.queue')) |
@@ -312,6 +312,7 b' class queue(object):' | |||
|
312 | 312 | self.path = patchdir or curpath |
|
313 | 313 | self.opener = scmutil.opener(self.path) |
|
314 | 314 | self.ui = ui |
|
315 | self.baseui = baseui | |
|
315 | 316 | self.applieddirty = False |
|
316 | 317 | self.seriesdirty = False |
|
317 | 318 | self.added = [] |
@@ -1774,9 +1775,7 b' class queue(object):' | |||
|
1774 | 1775 | return True |
|
1775 | 1776 | |
|
1776 | 1777 | def qrepo(self, create=False): |
|
1777 | ui = self.ui.copy() | |
|
1778 | ui.setconfig('paths', 'default', '', overlay=False) | |
|
1779 | ui.setconfig('paths', 'default-push', '', overlay=False) | |
|
1778 | ui = self.baseui.copy() | |
|
1780 | 1779 | if create or os.path.isdir(self.join(".hg")): |
|
1781 | 1780 | return hg.repository(ui, path=self.path, create=create) |
|
1782 | 1781 | |
@@ -2761,7 +2760,7 b' def push(ui, repo, patch=None, **opts):' | |||
|
2761 | 2760 | if not newpath: |
|
2762 | 2761 | ui.warn(_("no saved queues found, please use -n\n")) |
|
2763 | 2762 | return 1 |
|
2764 | mergeq = queue(ui, repo.path, newpath) | |
|
2763 | mergeq = queue(ui, repo.baseui, repo.path, newpath) | |
|
2765 | 2764 | ui.warn(_("merging with queue at: %s\n") % mergeq.path) |
|
2766 | 2765 | ret = q.push(repo, patch, force=opts.get('force'), list=opts.get('list'), |
|
2767 | 2766 | mergeq=mergeq, all=opts.get('all'), move=opts.get('move'), |
@@ -2795,7 +2794,7 b' def pop(ui, repo, patch=None, **opts):' | |||
|
2795 | 2794 | opts = fixkeepchangesopts(ui, opts) |
|
2796 | 2795 | localupdate = True |
|
2797 | 2796 | if opts.get('name'): |
|
2798 | q = queue(ui, repo.path, repo.join(opts.get('name'))) | |
|
2797 | q = queue(ui, repo.baseui, repo.path, repo.join(opts.get('name'))) | |
|
2799 | 2798 | ui.warn(_('using patch queue: %s\n') % q.path) |
|
2800 | 2799 | localupdate = False |
|
2801 | 2800 | else: |
@@ -3413,7 +3412,7 b' def reposetup(ui, repo):' | |||
|
3413 | 3412 | class mqrepo(repo.__class__): |
|
3414 | 3413 | @util.propertycache |
|
3415 | 3414 | def mq(self): |
|
3416 | return queue(self.ui, self.path) | |
|
3415 | return queue(self.ui, self.baseui, self.path) | |
|
3417 | 3416 | |
|
3418 | 3417 | def abortifwdirpatched(self, errmsg, force=False): |
|
3419 | 3418 | if self.mq.applied and not force: |
General Comments 0
You need to be logged in to leave comments.
Login now