equal
deleted
inserted
replaced
324 |
324 |
325 verify that bookmarks are not written on failed transaction |
325 verify that bookmarks are not written on failed transaction |
326 |
326 |
327 $ cat > failpullbookmarks.py << EOF |
327 $ cat > failpullbookmarks.py << EOF |
328 > """A small extension that makes bookmark pulls fail, for testing""" |
328 > """A small extension that makes bookmark pulls fail, for testing""" |
329 > from mercurial import extensions, exchange, error |
329 > from __future__ import absolute_import |
|
330 > from mercurial import ( |
|
331 > error, |
|
332 > exchange, |
|
333 > extensions, |
|
334 > ) |
330 > def _pullbookmarks(orig, pullop): |
335 > def _pullbookmarks(orig, pullop): |
331 > orig(pullop) |
336 > orig(pullop) |
332 > raise error.HookAbort('forced failure by extension') |
337 > raise error.HookAbort('forced failure by extension') |
333 > def extsetup(ui): |
338 > def extsetup(ui): |
334 > extensions.wrapfunction(exchange, '_pullbookmarks', _pullbookmarks) |
339 > extensions.wrapfunction(exchange, '_pullbookmarks', _pullbookmarks) |