comparison tests/test-hook.t @ 26859:e7c618cee8df stable

hooks: fix hooks not firing if prechangegroup was set (issue4934) We need to call delayupdate again after writing to the changelog. Otherwise the prechangegroup hook consumes the delayupdate subscription and future hooks don't see the pending changes (see issue 4934 for more details). Adds a test that triggers the prechangegroup hook before the pretxnchangegroup hook and verifies that the output of pretxnchangegroup doesn't change.
author Durham Goode <durham@fb.com>
date Tue, 03 Nov 2015 17:13:27 -0800
parents 9f272bf3b342
children 10a1a4b3e775
comparison
equal deleted inserted replaced
26858:9f272bf3b342 26859:e7c618cee8df
684 new commits must be visible in pretxnchangegroup (issue3428) 684 new commits must be visible in pretxnchangegroup (issue3428)
685 685
686 $ cd .. 686 $ cd ..
687 $ hg init to 687 $ hg init to
688 $ echo '[hooks]' >> to/.hg/hgrc 688 $ echo '[hooks]' >> to/.hg/hgrc
689 $ echo 'prechangegroup = hg --traceback tip' >> to/.hg/hgrc
689 $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc 690 $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc
690 $ echo a >> to/a 691 $ echo a >> to/a
691 $ hg --cwd to ci -Ama 692 $ hg --cwd to ci -Ama
692 adding a 693 adding a
693 $ hg clone to from 694 $ hg clone to from
696 $ echo aa >> from/a 697 $ echo aa >> from/a
697 $ hg --cwd from ci -mb 698 $ hg --cwd from ci -mb
698 $ hg --cwd from push 699 $ hg --cwd from push
699 pushing to $TESTTMP/to (glob) 700 pushing to $TESTTMP/to (glob)
700 searching for changes 701 searching for changes
702 changeset: 0:cb9a9f314b8b
703 tag: tip
704 user: test
705 date: Thu Jan 01 00:00:00 1970 +0000
706 summary: a
707
701 adding changesets 708 adding changesets
702 adding manifests 709 adding manifests
703 adding file changes 710 adding file changes
704 added 1 changesets with 1 changes to 1 files 711 added 1 changesets with 1 changes to 1 files
705 changeset: 1:9836a07b9b9d 712 changeset: 1:9836a07b9b9d