Show More
@@ -5,7 +5,7 | |||||
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | import errno, os, re, xml.dom.minidom, shutil, posixpath |
|
8 | import errno, os, re, xml.dom.minidom, shutil, posixpath, sys | |
9 | import stat, subprocess, tarfile |
|
9 | import stat, subprocess, tarfile | |
10 | from i18n import _ |
|
10 | from i18n import _ | |
11 | import config, scmutil, util, node, error, cmdutil, bookmarks, match as matchmod |
|
11 | import config, scmutil, util, node, error, cmdutil, bookmarks, match as matchmod | |
@@ -41,6 +41,7 class SubrepoAbort(error.Abort): | |||||
41 | def __init__(self, *args, **kw): |
|
41 | def __init__(self, *args, **kw): | |
42 | error.Abort.__init__(self, *args, **kw) |
|
42 | error.Abort.__init__(self, *args, **kw) | |
43 | self.subrepo = kw.get('subrepo') |
|
43 | self.subrepo = kw.get('subrepo') | |
|
44 | self.cause = kw.get('cause') | |||
44 |
|
45 | |||
45 | def annotatesubrepoerror(func): |
|
46 | def annotatesubrepoerror(func): | |
46 | def decoratedmethod(self, *args, **kargs): |
|
47 | def decoratedmethod(self, *args, **kargs): | |
@@ -53,7 +54,8 def annotatesubrepoerror(func): | |||||
53 | subrepo = subrelpath(self) |
|
54 | subrepo = subrelpath(self) | |
54 | errormsg = str(ex) + ' ' + _('(in subrepo %s)') % subrepo |
|
55 | errormsg = str(ex) + ' ' + _('(in subrepo %s)') % subrepo | |
55 | # avoid handling this exception by raising a SubrepoAbort exception |
|
56 | # avoid handling this exception by raising a SubrepoAbort exception | |
56 |
raise SubrepoAbort(errormsg, hint=ex.hint, subrepo=subrepo |
|
57 | raise SubrepoAbort(errormsg, hint=ex.hint, subrepo=subrepo, | |
|
58 | cause=sys.exc_info()) | |||
57 | return res |
|
59 | return res | |
58 | return decoratedmethod |
|
60 | return decoratedmethod | |
59 |
|
61 |
General Comments 0
You need to be logged in to leave comments.
Login now