comparison mercurial/ui.py @ 5943:ffaf2419de44

Ensure that absolutized paths from hgrc do not contain ../ segments.
author Jesse Glick <jesse.glick@sun.com>
date Tue, 08 Jan 2008 22:40:51 -0500
parents bc475d1f74ca
children 8e3dc3de7e73
comparison
equal deleted inserted replaced
5937:d8878742a924 5943:ffaf2419de44
202 pathsitems = cdata.items('paths') 202 pathsitems = cdata.items('paths')
203 else: 203 else:
204 pathsitems = items 204 pathsitems = items
205 for n, path in pathsitems: 205 for n, path in pathsitems:
206 if path and "://" not in path and not os.path.isabs(path): 206 if path and "://" not in path and not os.path.isabs(path):
207 cdata.set("paths", n, os.path.join(root, path)) 207 cdata.set("paths", n,
208 os.path.normpath(os.path.join(root, path)))
208 209
209 # update verbosity/interactive/report_untrusted settings 210 # update verbosity/interactive/report_untrusted settings
210 if section is None or section == 'ui': 211 if section is None or section == 'ui':
211 if name is None or name in ('quiet', 'verbose', 'debug'): 212 if name is None or name in ('quiet', 'verbose', 'debug'):
212 self.verbosity_constraints() 213 self.verbosity_constraints()