Mercurial > hg
comparison tests/test-hook.t @ 15929:4091660dc130
tag: invalidate tag cache immediately after adding new tag (issue3210)
New tags were written to .hgtags / .hglocaltags without updating or
invalidating the localrepo cache.
Before afd459933d5f a lock was acquired soon after the new tags had been
written, and that invalidated the cache so the new tags for example could be
seen in pretxncommit hooks. With afd459933d5f the lock had already been
acquired at this point and the missing cache invalidation was exposed.
The tag caches will now explicitly and immediately be invalidated when new tags
are added.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 19 Jan 2012 02:14:06 +0100 |
parents | 30c34fde40cc |
children | 5653f2d166ea |
comparison
equal
deleted
inserted
replaced
15928:3a51eb88046a | 15929:4091660dc130 |
---|---|
351 > return 1 + {} | 351 > return 1 + {} |
352 > | 352 > |
353 > def verbosehook(ui, **args): | 353 > def verbosehook(ui, **args): |
354 > ui.note('verbose output from hook\n') | 354 > ui.note('verbose output from hook\n') |
355 > | 355 > |
356 > def printtags(ui, repo, **args): | |
357 > print repo.tags().keys() | |
358 > | |
356 > class container: | 359 > class container: |
357 > unreachable = 1 | 360 > unreachable = 1 |
358 > EOF | 361 > EOF |
359 | 362 |
360 test python hooks | 363 test python hooks |
567 calling hook pre-identify.a: hooktests.verbosehook | 570 calling hook pre-identify.a: hooktests.verbosehook |
568 verbose output from hook | 571 verbose output from hook |
569 calling hook pre-identify.c: hooktests.verbosehook | 572 calling hook pre-identify.c: hooktests.verbosehook |
570 verbose output from hook | 573 verbose output from hook |
571 cb9a9f314b8b | 574 cb9a9f314b8b |
575 | |
576 new tags must be visible in pretxncommit (issue3210) | |
577 | |
578 $ echo 'pretxncommit.printtags = python:hooktests.printtags' >> .hg/hgrc | |
579 $ hg tag -f foo | |
580 ['a', 'foo', 'tip'] | |
581 |