author | Raphaël Gomès <rgomes@octobus.net> |
Mon, 28 Mar 2022 18:09:01 +0200 | |
changeset 49161 | c1a3fdedc492 |
parent 48966 | 6000f5b25c9b |
permissions | -rw-r--r-- |
30876
f3807a135e43
wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 |
from mercurial.i18n import _ |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
30876
diff
changeset
|
2 |
from mercurial import changegroup, error, extensions |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
30876
diff
changeset
|
3 |
|
30876
f3807a135e43
wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
|
f3807a135e43
wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
5 |
def abort(orig, *args, **kwargs): |
f3807a135e43
wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
6 |
raise error.Abort(_('this is an exercise')) |
f3807a135e43
wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
7 |
|
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
30876
diff
changeset
|
8 |
|
30876
f3807a135e43
wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
9 |
def uisetup(ui): |
f3807a135e43
wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
extensions.wrapfunction(changegroup, 'getbundler', abort) |