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