Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/subrepo.py @ 35380:c999d246e48c
py3: handle keyword arguments correctly in subrepo.py
Differential Revision: https://phab.mercurial-scm.org/D1644
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 10 Dec 2017 04:49:40 +0530 |
parents | ee64e677c3cf |
children | 72b91f905065 |
comparison
equal
deleted
inserted
replaced
35379:c5853c9a6545 | 35380:c999d246e48c |
---|---|
58 return hashlib.sha1(_expandedabspath(remotepath)).hexdigest()[0:12] | 58 return hashlib.sha1(_expandedabspath(remotepath)).hexdigest()[0:12] |
59 | 59 |
60 class SubrepoAbort(error.Abort): | 60 class SubrepoAbort(error.Abort): |
61 """Exception class used to avoid handling a subrepo error more than once""" | 61 """Exception class used to avoid handling a subrepo error more than once""" |
62 def __init__(self, *args, **kw): | 62 def __init__(self, *args, **kw): |
63 self.subrepo = kw.pop('subrepo', None) | 63 self.subrepo = kw.pop(r'subrepo', None) |
64 self.cause = kw.pop('cause', None) | 64 self.cause = kw.pop(r'cause', None) |
65 error.Abort.__init__(self, *args, **kw) | 65 error.Abort.__init__(self, *args, **kw) |
66 | 66 |
67 def annotatesubrepoerror(func): | 67 def annotatesubrepoerror(func): |
68 def decoratedmethod(self, *args, **kargs): | 68 def decoratedmethod(self, *args, **kargs): |
69 try: | 69 try: |
1242 cmd = [self._exe] | 1242 cmd = [self._exe] |
1243 extrakw = {} | 1243 extrakw = {} |
1244 if not self.ui.interactive(): | 1244 if not self.ui.interactive(): |
1245 # Making stdin be a pipe should prevent svn from behaving | 1245 # Making stdin be a pipe should prevent svn from behaving |
1246 # interactively even if we can't pass --non-interactive. | 1246 # interactively even if we can't pass --non-interactive. |
1247 extrakw['stdin'] = subprocess.PIPE | 1247 extrakw[r'stdin'] = subprocess.PIPE |
1248 # Starting in svn 1.5 --non-interactive is a global flag | 1248 # Starting in svn 1.5 --non-interactive is a global flag |
1249 # instead of being per-command, but we need to support 1.4 so | 1249 # instead of being per-command, but we need to support 1.4 so |
1250 # we have to be intelligent about what commands take | 1250 # we have to be intelligent about what commands take |
1251 # --non-interactive. | 1251 # --non-interactive. |
1252 if commands[0] in ('update', 'checkout', 'commit'): | 1252 if commands[0] in ('update', 'checkout', 'commit'): |