##// END OF EJS Templates
fix util.pathto...
Alexis S. L. Carvalho -
r3669:48768b1a default
parent child Browse files
Show More
@@ -207,9 +207,12 b" def globre(pat, head='^', tail='$'):"
207 207
208 208 def pathto(n1, n2):
209 209 '''return the relative path from one place to another.
210 this returns a path in the form used by the local filesystem, not hg.'''
210 n1 should use os.sep to separate directories
211 n2 should use "/" to separate directories
212 returns an os.sep-separated path.
213 '''
211 214 if not n1: return localpath(n2)
212 a, b = n1.split('/'), n2.split('/')
215 a, b = n1.split(os.sep), n2.split('/')
213 216 a.reverse()
214 217 b.reverse()
215 218 while a and b and a[-1] == b[-1]:
General Comments 0
You need to be logged in to leave comments. Login now