From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv5 8/9] support/download/svn: implement source-check
Date: Tue, 19 Feb 2019 11:38:38 +0100 [thread overview]
Message-ID: <20190219103839.25409-8-patrickdepinguin@gmail.com> (raw)
In-Reply-To: <20190219103839.25409-1-patrickdepinguin@gmail.com>
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Suggested-by: "Yann E. Morin" <yann.morin.1998@free.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
support/download/svn | 12 ++++++++++++
1 file changed, 12 insertions(+)
v5: no changes
v4: new patch
diff --git a/support/download/svn b/support/download/svn
index 542b25c0a2..93984b6c45 100755
--- a/support/download/svn
+++ b/support/download/svn
@@ -7,6 +7,7 @@ set -e
#
# Options:
# -q Be quiet.
+# -C Only check that the revision exists in the remote repository.
# -o FILE Generate archive in FILE.
# -u URI Checkout from repository at URI.
# -c REV Use revision REV.
@@ -16,9 +17,11 @@ set -e
# SVN : the svn command to call
verbose=
+checkonly=false
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
case "${OPT}" in
q) verbose=-q;;
+ C) checkonly=true;;
o) output="${OPTARG}";;
u) uri="${OPTARG}";;
c) rev="${OPTARG}";;
@@ -36,6 +39,15 @@ _svn() {
eval ${SVN} "${@}"
}
+if ! _svn ls ${verbose} -r "'${rev}'" "'${uri}'" > /dev/null; then
+ printf "Revision '%s' does not exist in this repository\n." "${rev}"
+ exit 1
+fi
+
+if ${checkonly}; then
+ exit 0
+fi
+
_svn export ${verbose} "${@}" "'${uri}@${rev}'" "'${basename}'"
tar czf "${output}" "${basename}"
--
2.19.2
next prev parent reply other threads:[~2019-02-19 10:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 10:38 [Buildroot] [PATCHv5 1/9] support/download: reintroduce 'source-check' target Thomas De Schampheleire
2019-02-19 10:38 ` [Buildroot] [PATCHv5 2/9] support/download/hg: implement source-check Thomas De Schampheleire
2019-02-19 10:38 ` [Buildroot] [PATCHv5 3/9] support/download/wget: " Thomas De Schampheleire
2019-02-19 10:38 ` [Buildroot] [PATCHv5 4/9] support/download/file: " Thomas De Schampheleire
2019-02-19 10:38 ` [Buildroot] [PATCHv5 5/9] Revert "core/download: drop the SSH command" Thomas De Schampheleire
2019-02-19 10:38 ` [Buildroot] [PATCHv5 6/9] package/pkg-download: export 'SSH' for use in the download backends Thomas De Schampheleire
2019-02-19 10:38 ` [Buildroot] [PATCHv5 7/9] support/download/scp: implement source-check Thomas De Schampheleire
2019-02-19 10:38 ` Thomas De Schampheleire [this message]
2019-02-19 10:38 ` [Buildroot] [PATCHv5 9/9] support/download/{bzr, cvs, git}: highlight unimplemented source-check Thomas De Schampheleire
2019-03-17 14:32 ` [Buildroot] [PATCHv5 1/9] support/download: reintroduce 'source-check' target Yann E. MORIN
2019-03-17 14:57 ` Thomas Petazzoni
2019-03-27 13:46 ` Arnout Vandecappelle
2019-03-27 14:13 ` Thomas De Schampheleire
2019-03-27 16:35 ` Thomas Petazzoni
2019-03-27 17:25 ` Arnout Vandecappelle
2019-04-13 15:24 ` Arnout Vandecappelle
2019-04-13 15:51 ` Thomas De Schampheleire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190219103839.25409-8-patrickdepinguin@gmail.com \
--to=patrickdepinguin@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox