Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 37463:bbd240f81ac5
procutil: make explainexit() simply return a message (API)
Almost all callers want it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 07 Apr 2018 21:23:42 +0900 |
parents | 6890b7e991a4 |
children | c6904da6ab15 |
comparison
equal
deleted
inserted
replaced
37462:c0d0fd87ba7c | 37463:bbd240f81ac5 |
---|---|
1499 out = self | 1499 out = self |
1500 with self.timeblockedsection(blockedtag): | 1500 with self.timeblockedsection(blockedtag): |
1501 rc = self._runsystem(cmd, environ=environ, cwd=cwd, out=out) | 1501 rc = self._runsystem(cmd, environ=environ, cwd=cwd, out=out) |
1502 if rc and onerr: | 1502 if rc and onerr: |
1503 errmsg = '%s %s' % (os.path.basename(cmd.split(None, 1)[0]), | 1503 errmsg = '%s %s' % (os.path.basename(cmd.split(None, 1)[0]), |
1504 procutil.explainexit(rc)[0]) | 1504 procutil.explainexit(rc)) |
1505 if errprefix: | 1505 if errprefix: |
1506 errmsg = '%s: %s' % (errprefix, errmsg) | 1506 errmsg = '%s: %s' % (errprefix, errmsg) |
1507 raise onerr(errmsg) | 1507 raise onerr(errmsg) |
1508 return rc | 1508 return rc |
1509 | 1509 |