All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] scripts/setlocalversion: remove mercurial, svn and git-svn supports
@ 2021-05-23  3:14 Masahiro Yamada
  2021-05-23  3:14 ` [PATCH 2/5] scripts/setlocalversion: remove workaround for old make-kpkg Masahiro Yamada
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Masahiro Yamada @ 2021-05-23  3:14 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Nico Schottelius, Masahiro Yamada, Greg Kroah-Hartman,
	Matthias Maennich, Matthieu Baerts, Michael Ellerman,
	Rasmus Villemoes, linux-kernel

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-26 14:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23  3:14 [PATCH 1/5] scripts/setlocalversion: remove mercurial, svn and git-svn supports Masahiro Yamada
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.