comparison hgext/record.py @ 16328:d388c3fc8319

record: fix up test issues sed on BSD requires an arg to -i sed failing exposed an uninitialized variable issue
author Matt Mackall <mpm@selenic.com>
date Sat, 31 Mar 2012 14:04:39 -0500
parents 46b991a1f428
children 525fdb738975 b013baa3898e
comparison
equal deleted inserted replaced
16326:b95b006e18cc 16328:d388c3fc8319
322 all lines of the hunk are removed, then the edit is aborted and 322 all lines of the hunk are removed, then the edit is aborted and
323 the hunk is left unchanged. 323 the hunk is left unchanged.
324 """) 324 """)
325 (patchfd, patchfn) = tempfile.mkstemp(prefix="hg-editor-", 325 (patchfd, patchfn) = tempfile.mkstemp(prefix="hg-editor-",
326 suffix=".diff", text=True) 326 suffix=".diff", text=True)
327 ncpatchfp = None
327 try: 328 try:
328 # Write the initial patch 329 # Write the initial patch
329 f = os.fdopen(patchfd, "w") 330 f = os.fdopen(patchfd, "w")
330 chunk.header.write(f) 331 chunk.header.write(f)
331 chunk.write(f) 332 chunk.write(f)