Skip to content

Commit

Permalink
Merge pull request ESCOMP#167 from billsacks/fix_svn_on_windows
Browse files Browse the repository at this point in the history
Fix svn on Windows
  • Loading branch information
fischer-ncar authored Apr 8, 2022
2 parents b1c02ab + 3510da8 commit 1d880e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions manic/repository_svn.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ def __init__(self, component_name, repo, ignore_ancestry=False):
"""
Repository.__init__(self, component_name, repo)
self._ignore_ancestry = ignore_ancestry
if self._url.endswith('/'):
# there is already a '/' separator in the URL; no need to add another
url_sep = ''
else:
url_sep = '/'
if self._branch:
self._url = os.path.join(self._url, self._branch)
self._url = self._url + url_sep + self._branch
elif self._tag:
self._url = os.path.join(self._url, self._tag)
self._url = self._url + url_sep + self._tag
else:
msg = "DEV_ERROR in svn repository. Shouldn't be here!"
fatal_error(msg)
Expand Down
2 changes: 1 addition & 1 deletion test/test_unit_repository_svn.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def setUp(self):
self._name = 'component'
rdata = {ExternalsDescription.PROTOCOL: 'svn',
ExternalsDescription.REPO_URL:
'https://svn-ccsm-models.cgd.ucar.edu/',
'https://svn-ccsm-models.cgd.ucar.edu',
ExternalsDescription.TAG:
'mosart/trunk_tags/mosart1_0_26',
}
Expand Down

0 comments on commit 1d880e0

Please sign in to comment.