Show More
@@ -120,10 +120,11 b' def _exthook(ui, repo, name, cmd, args, ' | |||
|
120 | 120 | env = {} |
|
121 | 121 | |
|
122 | 122 | # make in-memory changes visible to external process |
|
123 | tr = repo.currenttransaction() | |
|
124 | repo.dirstate.write(tr) | |
|
125 | if tr and tr.writepending(): | |
|
126 | env['HG_PENDING'] = repo.root | |
|
123 | if repo is not None: | |
|
124 | tr = repo.currenttransaction() | |
|
125 | repo.dirstate.write(tr) | |
|
126 | if tr and tr.writepending(): | |
|
127 | env['HG_PENDING'] = repo.root | |
|
127 | 128 | |
|
128 | 129 | for k, v in args.iteritems(): |
|
129 | 130 | if callable(v): |
@@ -681,10 +681,19 b' new tags must be visible in pretxncommit' | |||
|
681 | 681 | $ hg tag -f foo |
|
682 | 682 | ['a', 'foo', 'tip'] |
|
683 | 683 | |
|
684 | post-init hooks must not crash (issue4983) | |
|
685 | This also creates the `to` repo for the next test block. | |
|
686 | ||
|
687 | $ cd .. | |
|
688 | $ cat << EOF >> hgrc-with-post-init-hook | |
|
689 | > [hooks] | |
|
690 | > post-init = printenv.py post-init | |
|
691 | > EOF | |
|
692 | $ HGRCPATH=hgrc-with-post-init-hook hg init to | |
|
693 | post-init hook: HG_ARGS=init to HG_OPTS={'insecure': None, 'remotecmd': '', 'ssh': ''} HG_PATS=['to'] HG_RESULT=0 | |
|
694 | ||
|
684 | 695 | new commits must be visible in pretxnchangegroup (issue3428) |
|
685 | 696 | |
|
686 | $ cd .. | |
|
687 | $ hg init to | |
|
688 | 697 | $ echo '[hooks]' >> to/.hg/hgrc |
|
689 | 698 | $ echo 'prechangegroup = hg --traceback tip' >> to/.hg/hgrc |
|
690 | 699 | $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc |
General Comments 0
You need to be logged in to leave comments.
Login now