comparison mercurial/patch.py @ 7389:72f0e4ebd9e6

patch: remove useless unlink() call
author Patrick Mezard <pmezard@gmail.com>
date Wed, 19 Nov 2008 13:27:57 +0100
parents eae1767cc6a8
children 27d304c8cc03
comparison
equal deleted inserted replaced
7386:86bfd65532ac 7389:72f0e4ebd9e6
305 305
306 fname = self.fname + ".rej" 306 fname = self.fname + ".rej"
307 self.ui.warn( 307 self.ui.warn(
308 _("%d out of %d hunks FAILED -- saving rejects to file %s\n") % 308 _("%d out of %d hunks FAILED -- saving rejects to file %s\n") %
309 (len(self.rej), self.hunks, fname)) 309 (len(self.rej), self.hunks, fname))
310 try: os.unlink(fname)
311 except:
312 pass
313 fp = file(fname, 'wb') 310 fp = file(fname, 'wb')
314 base = os.path.basename(self.fname) 311 base = os.path.basename(self.fname)
315 fp.write("--- %s\n+++ %s\n" % (base, base)) 312 fp.write("--- %s\n+++ %s\n" % (base, base))
316 for x in self.rej: 313 for x in self.rej:
317 for l in x.hunk: 314 for l in x.hunk: