* [PATCH] setlocalversion: print correct subversion revision
@ 2008-12-02 20:58 Peter Korsgaard
2008-12-02 20:58 ` [PATCH] setlocalversion: add git-svn support Peter Korsgaard
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Peter Korsgaard @ 2008-12-02 20:58 UTC (permalink / raw)
To: sam, linux-kernel; +Cc: Peter Korsgaard
Output svn revision of latest change, instead of repo revision as thats
what we're interested in (especially when working on a branch/tag).
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
scripts/setlocalversion | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 72d2335..81d984b 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -51,7 +51,7 @@ if hgid=`hg id 2>/dev/null`; then
fi
# Check for svn and a svn repo.
-if rev=`svn info 2>/dev/null | grep '^Revision'`; then
+if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then
rev=`echo $rev | awk '{print $NF}'`
changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l`
--
1.5.6.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] setlocalversion: add git-svn support
2008-12-02 20:58 [PATCH] setlocalversion: print correct subversion revision Peter Korsgaard
@ 2008-12-02 20:58 ` Peter Korsgaard
2008-12-03 7:24 ` [PATCH] setlocalversion: print correct subversion revision Sam Ravnborg
2008-12-03 21:58 ` Sam Ravnborg
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2008-12-02 20:58 UTC (permalink / raw)
To: sam, linux-kernel; +Cc: Peter Korsgaard
Print svn revision in addition to git info on git-svn repos.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
scripts/setlocalversion | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 81d984b..f6946cf 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -19,6 +19,11 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
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
+
# Are there uncommitted changes?
git update-index --refresh --unmerged > /dev/null
if git diff-index --name-only HEAD | grep -v "^scripts/package" \
--
1.5.6.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] setlocalversion: print correct subversion revision
2008-12-02 20:58 [PATCH] setlocalversion: print correct subversion revision Peter Korsgaard
2008-12-02 20:58 ` [PATCH] setlocalversion: add git-svn support Peter Korsgaard
@ 2008-12-03 7:24 ` Sam Ravnborg
2008-12-03 21:58 ` Sam Ravnborg
2 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2008-12-03 7:24 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: linux-kernel
Hi Peter.
On Tue, Dec 02, 2008 at 09:58:05PM +0100, Peter Korsgaard wrote:
> Output svn revision of latest change, instead of repo revision as thats
> what we're interested in (especially when working on a branch/tag).
Looks good. I will apply when I get on top of kbuild stuff which
I expect to do this weekend.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] setlocalversion: print correct subversion revision
2008-12-02 20:58 [PATCH] setlocalversion: print correct subversion revision Peter Korsgaard
2008-12-02 20:58 ` [PATCH] setlocalversion: add git-svn support Peter Korsgaard
2008-12-03 7:24 ` [PATCH] setlocalversion: print correct subversion revision Sam Ravnborg
@ 2008-12-03 21:58 ` Sam Ravnborg
2 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2008-12-03 21:58 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: linux-kernel
On Tue, Dec 02, 2008 at 09:58:05PM +0100, Peter Korsgaard wrote:
> Output svn revision of latest change, instead of repo revision as thats
> what we're interested in (especially when working on a branch/tag).
>
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Applied both patches - thanks Peter.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-03 21:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-02 20:58 [PATCH] setlocalversion: print correct subversion revision Peter Korsgaard
2008-12-02 20:58 ` [PATCH] setlocalversion: add git-svn support Peter Korsgaard
2008-12-03 7:24 ` [PATCH] setlocalversion: print correct subversion revision Sam Ravnborg
2008-12-03 21:58 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome