From 2481c9a5c9712765fc9ea80464e37fab791cd2a0 Mon Sep 17 00:00:00 2001 From: cmpilato Date: Thu, 9 Sep 2004 22:10:57 +0000 Subject: [PATCH] Normalize configured paths at a different time so that we don't destroy URLs used by the svn_ra module. * viewcvs/lib/config.py (_parse_roots): Don't normalize the paths for roots here -- it will destroy URLs. * viewcvs/lib/viewcvs.py (Request.run_viewcvs): Normalize them here, *after* we know what's a URL and what's a normal path. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@917 8cb11bc2-c004-0410-86c3-e597b4017df7 --- lib/config.py | 2 +- lib/viewcvs.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/config.py b/lib/config.py index e0028990..87c189a5 100644 --- a/lib/config.py +++ b/lib/config.py @@ -242,7 +242,7 @@ def _parse_roots(config_name, config_value): if pos < 0: raise MalformedRoot(config_name, root) name, path = map(string.strip, (root[:pos], root[pos+1:])) - roots[name] = os.path.normpath(path) + roots[name] = path return roots diff --git a/lib/viewcvs.py b/lib/viewcvs.py index 1e1ab68e..4035e9fd 100644 --- a/lib/viewcvs.py +++ b/lib/viewcvs.py @@ -227,7 +227,7 @@ class Request: # Create the repository object if cfg.general.cvs_roots.has_key(self.rootname): - self.rootpath = cfg.general.cvs_roots[self.rootname] + self.rootpath = os.path.normpath(cfg.general.cvs_roots[self.rootname]) try: if cfg.general.use_rcsparse: import vclib.ccvs @@ -255,6 +255,7 @@ class Request: import vclib.svn_ra vclib.svn = vclib.svn_ra else: + self.rootpath = os.path.normpath(self.rootpath) import vclib.svn rev = None if self.query_dict.has_key('rev') \