summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-03-20 15:55:57 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-03-20 15:55:57 +0200
commitfaa623eb93f8e6f2334f4405f5a69c67484804e9 (patch)
tree46a0b60b81cf54bebafe93cb2b0c7929c2aa997e
parent29fa1dd52289ea3141c251f66b70bf660c7724e1 (diff)
downloadmeson-faa623eb93f8e6f2334f4405f5a69c67484804e9.tar.gz
A few minor tweaks.
-rw-r--r--manual tests/3 git wrap/meson.build2
-rw-r--r--wrap.py7
2 files changed, 6 insertions, 3 deletions
diff --git a/manual tests/3 git wrap/meson.build b/manual tests/3 git wrap/meson.build
index f3cce0014..7fd5083ee 100644
--- a/manual tests/3 git wrap/meson.build
+++ b/manual tests/3 git wrap/meson.build
@@ -6,3 +6,5 @@ exe = executable('gitprog', 'prog.c',
include_directories : sp.get_variable('subproj_inc'),
link_with : sp.get_variable('subproj_lib'),
)
+
+test('maintest', exe)
diff --git a/wrap.py b/wrap.py
index 9c8840306..3b3b64045 100644
--- a/wrap.py
+++ b/wrap.py
@@ -69,9 +69,10 @@ class Resolver:
if revno.lower() == 'head':
subprocess.check_call(['git', 'pull'], cwd=checkoutdir)
else:
- subprocess.check_call(['git', 'fetch'], cwd=checkoutdir)
- subprocess.check_call(['git', 'checkout', revno],
- cwd=checkoutdir)
+ if subprocess.call(['git', 'checkout', revno], cwd=checkoutdir) != 0:
+ subprocess.check_call(['git', 'fetch'], cwd=checkoutdir)
+ subprocess.check_call(['git', 'checkout', revno],
+ cwd=checkoutdir)
else:
subprocess.check_call(['git', 'clone', p.get('url'), p.get('directory')],
cwd=self.subdir_root)