changeset 5795:078136fd83fb

tests: fix Git on Windows sometimes failing on ' or ` in file:/// URLs Some Git versions will fail when cloning a repository like: git clone file:///path/to/strange-file-'`foobar myclone Since '` (and some other characters) are filtered anyway (in lib.utils.repo_name_slug) I think this test doesn't need to test those characters.
author domruf <dominikruf@gmail.com>
date Mon, 11 Apr 2016 22:36:52 +0200
parents 9d645f4ede35
children 194e357fa4ee
files kallithea/controllers/compare.py kallithea/tests/vcs/test_git.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/compare.py	Sat Apr 09 15:47:19 2016 +0200
+++ b/kallithea/controllers/compare.py	Mon Apr 11 22:36:52 2016 +0200
@@ -130,6 +130,7 @@
                 else:
                     # no changesets from other repo, ancestor is the other_rev
                     ancestor = other_rev
+
                 # dulwich 0.9.9 doesn't have a Repo.close() so we have to mess with internals:
                 gitrepo.object_store.close()
                 gitrepo_remote.object_store.close()
--- a/kallithea/tests/vcs/test_git.py	Sat Apr 09 15:47:19 2016 +0200
+++ b/kallithea/tests/vcs/test_git.py	Mon Apr 11 22:36:52 2016 +0200
@@ -46,7 +46,8 @@
         # Verify correct quoting of evil characters that should work on posix file systems
         if sys.platform == 'win32':
             # windows does not allow '"' in dir names
-            tricky_path = get_new_dir("tricky-path-repo-$'`")
+            # and some versions of the git client don't like ` and '
+            tricky_path = get_new_dir("tricky-path-repo-$")
         else:
             tricky_path = get_new_dir("tricky-path-repo-$'\"`")
         successfully_cloned = GitRepository(tricky_path, src_url=TEST_GIT_REPO, update_after_clone=True, create=True)
@@ -55,7 +56,8 @@
 
         if sys.platform == 'win32':
             # windows does not allow '"' in dir names
-            tricky_path_2 = get_new_dir("tricky-path-2-repo-$'`")
+            # and some versions of the git client don't like ` and '
+            tricky_path_2 = get_new_dir("tricky-path-2-repo-$")
         else:
             tricky_path_2 = get_new_dir("tricky-path-2-repo-$'\"`")
         successfully_cloned2 = GitRepository(tricky_path_2, src_url=tricky_path, bare=True, create=True)