tests/test-hook.t
changeset 26587 56b2bcea2529
parent 26028 6fbe35588433
child 26692 8d1cfd77b64f
equal deleted inserted replaced
26586:d51c658d3f04 26587:56b2bcea2529
   392   [255]
   392   [255]
   393 
   393 
   394   $ cd "$TESTTMP/b"
   394   $ cd "$TESTTMP/b"
   395 
   395 
   396   $ cat > hooktests.py <<EOF
   396   $ cat > hooktests.py <<EOF
   397   > from mercurial import util
   397   > from mercurial import error
   398   > 
   398   > 
   399   > uncallable = 0
   399   > uncallable = 0
   400   > 
   400   > 
   401   > def printargs(args):
   401   > def printargs(args):
   402   >     args.pop('ui', None)
   402   >     args.pop('ui', None)
   419   > 
   419   > 
   420   > def raisehook(**args):
   420   > def raisehook(**args):
   421   >     raise LocalException('exception from hook')
   421   >     raise LocalException('exception from hook')
   422   > 
   422   > 
   423   > def aborthook(**args):
   423   > def aborthook(**args):
   424   >     raise util.Abort('raise abort from hook')
   424   >     raise error.Abort('raise abort from hook')
   425   > 
   425   > 
   426   > def brokenhook(**args):
   426   > def brokenhook(**args):
   427   >     return 1 + {}
   427   >     return 1 + {}
   428   > 
   428   > 
   429   > def verbosehook(ui, **args):
   429   > def verbosehook(ui, **args):