[libvirt PATCH 28/33] ci: helper: Add a helper to create a local repo clone Pythonic way

Erik Skultety posted 33 patches 2 years, 5 months ago
There is a newer version of this series
[libvirt PATCH 28/33] ci: helper: Add a helper to create a local repo clone Pythonic way
Posted by Erik Skultety 2 years, 5 months ago
A proper Python equivalent of 'git clone --local'.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
 ci/helper | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ci/helper b/ci/helper
index 2a51ce1786..d704d1f711 100755
--- a/ci/helper
+++ b/ci/helper
@@ -211,6 +211,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")
-- 
2.41.0
Re: [libvirt PATCH 28/33] ci: helper: Add a helper to create a local repo clone Pythonic way
Posted by Daniel P. Berrangé 2 years, 5 months ago
On Fri, Aug 25, 2023 at 07:55:36PM +0200, Erik Skultety wrote:
> A proper Python equivalent of 'git clone --local'.
> 
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
>  ci/helper | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|