equal
deleted
inserted
replaced
700 self._journal = None |
700 self._journal = None |
701 self._releasefn(self, False) # notify failure of transaction |
701 self._releasefn(self, False) # notify failure of transaction |
702 self._releasefn = None # Help prevent cycles. |
702 self._releasefn = None # Help prevent cycles. |
703 |
703 |
704 |
704 |
|
705 BAD_VERSION_MSG = _( |
|
706 b"journal was created by a different version of Mercurial\n" |
|
707 ) |
|
708 |
|
709 |
705 def rollback(opener, vfsmap, file, report, checkambigfiles=None): |
710 def rollback(opener, vfsmap, file, report, checkambigfiles=None): |
706 """Rolls back the transaction contained in the given file |
711 """Rolls back the transaction contained in the given file |
707 |
712 |
708 Reads the entries in the specified file, and the corresponding |
713 Reads the entries in the specified file, and the corresponding |
709 '*.backupfiles' file, to recover from an incomplete transaction. |
714 '*.backupfiles' file, to recover from an incomplete transaction. |
744 # Shave off the trailing newline |
749 # Shave off the trailing newline |
745 line = line[:-1] |
750 line = line[:-1] |
746 l, f, b, c = line.split(b'\0') |
751 l, f, b, c = line.split(b'\0') |
747 backupentries.append((l, f, b, bool(c))) |
752 backupentries.append((l, f, b, bool(c))) |
748 else: |
753 else: |
749 report( |
754 report(BAD_VERSION_MSG) |
750 _( |
|
751 b"journal was created by a different version of " |
|
752 b"Mercurial\n" |
|
753 ) |
|
754 ) |
|
755 |
755 |
756 _playback( |
756 _playback( |
757 file, |
757 file, |
758 report, |
758 report, |
759 opener, |
759 opener, |