comparison mercurial/util.py @ 4178:6f9474044736

small globprefix fix
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 10 Mar 2007 23:00:42 -0300
parents e817c68edfed
children 51ee2868a571
comparison
equal deleted inserted replaced
4176:fc12ac3755d5 4178:6f9474044736
460 return buildfn 460 return buildfn
461 461
462 def globprefix(pat): 462 def globprefix(pat):
463 '''return the non-glob prefix of a path, e.g. foo/* -> foo''' 463 '''return the non-glob prefix of a path, e.g. foo/* -> foo'''
464 root = [] 464 root = []
465 for p in pat.split(os.sep): 465 for p in pat.split('/'):
466 if contains_glob(p): break 466 if contains_glob(p): break
467 root.append(p) 467 root.append(p)
468 return '/'.join(root) 468 return '/'.join(root)
469 469
470 pats = [] 470 pats = []