Show More
@@ -920,6 +920,8 b' class localrepository(repo.repository):' | |||||
920 | l = self._lockref and self._lockref() |
|
920 | l = self._lockref and self._lockref() | |
921 | if l: |
|
921 | if l: | |
922 | l.postrelease.append(callback) |
|
922 | l.postrelease.append(callback) | |
|
923 | else: | |||
|
924 | callback() | |||
923 |
|
925 | |||
924 | def lock(self, wait=True): |
|
926 | def lock(self, wait=True): | |
925 | '''Lock the repository store (.hg/store) and return a weak reference |
|
927 | '''Lock the repository store (.hg/store) and return a weak reference | |
@@ -1209,7 +1211,9 b' class localrepository(repo.repository):' | |||||
1209 | finally: |
|
1211 | finally: | |
1210 | wlock.release() |
|
1212 | wlock.release() | |
1211 |
|
1213 | |||
1212 |
|
|
1214 | def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2): | |
|
1215 | self.hook("commit", node=node, parent1=parent1, parent2=parent2) | |||
|
1216 | self._afterlock(commithook) | |||
1213 | return ret |
|
1217 | return ret | |
1214 |
|
1218 | |||
1215 | def commitctx(self, ctx, error=False): |
|
1219 | def commitctx(self, ctx, error=False): |
@@ -101,9 +101,9 b' tag hooks can see env vars' | |||||
101 | precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 |
|
101 | precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
102 | pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a |
|
102 | pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a | |
103 | 4:539e4b31b6dc |
|
103 | 4:539e4b31b6dc | |
|
104 | tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a | |||
104 | commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 |
|
105 | commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
105 | commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 |
|
106 | commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
106 | tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a |
|
|||
107 | $ hg tag -l la |
|
107 | $ hg tag -l la | |
108 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la |
|
108 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
109 | tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la |
|
109 | tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la |
@@ -300,3 +300,16 b' tagging on an uncommitted merge (issue25' | |||||
300 | t3 1:c3adabd1a5f4 local |
|
300 | t3 1:c3adabd1a5f4 local | |
301 |
|
301 | |||
302 | $ cd .. |
|
302 | $ cd .. | |
|
303 | ||||
|
304 | commit hook on tag used to be run without write lock - issue3344 | |||
|
305 | ||||
|
306 | $ hg init repo-tag | |||
|
307 | $ hg init repo-tag-target | |||
|
308 | $ hg -R repo-tag --config hooks.commit="hg push \"`pwd`/repo-tag-target\"" tag tag | |||
|
309 | pushing to $TESTTMP/repo-tag-target | |||
|
310 | searching for changes | |||
|
311 | adding changesets | |||
|
312 | adding manifests | |||
|
313 | adding file changes | |||
|
314 | added 1 changesets with 1 changes to 1 files | |||
|
315 |
General Comments 0
You need to be logged in to leave comments.
Login now