Accepting request 123669 from home:saschpe:branches:openSUSE:Tools
- Re-iterating the last change once again, 'git rev-parse --verify $REV' will return false even if $REV is a normal branch upon first clone of the repo. Thus 'git fetch $URL +$REV:$REV" is run initially. However, the 'git checkout $REV' then fails because it's missing tracking information. Therefore, try a normal checkout first and fetch the specific $REV only when that fails (due to reasons described below). OBS-URL: https://build.opensuse.org/request/show/123669 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=44
This commit is contained in:
parent
b4f8383f49
commit
8c90385e6c
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 5 11:12:07 UTC 2012 - saschpe@suse.de
|
||||
|
||||
- Re-iterating the last change once again, 'git rev-parse --verify $REV'
|
||||
will return false even if $REV is a normal branch upon first clone
|
||||
of the repo. Thus 'git fetch $URL +$REV:$REV" is run initially.
|
||||
However, the 'git checkout $REV' then fails because it's missing
|
||||
tracking information. Therefore, try a normal checkout first and fetch
|
||||
the specific $REV only when that fails (due to reasons described below).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 24 00:57:28 GMT 2012 - rohan.mcgovern@nokia.com
|
||||
|
||||
|
@ -48,7 +48,10 @@ Source114: test.py
|
||||
Source115: utils.py
|
||||
Source116: scm-wrapper
|
||||
|
||||
Requires: bzr git mercurial subversion
|
||||
Requires: bzr
|
||||
Requires: git
|
||||
Requires: mercurial
|
||||
Requires: subversion
|
||||
BuildRequires: bzr
|
||||
BuildRequires: git
|
||||
BuildRequires: mercurial
|
||||
|
4
tar_scm
4
tar_scm
@ -336,11 +336,11 @@ switch_to_revision () {
|
||||
# - explicit ref: refs/heads/master, refs/tags/v1.2.3, refs/changes/49/11249/1
|
||||
# - set by: git fetch <url> +<revision>:<revision> && git checkout <revision>
|
||||
#
|
||||
if ! git rev-parse --verify "$MYREVISION"; then
|
||||
if ! git checkout "$MYREVISION"; then
|
||||
echo "$MYREVISION not accessible by default clone/fetch, attempting explicit fetch"
|
||||
safe_run git fetch "$MYURL" "+$MYREVISION:$MYREVISION"
|
||||
safe_run git checkout "$MYREVISION"
|
||||
fi
|
||||
safe_run git checkout "$MYREVISION"
|
||||
if git branch | grep -q '^\* (no branch)$'; then
|
||||
echo "$MYREVISION does not refer to a branch, not attempting git pull"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user