comparison util.py @ 193:6e3f99ba47ec

Simplify normalize_url.
author Martin Geisler <mg@daimi.au.dk>
date Wed, 21 Jan 2009 20:38:10 -0600
parents 6266ba36ee15
children 906d3f302b45
comparison
equal deleted inserted replaced
192:246ca614f04e 193:6e3f99ba47ec
24 24
25 return "\n".join(ret) + '\n' 25 return "\n".join(ret) + '\n'
26 26
27 27
28 def normalize_url(svn_url): 28 def normalize_url(svn_url):
29 while svn_url[-1] == '/': 29 return svn_url.rstrip('/')
30 svn_url = svn_url[:-1]
31 return svn_url
32 30
33 31
34 def wipe_all_files(hg_wc_path): 32 def wipe_all_files(hg_wc_path):
35 files = [f for f in os.listdir(hg_wc_path) if f != '.hg'] 33 files = [f for f in os.listdir(hg_wc_path) if f != '.hg']
36 for f in files: 34 for f in files: