diff -r 169d2470d283 -r a920abf5a592 hgext/histedit.py --- a/hgext/histedit.py Thu May 07 07:46:39 2015 +0900 +++ b/hgext/histedit.py Fri May 01 15:28:47 2015 -0700 @@ -252,7 +252,10 @@ for replacement in self.replacements: fp.write('%s%s\n' % (node.hex(replacement[0]), ''.join(node.hex(r) for r in replacement[1]))) - fp.write('%s\n' % self.backupfile) + backupfile = self.backupfile + if not backupfile: + backupfile = '' + fp.write('%s\n' % backupfile) fp.close() def _load(self):