Mercurial > hgsubversion
comparison util.py @ 256:7932d098cb5f
Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Fri, 10 Apr 2009 18:47:18 -0500 |
| parents | c3d5c4ae9c7c |
| children | d978192f0d63 |
comparison
equal
deleted
inserted
replaced
| 255:246aaefb1cc0 | 256:7932d098cb5f |
|---|---|
| 13 repo = hg.repository(ui, os.path.dirname(__file__)) | 13 repo = hg.repository(ui, os.path.dirname(__file__)) |
| 14 ver = repo.dirstate.parents()[0] | 14 ver = repo.dirstate.parents()[0] |
| 15 return node.hex(ver)[:12] | 15 return node.hex(ver)[:12] |
| 16 | 16 |
| 17 | 17 |
| 18 def normalize_url(svn_url): | 18 def normalize_url(svnurl): |
| 19 return svn_url.rstrip('/') | 19 if svnurl.startswith('svn+http'): |
| 20 svnurl = svnurl[4:] | |
| 21 return svnurl.rstrip('/') | |
| 20 | 22 |
| 21 | 23 |
| 22 def wipe_all_files(hg_wc_path): | 24 def wipe_all_files(hg_wc_path): |
| 23 files = [f for f in os.listdir(hg_wc_path) if f != '.hg'] | 25 files = [f for f in os.listdir(hg_wc_path) if f != '.hg'] |
| 24 for f in files: | 26 for f in files: |
