equal
deleted
inserted
replaced
74 raise util.Abort(_("Failed to parse %s\n%s") % (f, inst)) |
74 raise util.Abort(_("Failed to parse %s\n%s") % (f, inst)) |
75 # translate paths relative to root (or home) into absolute paths |
75 # translate paths relative to root (or home) into absolute paths |
76 if root is None: |
76 if root is None: |
77 root = os.path.expanduser('~') |
77 root = os.path.expanduser('~') |
78 for name, path in self.configitems("paths"): |
78 for name, path in self.configitems("paths"): |
79 if path and path.find("://") == -1 and not os.path.isabs(path): |
79 if path and "://" not in path and not os.path.isabs(path): |
80 self.cdata.set("paths", name, os.path.join(root, path)) |
80 self.cdata.set("paths", name, os.path.join(root, path)) |
81 |
81 |
82 def setconfig(self, section, name, val): |
82 def setconfig(self, section, name, val): |
83 self.overlay[(section, name)] = val |
83 self.overlay[(section, name)] = val |
84 |
84 |
170 return result |
170 return result |
171 |
171 |
172 def diffopts(self): |
172 def diffopts(self): |
173 if self.diffcache: |
173 if self.diffcache: |
174 return self.diffcache |
174 return self.diffcache |
175 result = {'showfunc': True, 'ignorews': False} |
175 result = {'showfunc': True, 'ignorews': False, |
|
176 'ignorewsamount': False, 'ignoreblanklines': False} |
176 for key, value in self.configitems("diff"): |
177 for key, value in self.configitems("diff"): |
177 if value: |
178 if value: |
178 result[key.lower()] = (value.lower() == 'true') |
179 result[key.lower()] = (value.lower() == 'true') |
179 self.diffcache = result |
180 self.diffcache = result |
180 return result |
181 return result |
206 if not self.verbose: user = util.shortuser(user) |
207 if not self.verbose: user = util.shortuser(user) |
207 return user |
208 return user |
208 |
209 |
209 def expandpath(self, loc, default=None): |
210 def expandpath(self, loc, default=None): |
210 """Return repository location relative to cwd or from [paths]""" |
211 """Return repository location relative to cwd or from [paths]""" |
211 if loc.find("://") != -1 or os.path.exists(loc): |
212 if "://" in loc or os.path.exists(loc): |
212 return loc |
213 return loc |
213 |
214 |
214 path = self.config("paths", loc) |
215 path = self.config("paths", loc) |
215 if not path and default is not None: |
216 if not path and default is not None: |
216 path = self.config("paths", default) |
217 path = self.config("paths", default) |