comparison mercurial/exchange.py @ 46478:db9e33beb0fb

bundle2: print "error:abort" message to stderr instead of stdout It seems like the server's message is something you'd like to see even with `--quiet`. It's clearly part of the error. Differential Revision: https://phab.mercurial-scm.org/D9954
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 03 Feb 2021 23:23:56 -0800
parents 89a2afe31e82
children a41565bef69f
comparison
equal deleted inserted replaced
46477:3c360ab2688d 46478:db9e33beb0fb
1133 trgetter = pushop.trmanager.transaction 1133 trgetter = pushop.trmanager.transaction
1134 op = bundle2.processbundle(pushop.repo, reply, trgetter) 1134 op = bundle2.processbundle(pushop.repo, reply, trgetter)
1135 except error.BundleValueError as exc: 1135 except error.BundleValueError as exc:
1136 raise error.Abort(_(b'missing support for %s') % exc) 1136 raise error.Abort(_(b'missing support for %s') % exc)
1137 except bundle2.AbortFromPart as exc: 1137 except bundle2.AbortFromPart as exc:
1138 pushop.ui.status(_(b'remote: %s\n') % exc) 1138 pushop.ui.error(_(b'remote: %s\n') % exc)
1139 if exc.hint is not None: 1139 if exc.hint is not None:
1140 pushop.ui.status(_(b'remote: %s\n') % (b'(%s)' % exc.hint)) 1140 pushop.ui.error(_(b'remote: %s\n') % (b'(%s)' % exc.hint))
1141 raise error.Abort(_(b'push failed on remote')) 1141 raise error.Abort(_(b'push failed on remote'))
1142 except error.PushkeyFailed as exc: 1142 except error.PushkeyFailed as exc:
1143 partid = int(exc.partid) 1143 partid = int(exc.partid)
1144 if partid not in pushop.pkfailcb: 1144 if partid not in pushop.pkfailcb:
1145 raise 1145 raise
1830 pullop.repo, pullop.gettransaction, source=b'pull' 1830 pullop.repo, pullop.gettransaction, source=b'pull'
1831 ) 1831 )
1832 op.modes[b'bookmarks'] = b'records' 1832 op.modes[b'bookmarks'] = b'records'
1833 bundle2.processbundle(pullop.repo, bundle, op=op) 1833 bundle2.processbundle(pullop.repo, bundle, op=op)
1834 except bundle2.AbortFromPart as exc: 1834 except bundle2.AbortFromPart as exc:
1835 pullop.repo.ui.status(_(b'remote: abort: %s\n') % exc) 1835 pullop.repo.ui.error(_(b'remote: abort: %s\n') % exc)
1836 raise error.Abort(_(b'pull failed on remote'), hint=exc.hint) 1836 raise error.Abort(_(b'pull failed on remote'), hint=exc.hint)
1837 except error.BundleValueError as exc: 1837 except error.BundleValueError as exc:
1838 raise error.Abort(_(b'missing support for %s') % exc) 1838 raise error.Abort(_(b'missing support for %s') % exc)
1839 1839
1840 if pullop.fetch: 1840 if pullop.fetch: