[issue1948] ui.style option doesn't work on OSX if it is a relative path

Andrea Riciputi bugs at mercurial.selenic.com
Fri Dec 11 10:48:43 UTC 2009


New submission from Andrea Riciputi <andrea.riciputi at gmail.com>:

I noticed that if I set the an ui.style parameter in my .hgrc file using 
relative path, the style file is not found. After digging a little into this, 
it turned out that on OSX (I don't on other platforms) os.path.exists() always 
return False if the path is a relative one. So a call to os.path.expanduser() 
is mandatory.

The patch to fix this bug is quite simple, but since I'm definitively not a 
Mercurial developer I don't know where is the best place in the code to apply 
it. I spotted out two places: mercurial/cmdutil.py at line 1010 or 
mercurial/templater.py at line 153. I'd rather say the first one is better. 
Anyway I submit both patch, just in case. Hope this can be helpful.

----------
files: style.patch
messages: 11212
nosy: mrrech
priority: bug
status: unread
title: ui.style option doesn't work on OSX if it is a relative path

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1948>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: style.patch
Type: application/octet-stream
Size: 845 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091211/0ec57223/attachment.obj>


More information about the Mercurial-devel mailing list