tests/test-hook.t
changeset 15896 30c34fde40cc
parent 15651 e69a3cdad37e
child 15929 4091660dc130
--- a/tests/test-hook.t	Sun Jan 15 18:00:01 2012 -0600
+++ b/tests/test-hook.t	Sun Jan 15 13:50:12 2012 -0700
@@ -553,3 +553,19 @@
   calling hook pre-identify: hooktests.verbosehook
   verbose output from hook
   cb9a9f314b8b
+
+Ensure hooks can be prioritized
+
+  $ echo '[hooks]' > .hg/hgrc
+  $ echo 'pre-identify.a = python:hooktests.verbosehook' >> .hg/hgrc
+  $ echo 'pre-identify.b = python:hooktests.verbosehook' >> .hg/hgrc
+  $ echo 'priority.pre-identify.b = 1' >> .hg/hgrc
+  $ echo 'pre-identify.c = python:hooktests.verbosehook' >> .hg/hgrc
+  $ hg id --verbose
+  calling hook pre-identify.b: hooktests.verbosehook
+  verbose output from hook
+  calling hook pre-identify.a: hooktests.verbosehook
+  verbose output from hook
+  calling hook pre-identify.c: hooktests.verbosehook
+  verbose output from hook
+  cb9a9f314b8b