This make the code shorter and clearer.
(This is an opportunity improvement while looking at something next to that.)
pulkit |
hg-reviewers |
This make the code shorter and clearer.
(This is an opportunity improvement while looking at something next to that.)
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/transaction.py (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
4a7e836b4730 | a9a1f7772efb | Pierre-Yves David | Jun 8 2021, 6:59 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Abandoned | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
transaction is not explicitly committed before going out of | transaction is not explicitly committed before going out of | ||||
scope)""" | scope)""" | ||||
self._abort() | self._abort() | ||||
def _writeundo(self): | def _writeundo(self): | ||||
"""write transaction data for possible future undo call""" | """write transaction data for possible future undo call""" | ||||
if self._undoname is None: | if self._undoname is None: | ||||
return | return | ||||
undobackupfile = self._opener.open( | |||||
b"%s.backupfiles" % self._undoname, b'w' | undo_backup_path = b"%s.backupfiles" % self._undoname | ||||
) | undobackupfile = self._opener.open(undo_backup_path, b'w') | ||||
undobackupfile.write(b'%d\n' % version) | undobackupfile.write(b'%d\n' % version) | ||||
for l, f, b, c in self._backupentries: | for l, f, b, c in self._backupentries: | ||||
if not f: # temporary file | if not f: # temporary file | ||||
continue | continue | ||||
if not b: | if not b: | ||||
u = b'' | u = b'' | ||||
else: | else: | ||||
if l not in self._vfsmap and c: | if l not in self._vfsmap and c: |