Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 26748:5ba0a99ff27f
dirstate: make dirstate.write() callers pass transaction object to it
Now, 'dirstate.write(tr)' delays writing in-memory changes out, if a
transaction is running.
This may cause treating this revision as "the first bad one" at
bisecting in some cases using external hook process inside transaction
scope, because some external hooks and editor process are still
invoked without HG_PENDING and pending changes aren't visible to them.
'dirstate.write()' callers below in localrepo.py explicitly use 'None'
as 'tr', because they can assume that no transaction is running:
- just before starting transaction
- at closing transaction, or
- at unlocking wlock
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 17 Oct 2015 01:15:34 +0900 |
parents | f4a27c05c43f |
children | 949e8c626d19 |
comparison
equal
deleted
inserted
replaced
26747:beff0b2481b3 | 26748:5ba0a99ff27f |
---|---|
1275 mergeancestor=mergeancestor, labels=labels) | 1275 mergeancestor=mergeancestor, labels=labels) |
1276 | 1276 |
1277 # drop the second merge parent | 1277 # drop the second merge parent |
1278 repo.dirstate.beginparentchange() | 1278 repo.dirstate.beginparentchange() |
1279 repo.setparents(repo['.'].node(), nullid) | 1279 repo.setparents(repo['.'].node(), nullid) |
1280 repo.dirstate.write() | 1280 repo.dirstate.write(repo.currenttransaction()) |
1281 # fix up dirstate for copies and renames | 1281 # fix up dirstate for copies and renames |
1282 copies.duplicatecopies(repo, ctx.rev(), pctx.rev()) | 1282 copies.duplicatecopies(repo, ctx.rev(), pctx.rev()) |
1283 repo.dirstate.endparentchange() | 1283 repo.dirstate.endparentchange() |
1284 return stats | 1284 return stats |