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) |