From 77d90e5e62858e348cd74123c60319a4806d783c Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Apr 24 2018 14:39:49 +0000 Subject: Remove question mark from giturl Signed-off-by: Chenxiong Qi --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index 50dec6f..68cd9a8 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -1871,7 +1871,7 @@ class Commands(object): :return: URL built from anongiturl. :rtype: str """ - return '{0}?#{1}'.format( + return '{0}#{1}'.format( self._get_namespace_anongiturl(module_name or self.ns_module_name), commit_hash or self.commithash) diff --git a/tests/test_cli.py b/tests/test_cli.py index ae8c1ef..1cb7e2f 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -952,7 +952,7 @@ class TestGitUrl(CliTestCase): cli.giturl() last_commit = str(six.next(cli.cmd.repo.iter_commits())) - expected_giturl = '{0}?#{1}'.format( + expected_giturl = '{0}#{1}'.format( cli.cmd.anongiturl % {'module': os.path.basename(self.repo_path)}, last_commit) output = sys.stdout.getvalue().strip() diff --git a/tests/test_commands.py b/tests/test_commands.py index db9f435..55d7376 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -697,7 +697,7 @@ class TestConstructBuildURL(CommandTestCase): with patch.object(cmd, 'anongiturl', new=anongiturl): url = cmd.construct_build_url() - expected_url = '{0}?#{1}'.format( + expected_url = '{0}#{1}'.format( anongiturl % {'module': ns_module_name.return_value}, commithash.return_value) self.assertEqual(expected_url, url) @@ -711,7 +711,7 @@ class TestConstructBuildURL(CommandTestCase): 'rpms/kf5-kfilemetadata'): url = cmd.construct_build_url(module_name, '123456') - expected_url = '{0}?#{1}'.format( + expected_url = '{0}#{1}'.format( anongiturl % {'module': module_name}, '123456') self.assertEqual(expected_url, url)