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.)
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/transaction.py (6 lines) |
| 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: | ||||