##// END OF EJS Templates
Use platform-appropriate rc file names.
Bryan O'Sullivan -
r1292:14195127 default
parent child Browse files
Show More
@@ -14,8 +14,7 b' class ui:'
14 interactive=True):
14 interactive=True):
15 self.overlay = {}
15 self.overlay = {}
16 self.cdata = ConfigParser.SafeConfigParser()
16 self.cdata = ConfigParser.SafeConfigParser()
17 self.cdata.read([os.path.normpath(hgrc) for hgrc in
17 self.cdata.read(util.rcpath)
18 "/etc/mercurial/hgrc", os.path.expanduser("~/.hgrc")])
19
18
20 self.quiet = self.configbool("ui", "quiet")
19 self.quiet = self.configbool("ui", "quiet")
21 self.verbose = self.configbool("ui", "verbose")
20 self.verbose = self.configbool("ui", "verbose")
@@ -45,7 +45,7 b' def patch(strip, patchname, ui):'
45 if code:
45 if code:
46 raise Abort("patch command failed: exit status %s " % code)
46 raise Abort("patch command failed: exit status %s " % code)
47 return files.keys()
47 return files.keys()
48
48
49 def binary(s):
49 def binary(s):
50 """return true if a string is binary data using diff's heuristic"""
50 """return true if a string is binary data using diff's heuristic"""
51 if s and '\0' in s[:4096]:
51 if s and '\0' in s[:4096]:
@@ -331,6 +331,9 b' else:'
331 if os.name == 'nt':
331 if os.name == 'nt':
332 nulldev = 'NUL:'
332 nulldev = 'NUL:'
333
333
334 rcpath = (r'c:\mercurial\mercurial.ini',
335 os.path.join(os.path.expanduser('~'), 'mercurial.ini'))
336
334 def parse_patch_output(output_line):
337 def parse_patch_output(output_line):
335 """parses the output produced by patch and returns the file name"""
338 """parses the output produced by patch and returns the file name"""
336 pf = output_line[14:]
339 pf = output_line[14:]
@@ -383,6 +386,9 b" if os.name == 'nt':"
383 else:
386 else:
384 nulldev = '/dev/null'
387 nulldev = '/dev/null'
385
388
389 rcpath = map(os.path.normpath,
390 ('/etc/mercurial/hgrc', os.path.expanduser('~/.hgrc')))
391
386 def parse_patch_output(output_line):
392 def parse_patch_output(output_line):
387 """parses the output produced by patch and returns the file name"""
393 """parses the output produced by patch and returns the file name"""
388 return output_line[14:]
394 return output_line[14:]
General Comments 0
You need to be logged in to leave comments. Login now