Use connection to qualify projects in merger
Fully qualify projects in the merger with connection names.
This lets us drop the URL parameter (which always seemed
unecessary, as the merger can figure that out on its own given a
uniquely identified project).
On disk, use the canonical hostname, so that the checked out
versions of repositories include the canonical hostname, and so that
repos on mergers survive changes in connection names.
This simplifies both the API and the JSON data structure passed to
the merger.
The addProject method of the merger is flagged as an internal method
now, as all "public" API methods indirectly call it.
In the executor, after cloning and merging are completed, the 'origin'
remote is removed from the resulting repositories since it may not
be valid for use within a running job.
Change-Id: Idcc9808948b018a271b32492766a96876979d1fa
diff --git a/tests/unit/test_openstack.py b/tests/unit/test_openstack.py
index c7a47ec..4fceba0 100644
--- a/tests/unit/test_openstack.py
+++ b/tests/unit/test_openstack.py
@@ -69,11 +69,13 @@
# Check that a change to nova triggered a keystone clone
executor_git_dir = os.path.join(self.executor_src_root,
+ 'review.example.com',
'openstack', 'keystone', '.git')
self.assertTrue(os.path.exists(executor_git_dir),
msg='openstack/keystone should be cloned.')
jobdir_git_dir = os.path.join(build.jobdir.src_root,
+ 'review.example.com',
'openstack', 'keystone', '.git')
self.assertTrue(os.path.exists(jobdir_git_dir),
msg='openstack/keystone should be cloned.')
@@ -90,11 +92,13 @@
# Check that a change to keystone triggered a nova clone
executor_git_dir = os.path.join(self.executor_src_root,
+ 'review.example.com',
'openstack', 'nova', '.git')
self.assertTrue(os.path.exists(executor_git_dir),
msg='openstack/nova should be cloned.')
jobdir_git_dir = os.path.join(build.jobdir.src_root,
+ 'review.example.com',
'openstack', 'nova', '.git')
self.assertTrue(os.path.exists(jobdir_git_dir),
msg='openstack/nova should be cloned.')