Mercurial > hg-onsub
comparison onsub.py @ 21:003eee5497e0
* Hotfixed onsub for use with mercurial 4.1+
author | Matthias Muenzner <matthias.muenzner@jkaref.com> |
---|---|
date | Mon, 08 May 2017 20:03:41 +0200 |
parents | 132e522fda32 |
children | f21f26513968 |
comparison
equal
deleted
inserted
replaced
20:132e522fda32 | 21:003eee5497e0 |
---|---|
114 if cmd != None and (repotypefilter == '' or repotypefilter == kind): | 114 if cmd != None and (repotypefilter == '' or repotypefilter == kind): |
115 if print0: | 115 if print0: |
116 ui.write(relpath, "\0") | 116 ui.write(relpath, "\0") |
117 if cmd != '': | 117 if cmd != '': |
118 if not print0: ui.note(_("executing '%s' in %s\n") % (cmd, relpath)) | 118 if not print0: ui.note(_("executing '%s' in %s\n") % (cmd, relpath)) |
119 util.system(cmd, environ=envargdict, cwd=cmdwd, onerr=onerr, | 119 rc = util.system(cmd, environ=envargdict, cwd=cmdwd) |
120 errprefix=_('terminated onsub in %s') % relpath) | 120 if rc: |
121 errprefix=_('terminated onsub in %s') % relpath | |
122 errmsg = '%s: %s' % (errprefix, errmsg) | |
123 try: | |
124 onerr.warn(errmsg + '\n') | |
125 except AttributeError: | |
126 raise onerr(errmsg) | |
121 | 127 |
122 def bfs(): | 128 def bfs(): |
123 """execute precmd in repo.root and in each subrepository, breadth-first""" | 129 """execute precmd in repo.root and in each subrepository, breadth-first""" |
124 if includeroot: | 130 if includeroot: |
125 execCmd(None, precmd, 'hg') | 131 execCmd(None, precmd, 'hg') |