comparison mercurial/util.py @ 13943:545091b12724

opener: use %r in format string for abort
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 15 Apr 2011 16:15:28 +0200
parents 155d2e17884e
children bc32bb0e909f
comparison
equal deleted inserted replaced
13942:88f0e41d8802 13943:545091b12724
915 os.chmod(name, self.createmode & 0666) 915 os.chmod(name, self.createmode & 0666)
916 916
917 def __call__(self, path, mode="r", text=False, atomictemp=False): 917 def __call__(self, path, mode="r", text=False, atomictemp=False):
918 r = checkosfilename(path) 918 r = checkosfilename(path)
919 if r: 919 if r:
920 raise Abort("%s: %s" % (r, path)) 920 raise Abort("%s: %r" % (r, path))
921 self.auditor(path) 921 self.auditor(path)
922 f = os.path.join(self.base, path) 922 f = os.path.join(self.base, path)
923 923
924 if not text and "b" not in mode: 924 if not text and "b" not in mode:
925 mode += "b" # for that other OS 925 mode += "b" # for that other OS