]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
ci: helper: Add a helper to create a local repo clone Pythonic way
authorErik Skultety <eskultet@redhat.com>
Thu, 24 Aug 2023 09:13:59 +0000 (11:13 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 12 Sep 2023 09:36:03 +0000 (11:36 +0200)
A proper Python equivalent of 'git clone --local'.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ci/helper

index 6aca089db43a5930e897f720da639cbdbc494f9c..392702ae41d7f61676f606b19c6dd3d6dee15336 100755 (executable)
--- a/ci/helper
+++ b/ci/helper
@@ -196,6 +196,10 @@ class Application:
         if pty.spawn(["make"] + args) != 0:
             sys.exit("error: 'make' failed")
 
+    @staticmethod
+    def _prepare_repo_copy(repo, dest):
+        return repo.clone(dest, local=True)
+
     def _lcitool_run(self, args):
         output = subprocess.check_output([self._args.lcitool] + args)
         return output.decode("utf-8")