comparison hgext/rebase.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 8af610bce239
children 1aee2ab0f902
comparison
equal deleted inserted replaced
26747:beff0b2481b3 26748:5ba0a99ff27f
626 if repo['.'].rev() != p1: 626 if repo['.'].rev() != p1:
627 repo.ui.debug(" update to %d:%s\n" % (p1, repo[p1])) 627 repo.ui.debug(" update to %d:%s\n" % (p1, repo[p1]))
628 merge.update(repo, p1, False, True, False) 628 merge.update(repo, p1, False, True, False)
629 else: 629 else:
630 repo.ui.debug(" already in target\n") 630 repo.ui.debug(" already in target\n")
631 repo.dirstate.write() 631 repo.dirstate.write(repo.currenttransaction())
632 repo.ui.debug(" merge against %d:%s\n" % (rev, repo[rev])) 632 repo.ui.debug(" merge against %d:%s\n" % (rev, repo[rev]))
633 if base is not None: 633 if base is not None:
634 repo.ui.debug(" detach base %d:%s\n" % (base, repo[base])) 634 repo.ui.debug(" detach base %d:%s\n" % (base, repo[base]))
635 # When collapsing in-place, the parent is the common ancestor, we 635 # When collapsing in-place, the parent is the common ancestor, we
636 # have to allow merging with it. 636 # have to allow merging with it.