comparison mercurial/repair.py @ 32923:e413609659cf

strip: remove unncessary "del" and inline variable
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 19 Jun 2017 13:13:28 -0700
parents eb84b4ad41e5
children f044295cdb7a
comparison
equal deleted inserted replaced
32922:eb84b4ad41e5 32923:e413609659cf
166 tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp', 166 tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp',
167 compress=False, obsolescence=False) 167 compress=False, obsolescence=False)
168 168
169 mfst = repo.manifestlog._revlog 169 mfst = repo.manifestlog._revlog
170 170
171 curtr = repo.currenttransaction() 171 if repo.currenttransaction() is not None:
172 if curtr is not None:
173 del curtr # avoid carrying reference to transaction for nothing
174 raise error.ProgrammingError('cannot strip from inside a transaction') 172 raise error.ProgrammingError('cannot strip from inside a transaction')
175 173
176 try: 174 try:
177 with repo.transaction("strip") as tr: 175 with repo.transaction("strip") as tr:
178 offset = len(tr.entries) 176 offset = len(tr.entries)