Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/subrepo.py @ 29510:19205a0e2bf1
error: make hintable exceptions reject unknown keyword arguments (API)
Previously they would accept any typos of the hint keyword.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 11 Jul 2016 21:40:02 +0900 |
parents | 98e8313dcd9e |
children | a145161debed |
comparison
equal
deleted
inserted
replaced
29509:945b4c14c570 | 29510:19205a0e2bf1 |
---|---|
54 return hashlib.sha1(_expandedabspath(remotepath)).hexdigest()[0:12] | 54 return hashlib.sha1(_expandedabspath(remotepath)).hexdigest()[0:12] |
55 | 55 |
56 class SubrepoAbort(error.Abort): | 56 class SubrepoAbort(error.Abort): |
57 """Exception class used to avoid handling a subrepo error more than once""" | 57 """Exception class used to avoid handling a subrepo error more than once""" |
58 def __init__(self, *args, **kw): | 58 def __init__(self, *args, **kw): |
59 self.subrepo = kw.pop('subrepo', None) | |
60 self.cause = kw.pop('cause', None) | |
59 error.Abort.__init__(self, *args, **kw) | 61 error.Abort.__init__(self, *args, **kw) |
60 self.subrepo = kw.get('subrepo') | |
61 self.cause = kw.get('cause') | |
62 | 62 |
63 def annotatesubrepoerror(func): | 63 def annotatesubrepoerror(func): |
64 def decoratedmethod(self, *args, **kargs): | 64 def decoratedmethod(self, *args, **kargs): |
65 try: | 65 try: |
66 res = func(self, *args, **kargs) | 66 res = func(self, *args, **kargs) |