You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2018/06/20 02:21:59 UTC

[1/2] lucene-solr:master: Handle the case of checking out a remote branch that has never been checked out locally before

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x e67377549 -> 9efe619af
  refs/heads/master d04acc95f -> 74bd5d565


Handle the case of checking out a remote branch that has never been checked out locally before


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/74bd5d56
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/74bd5d56
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/74bd5d56

Branch: refs/heads/master
Commit: 74bd5d56582976a10b359b512ae402991d9b64d3
Parents: d04acc9
Author: Steve Rowe <sa...@apache.org>
Authored: Tue Jun 19 22:21:26 2018 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 19 22:21:26 2018 -0400

----------------------------------------------------------------------
 dev-tools/scripts/reproduceJenkinsFailures.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/74bd5d56/dev-tools/scripts/reproduceJenkinsFailures.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/reproduceJenkinsFailures.py b/dev-tools/scripts/reproduceJenkinsFailures.py
index 70f0c43..edfe2d4 100644
--- a/dev-tools/scripts/reproduceJenkinsFailures.py
+++ b/dev-tools/scripts/reproduceJenkinsFailures.py
@@ -158,7 +158,11 @@ def prepareWorkspace(useGit, gitRef):
     checkoutCmd = 'git checkout %s' % gitRef
     code = run(checkoutCmd)
     if 0 != code:
-      raise RuntimeError('ERROR: "%s" failed.  See above.' % checkoutCmd)
+      checkoutBranchCmd = 'git checkout -t -b %s origin/%s' % (gitRef, gitRef) # Checkout remote branch as new local branch
+      print('"%s" failed. Trying "%s".' % (checkoutCmd, checkoutBranchCmd))
+      code = run(checkoutBranchCmd)
+      if 0 != code:
+        raise RuntimeError('ERROR: "%s" failed.  See above.' % checkoutBranchCmd)
     gitCheckoutSucceeded = True
     run('git merge --ff-only', rememberFailure=False) # Ignore failure on non-branch ref
   


[2/2] lucene-solr:branch_7x: Handle the case of checking out a remote branch that has never been checked out locally before

Posted by sa...@apache.org.
Handle the case of checking out a remote branch that has never been checked out locally before


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9efe619a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9efe619a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9efe619a

Branch: refs/heads/branch_7x
Commit: 9efe619afa636d18362f38ba651bf8bc7244c6a9
Parents: e673775
Author: Steve Rowe <sa...@apache.org>
Authored: Tue Jun 19 22:21:26 2018 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 19 22:21:49 2018 -0400

----------------------------------------------------------------------
 dev-tools/scripts/reproduceJenkinsFailures.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9efe619a/dev-tools/scripts/reproduceJenkinsFailures.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/reproduceJenkinsFailures.py b/dev-tools/scripts/reproduceJenkinsFailures.py
index 70f0c43..edfe2d4 100644
--- a/dev-tools/scripts/reproduceJenkinsFailures.py
+++ b/dev-tools/scripts/reproduceJenkinsFailures.py
@@ -158,7 +158,11 @@ def prepareWorkspace(useGit, gitRef):
     checkoutCmd = 'git checkout %s' % gitRef
     code = run(checkoutCmd)
     if 0 != code:
-      raise RuntimeError('ERROR: "%s" failed.  See above.' % checkoutCmd)
+      checkoutBranchCmd = 'git checkout -t -b %s origin/%s' % (gitRef, gitRef) # Checkout remote branch as new local branch
+      print('"%s" failed. Trying "%s".' % (checkoutCmd, checkoutBranchCmd))
+      code = run(checkoutBranchCmd)
+      if 0 != code:
+        raise RuntimeError('ERROR: "%s" failed.  See above.' % checkoutBranchCmd)
     gitCheckoutSucceeded = True
     run('git merge --ff-only', rememberFailure=False) # Ignore failure on non-branch ref