# HG changeset patch # User Pierre-Yves David # Date 2014-10-02 02:40:44 # Node ID c4d63f6740b8d371386bdba0030a2b3e196cf517 # Parent 9ea2913e7c416eee182725df87d81910feccdcdd transaction: work around and document issue with file backup The backup restoration is actually hard-coded for the main file. And this hard-coded list is the only one used when repairing an interrupted transaction from another process. Solving this problem is out of the scope of this series so we document it and work around its implications. diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -243,7 +243,11 @@ class transaction(object): files = [] try: for name in filenames: - self.addbackup(name) + # Some files are already backed up when creating the + # localrepo. Until this is properly fixed we disable the + # backup for them. + if name not in ('phaseroots',): + self.addbackup(name) files.append(self.opener(name, 'w', atomictemp=True)) genfunc(*files) finally: