comparison mercurial/util.py @ 1594:a329e0fda2ae

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Fri, 16 Dec 2005 11:13:08 -0600
parents 5a3229cf1492 6bb3463b124b
children c50bddfbc812
comparison
equal deleted inserted replaced
1592:347c44611348 1594:a329e0fda2ae
523 rcpath.append(os.path.expanduser('~/.hgrc')) 523 rcpath.append(os.path.expanduser('~/.hgrc'))
524 rcpath = [os.path.normpath(f) for f in rcpath] 524 rcpath = [os.path.normpath(f) for f in rcpath]
525 525
526 def parse_patch_output(output_line): 526 def parse_patch_output(output_line):
527 """parses the output produced by patch and returns the file name""" 527 """parses the output produced by patch and returns the file name"""
528 return output_line[14:] 528 pf = output_line[14:]
529 if pf.startswith("'") and pf.endswith("'") and pf.find(" ") >= 0:
530 pf = pf[1:-1] # Remove the quotes
531 return pf
529 532
530 def is_exec(f, last): 533 def is_exec(f, last):
531 """check whether a file is executable""" 534 """check whether a file is executable"""
532 return (os.stat(f).st_mode & 0100 != 0) 535 return (os.stat(f).st_mode & 0100 != 0)
533 536