public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Matthias Maennich <maennich@google.com>,
	Matthieu Baerts <matthieu.baerts@tessares.net>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] scripts/setlocalversion: remove mercurial, svn and git-svn supports
Date: Sun, 23 May 2021 12:14:24 +0900	[thread overview]
Message-ID: <20210523031428.164186-1-masahiroy@kernel.org> (raw)

The mercurial, svn, git-svn supports were added by the following commits
without explaining why they are useful for the kernel source tree.

 - 3dce174cfcba ("kbuild: support mercurial in setlocalversion")

 - ba3d05fb6369 ("kbuild: add svn revision information to setlocalversion")

 - ff80aa97c9b4 ("setlocalversion: add git-svn support")

Let's revert all of them, and see if somebody will complain about it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/setlocalversion | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index db941f6d9591..879cba956e60 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -79,11 +79,6 @@ scm_version()
 			fi
 		fi
 
-		# Is this git on svn?
-		if git config --get svn-remote.svn.url >/dev/null; then
-			printf -- '-svn%s' "$(git svn find-rev $head)"
-		fi
-
 		# Check for uncommitted changes.
 		# First, with git-status, but --no-optional-locks is only
 		# supported in git >= 2.14, so fall back to git-diff-index if
@@ -96,42 +91,6 @@ scm_version()
 		} | grep -qvE '^(.. )?scripts/package'; then
 			printf '%s' -dirty
 		fi
-
-		# All done with git
-		return
-	fi
-
-	# Check for mercurial and a mercurial repo.
-	if test -d .hg && hgid=$(hg id 2>/dev/null); then
-		# Do we have an tagged version?  If so, latesttagdistance == 1
-		if [ "$(hg log -r . --template '{latesttagdistance}')" = "1" ]; then
-			id=$(hg log -r . --template '{latesttag}')
-			printf '%s%s' -hg "$id"
-		else
-			tag=$(printf '%s' "$hgid" | cut -d' ' -f2)
-			if [ -z "$tag" -o "$tag" = tip ]; then
-				id=$(printf '%s' "$hgid" | sed 's/[+ ].*//')
-				printf '%s%s' -hg "$id"
-			fi
-		fi
-
-		# Are there uncommitted changes?
-		# These are represented by + after the changeset id.
-		case "$hgid" in
-			*+|*+\ *) printf '%s' -dirty ;;
-		esac
-
-		# All done with mercurial
-		return
-	fi
-
-	# Check for svn and a svn repo.
-	if rev=$(LC_ALL=C svn info 2>/dev/null | grep '^Last Changed Rev'); then
-		rev=$(echo $rev | awk '{print $NF}')
-		printf -- '-svn%s' "$rev"
-
-		# All done with svn
-		return
 	fi
 }
 
-- 
2.27.0


             reply	other threads:[~2021-05-23  3:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23  3:14 Masahiro Yamada [this message]
2021-05-23  3:14 ` [PATCH 2/5] scripts/setlocalversion: remove workaround for old make-kpkg Masahiro Yamada
2021-05-23  3:14 ` [PATCH 3/5] scripts/setlocalversion: add more comments to -dirty flag detection Masahiro Yamada
2021-05-23  3:14 ` [PATCH 4/5] scripts/setlocalversion: factor out 12-chars hash construction Masahiro Yamada
2021-05-23  9:04   ` Nico Schottelius
2021-05-23  3:14 ` [PATCH 5/5] scripts/setlocalversion: simplify the short version part Masahiro Yamada
2021-05-23  7:48 ` [PATCH 1/5] scripts/setlocalversion: remove mercurial, svn and git-svn supports Greg Kroah-Hartman
2021-05-26 14:29   ` Masahiro Yamada

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=20210523031428.164186-1-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=maennich@google.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mpe@ellerman.id.au \
    --cc=nico-linuxsetlocalversion@schottelius.org \
    /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