##// END OF EJS Templates
merge: run update hook after the last wlock release...
merge: run update hook after the last wlock release There were 2 test failures in 3.4-rc when running test-hook.t with the largefiles extension enabled. For context, the first is a commit hook: @@ -618,9 +621,9 @@ $ echo 'update = hg id' >> .hg/hgrc $ echo bb > a $ hg ci -ma - 223eafe2750c tip + d3354c4310ed+ $ hg up 0 - cb9a9f314b8b + 223eafe2750c+ tip 1 files updated, 0 files merged, 0 files removed, 0 files unresolved make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui In both cases, largefiles acquires the wlock before calling into core, which also acquires the wlock. The first case was fixed in 57f1dbc99631 by ensuring the hook only runs after the lock has been fully released. The full release is important, because that is what writes dirstate to the disk, allowing external hooks to see the result of the update. This simply changes how the update hook is called, so that it too is deferred until the lock is finally released. There are many uses of mergemod.update(), but in terms of commands, it looks like the following commands take wlock while calling mergemod.update(), and therefore will now have their hook fired at a later time: backout, fetch, histedit, qpush, rebase, shelve, transplant Unlike the others, fetch immediately unlocks after calling update(), so for all intents and purposes, its hook invocation is not deferred (but the external hook still sees the proper state).

File last commit:

r24637:c1cb6523 default
r24881:51844b8b stable
Show More
map-cmdline.default
73 lines | 2.7 KiB | text/plain | TextLexer
# Base templates. Due to name clashes with existing keywords, we have
# to replace some keywords with 'lkeyword', for 'labelled keyword'
changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n'
changeset_quiet = '{lnode}'
changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
# File templates
lfiles = '{if(files,
label("ui.note log.files",
"files: {files}\n"))}'
lfile_mods = '{if(file_mods,
label("ui.debug log.files",
"files: {file_mods}\n"))}'
lfile_adds = '{if(file_adds,
label("ui.debug log.files",
"files+: {file_adds}\n"))}'
lfile_dels = '{if(file_dels,
label("ui.debug log.files",
"files-: {file_dels}\n"))}'
lfile_copies_switch = '{if(file_copies_switch,
label("ui.note log.copies",
"copies: {file_copies_switch
% ' {name} ({source})'}\n"))}'
# General templates
cset = '{label("log.changeset changeset.{phase}",
"changeset: {rev}:{node|short}")}\n'
lphase = '{label("log.phase",
"phase: {phase}")}\n'
fullcset = '{label("log.changeset changeset.{phase}",
"changeset: {rev}:{node}")}\n'
parent = '{label("log.parent changeset.{phase}",
"parent: {rev}:{node|formatnode}")}\n'
lnode = '{label("log.node",
"{rev}:{node|short}")}\n'
manifest = '{label("ui.debug log.manifest",
"manifest: {rev}:{node}")}\n'
branch = '{label("log.branch",
"branch: {branch}")}\n'
tag = '{label("log.tag",
"tag: {tag}")}\n'
bookmark = '{label("log.bookmark",
"bookmark: {bookmark}")}\n'
user = '{label("log.user",
"user: {author}")}\n'
summary = '{if(desc|strip, "{label('log.summary',
'summary: {desc|firstline}')}\n")}'
ldate = '{label("log.date",
"date: {date|date}")}\n'
extra = '{label("ui.debug log.extra",
"extra: {key}={value|stringescape}")}\n'
description = '{if(desc|strip, "{label('ui.note log.description',
'description:')}
{label('ui.note log.description',
'{desc|strip}')}\n\n")}'