laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38220?usp=email )
Change subject: deps/update: don't fetch repos where COMMIT exists
......................................................................
deps/update: don't fetch repos where COMMIT exists
Instead of unconditionally fetching each git repository, check if the
commit we want to checkout already exists in the git repository. If that
is the case, then don't fetch it.
Related: OS#6572
Change-Id: I342957668892e7d29666fada82362cb4a6c7aac5
---
M deps/update.sh
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/deps/update.sh b/deps/update.sh
index ad12bcb..c0a3dab 100755
--- a/deps/update.sh
+++ b/deps/update.sh
@@ -3,7 +3,10 @@
COMMIT="$2"
cd "$DIR"
-git fetch
+
+if ! git cat-file -e "$COMMIT"; then
+ git fetch
+fi
if git rev-parse "origin/$COMMIT" 2>/dev/null; then
set -x
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38220?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I342957668892e7d29666fada82362cb4a6c7aac5
Gerrit-Change-Number: 38220
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38221?usp=email )
Change subject: deps: make output readable
......................................................................
deps: make output readable
Instead of having a silent fetch and commits printed to stdout without
information about the repository they belong to, change the output to
have one line per git action and to include the repository name in each
of them.
Example output:
[titan.ProtocolEmulations.M3UA] Checking out b58f92046e48a7b1ed531e243a2319ebca53bf4c
[titan.ProtocolModules.IP] Checking out 1be86705f39ae38f3c04b2109806ee20d25e91d0
[titan.ProtocolModules.GTP_v13.5.0] Checking out 6b769f985eb91bf5a4332f29faa4a043b23ce62e
[titan.ProtocolModules.ICMP] Checking out e49d9fb9f7de637b4bf4803dc6b6e911a8661640
[osmo-uecups] Initial git clone
[titan.ProtocolModules.DIAMETER_ProtocolModule_Generator] Checking out ffd939595a08da1b8c8176aaa1f8578bfe02a912
[titan.ProtocolModules.L2TP] Checking out 17e76d3662bd0bb815158e8a9de1ec413f21b530
[titan.ProtocolModules.ICMPv6] Checking out 46f4d9b6e1e3c794294a92588401a81e4881dd27
[titan.ProtocolModules.LLC_v7.1.0] Checking out 09817f113255d7fb56f1d45d3dd629a093d9248d
[titan.ProtocolModules.M3UA] Checking out c496d298876fed55c2b730278b7ee77982555563
[titan.ProtocolModules.PFCP_v15.1.0] Checking out d550ad9ddb6f9c823c9a555254cd76cf0e738d18
[titan.ProtocolModules.MobileL3_v13.4.0] Checking out b6602eb357673f097ea1a1d22edd568ecd239da1
[titan.TestPorts.TELNETasp] Checking out 873fe539642542cd9a901c208f1ec11c6d2f5387
[titan.TestPorts.SIPmsg] Checking out 78bf0daf8c599d374089d97a054914d8439d133a
[titan.TestPorts.UDPasp] Checking out 54176e95850654e5e8b0ffa2f1b5f35c412b949c
[titan.ProtocolModules.BSSGP_v13.0.0] Checking out e97d92a8b66bec399babea52f593771b76cb175a
[titan.ProtocolModules.BSSMAP] Checking out 4acb6ab5f058477f0b90c2da182d52054e3614b0
[osmo-uecups] Updating URL to https://gerrit.osmocom.org/osmo-uecups
[osmo-uecups] Checking out 8362efef7c6fa341eb947a75786878e0685767b7
Change-Id: I0231488b02fdb5aa19b864e51864682ebbb3b0c6
---
M deps/Makefile
M deps/update.sh
2 files changed, 9 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/deps/Makefile b/deps/Makefile
index 460c2a6..e210dcd 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -147,7 +147,8 @@
$(1)_MODIFIED!= if [ -d $(1) ]; then cd $(1) && git diff --quiet --exit-code || echo -n "1"; fi
$(1):
- git clone $(2)/$(1)
+ @echo "[$(1)] Initial git clone"
+ @git clone -q $(2)/$(1)
.PHONY: $(1)/update
$(1)/update: $(1)
@@ -155,10 +156,11 @@
@echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
else
ifneq ($$($(1)_ORIGIN),$(2)/$(1))
- cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
+ @echo "[$(1)] Updating URL to $(2)/$(1)"
+ @cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
endif
ifneq ($$($(1)_HEAD),$($(1)_commit))
- ./update.sh "$(1)" "$($(1)_commit)"
+ @./update.sh "$(1)" "$($(1)_commit)"
endif
endif
diff --git a/deps/update.sh b/deps/update.sh
index c0a3dab..046fb69 100755
--- a/deps/update.sh
+++ b/deps/update.sh
@@ -5,13 +5,14 @@
cd "$DIR"
if ! git cat-file -e "$COMMIT"; then
+ echo "[$DIR] Missing $COMMIT, fetching git repository"
git fetch
fi
-if git rev-parse "origin/$COMMIT" 2>/dev/null; then
- set -x
+if git rev-parse -q "origin/$COMMIT" 1>/dev/null 2>&1; then
+ echo "[$DIR] Checking out origin/$COMMIT"
git checkout -q -f "origin/$COMMIT"
else
- set -x
+ echo "[$DIR] Checking out $COMMIT"
git checkout -q -f "$COMMIT"
fi
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38221?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0231488b02fdb5aa19b864e51864682ebbb3b0c6
Gerrit-Change-Number: 38221
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38222?usp=email )
Change subject: deps/update: skip checkout if nothing to do
......................................................................
deps/update: skip checkout if nothing to do
Let the user see what changes when running "make deps" instead of
having unrelated lines for checking out the commits that are already
checked out.
Change-Id: I572ab11afd56e34d9d0d04cd1372af749caa7d48
---
M deps/update.sh
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/deps/update.sh b/deps/update.sh
index 046fb69..8099ed7 100755
--- a/deps/update.sh
+++ b/deps/update.sh
@@ -4,6 +4,11 @@
cd "$DIR"
+if [ "$(git rev-parse HEAD)" = "$COMMIT" ]; then
+ # Commit is already checked out, nothing to do!
+ exit 0
+fi
+
if ! git cat-file -e "$COMMIT"; then
echo "[$DIR] Missing $COMMIT, fetching git repository"
git fetch
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38222?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I572ab11afd56e34d9d0d04cd1372af749caa7d48
Gerrit-Change-Number: 38222
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38222?usp=email )
Change subject: deps/update: skip checkout if nothing to do
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38222?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I572ab11afd56e34d9d0d04cd1372af749caa7d48
Gerrit-Change-Number: 38222
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 20 Sep 2024 12:13:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes