From a732c39d3d0e42670bd437e9011aa4ddb84434dc Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 27 Nov 2013 01:15:31 +0000 Subject: [PATCH] If running git clean after reset then retry * devstack-vm-gate-wrap.sh: If a git clean can not remove some files, for example because a previous command has not freed its open file handles, it will return nonzero. If this happens, wait a moment and try again in case this is only a briefly transient problem. Change-Id: I40ca9784f5e6e8bad07416f4fd1978bc7aecd494 --- devstack-vm-gate-wrap.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 407ef3c9..90f6d683 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -49,7 +49,10 @@ function git_checkout { git checkout $branch git reset --hard $reset_branch - git clean -x -f -d -q + if ! git clean -x -f -d -q ; then + sleep 1 + git clean -x -f -d -q + fi } function fix_etc_hosts {