[Mono-dev] [PATCH] Version fix for git

Andreas Färber andreas.faerber at web.de
Fri Mar 26 06:59:24 EDT 2010


Am 20.03.2010 um 22:54 schrieb Andreas Färber:

> When working on a Git repository that was cloned from a git-svn  
> repo, it is currently displayed as "tarball" in `mono -V`.
>
> The method used to obtain the git revision info - searching the log  
> - is independent of git-svn.
> The patch below thus only checks for a .git subdirectory. Any  
> objections?

Applied to trunk in r154256.

Andreas

> diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am
> index 4fe7052..093077b 100644
> --- a/mono/mini/Makefile.am
> +++ b/mono/mini/Makefile.am
> @@ -586,7 +586,7 @@ EXTRA_DIST = $(common_BURGSRC) TestDriver.cs  
> ldscript ldscript.mono \
> 	$(posix_sources)
>
> version.h: Makefile
> -	if test -d $(top_srcdir)/.git/svn; then svn_info="git log --no- 
> color --first-parent -n1 --grep=git-svn-id: --pretty=format:%b | sed  
> -n -e 's,git-svn-id: \(.*\)@\(.*\) .*,URL: \1 Revision: \2,p'"; fi; \
> +	if test -d $(top_srcdir)/.git; then svn_info="git log --no-color -- 
> first-parent -n1 --grep=git-svn-id: --pretty=format:%b | sed -n -e  
> 's,git-svn-id: \(.*\)@\(.*\) .*,URL: \1 Revision: \2,p'"; fi; \
> 	if test -d $(srcdir)/.svn; then svn_info='svn info'; fi; \
> 	if test -n "$$svn_info"; then \
> 		(cd $(top_srcdir); \
>
> <gitsvnrevision.diff>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list