comparison mercurial/dirstate.py @ 50267:f92afdf3cff9

transaction: remove the `branch` backup for transaction We can now back it up at the end of the transaction as we do for the rest of the dirstate.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 02 Mar 2023 15:33:04 +0100
parents 307c155e6275
children 9fc0d244a753 db6d210e9618
comparison
equal deleted inserted replaced
50266:307c155e6275 50267:f92afdf3cff9
1763 def all_file_names(self): 1763 def all_file_names(self):
1764 """list all filename currently used by this dirstate 1764 """list all filename currently used by this dirstate
1765 1765
1766 This is only used to do `hg rollback` related backup in the transaction 1766 This is only used to do `hg rollback` related backup in the transaction
1767 """ 1767 """
1768 if not self._opener.exists(self._filename): 1768 files = [b'branch']
1769 # no data every written to disk yet 1769 if self._opener.exists(self._filename):
1770 return () 1770 files.append(self._filename)
1771 elif self._use_dirstate_v2: 1771 if self._use_dirstate_v2:
1772 return ( 1772 files.append(self._map.docket.data_filename())
1773 self._filename, 1773 return tuple(files)
1774 self._map.docket.data_filename(),
1775 )
1776 else:
1777 return (self._filename,)
1778 1774
1779 def verify(self, m1, m2, p1, narrow_matcher=None): 1775 def verify(self, m1, m2, p1, narrow_matcher=None):
1780 """ 1776 """
1781 check the dirstate contents against the parent manifest and yield errors 1777 check the dirstate contents against the parent manifest and yield errors
1782 """ 1778 """