diff options
Diffstat (limited to 'RepSys/mirror.py')
| -rw-r--r-- | RepSys/mirror.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/RepSys/mirror.py b/RepSys/mirror.py index 1e9e9c2..5b114df 100644 --- a/RepSys/mirror.py +++ b/RepSys/mirror.py @@ -7,16 +7,16 @@ from RepSys.svn import SVN def _normdirurl(url): """normalize url for relocate_path needs""" parsed = urlparse.urlparse(url) - path = os.path.normpath(parsed.path) - newurl = urlparse.urlunparse((parsed.scheme, parsed.netloc, path, - parsed.params, parsed.query, parsed.fragment)) + path = os.path.normpath(parsed[2]) + newurl = urlparse.urlunparse((parsed[0], parsed[1], path, + parsed[3], parsed[4], parsed[5])) return newurl def _joinurl(url, relpath): parsed = urlparse.urlparse(url) - newpath = os.path.join(parsed.path, relpath) - newurl = urlparse.urlunparse((parsed.scheme, parsed.netloc, newpath, - parsed.params, parsed.query, parsed.fragment)) + newpath = os.path.join(parsed[2], relpath) + newurl = urlparse.urlunparse((parsed[0], parsed[1], newpath, + parsed[3], parsed[4], parsed[5])) return newurl def same_base(parent, url): @@ -47,9 +47,7 @@ def enabled(wcurl=None): def mirror_relocate(oldparent, newparent, url, wcpath): svn = SVN() newurl = relocate_path(oldparent, newparent, url) - # note that svn.relocate requires paths without trailling slashes, - # http://foo/svn/bar/baz/ will fail - svn.relocate(url, newurl, wcpath) + svn.switch(newurl, url, path=wcpath, relocate="True") return newurl def switchto_parent(svn, url, path): |
