git has an interface for cloning SVN repositories into git which some users might decide to use. For those users' surprise, the repository will always fail to build on svnonly target and it will exit early. The problem is simple enough to fix by just checking if a .git directory exists in top_builddir and, if so, call git svn info insstead of svn info. Signed-off-by: Felipe Balbi <balbi at kernel.org> --- Resending the patch as I believe the previous version didn't reach the mailing list. Makefile.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 44b0a3b4b99f..221c437972ad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,6 +9,9 @@ top_builddir = . include $(top_builddir)/Makeconf +GIT := $(shell if [ -d "$(top_builddir)/.git" ]; then \ + echo "git"; fi) + distdir = $(PACKAGE)-$(VERSION) INSTFILES = COPYING NON_SVN_INSTFILES = SVN-REVISION @@ -104,7 +107,7 @@ svnonly: @if test ! -f "$(srcdir)/doc/FAQ" || test -f non-tarball ; then \ (cd doc/manual && $(MAKE) front-matter html-non-svn) ; \ touch non-tarball ; \ - (cd $(srcdir); LC_ALL=C TZ=GMT svn info || $(ECHO) "Revision: -99") 2> /dev/null \ + (cd $(srcdir); LC_ALL=C TZ=GMT $(GIT) svn info || $(ECHO) "Revision: -99") 2> /dev/null \ | sed -n -e '/^Revision/p' -e '/^Last Changed Date/'p \ | cut -d' ' -f1,2,3,4 > SVN-REVISION-tmp ; \ if test "`cat SVN-REVISION-tmp`" = "Revision: -99"; then \ -- 2.2.0
Duncan Murdoch
2015-Jan-19 20:06 UTC
[Rd] [PATCH] Makefile: add support for git svn clones
On 19/01/2015 2:33 PM, Felipe Balbi wrote:> git has an interface for cloning SVN repositories into git which > some users might decide to use. For those users' surprise, the > repository will always fail to build on svnonly target and it will > exit early. > > The problem is simple enough to fix by just checking if a .git > directory exists in top_builddir and, if so, call git svn info insstead > of svn info. >I think we are unlikely to accept this change. Nobody in R Core uses git this way, so it would never be tested, and would likely soon fail. Indeed, it already fails if someone were to try it on Windows, since you didn't patch the makefiles for that platform. The R sources are kept in an SVN repository, and as long as that's true, we're only likely to support direct SVN access. Duncan Murdoch> Signed-off-by: Felipe Balbi <balbi at kernel.org> > --- > > Resending the patch as I believe the previous version didn't > reach the mailing list. > > Makefile.in | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/Makefile.in b/Makefile.in > index 44b0a3b4b99f..221c437972ad 100644 > --- a/Makefile.in > +++ b/Makefile.in > @@ -9,6 +9,9 @@ top_builddir = . > > include $(top_builddir)/Makeconf > > +GIT := $(shell if [ -d "$(top_builddir)/.git" ]; then \ > + echo "git"; fi) > + > distdir = $(PACKAGE)-$(VERSION) > INSTFILES = COPYING > NON_SVN_INSTFILES = SVN-REVISION > @@ -104,7 +107,7 @@ svnonly: > @if test ! -f "$(srcdir)/doc/FAQ" || test -f non-tarball ; then \ > (cd doc/manual && $(MAKE) front-matter html-non-svn) ; \ > touch non-tarball ; \ > - (cd $(srcdir); LC_ALL=C TZ=GMT svn info || $(ECHO) "Revision: -99") 2> /dev/null \ > + (cd $(srcdir); LC_ALL=C TZ=GMT $(GIT) svn info || $(ECHO) "Revision: -99") 2> /dev/null \ > | sed -n -e '/^Revision/p' -e '/^Last Changed Date/'p \ > | cut -d' ' -f1,2,3,4 > SVN-REVISION-tmp ; \ > if test "`cat SVN-REVISION-tmp`" = "Revision: -99"; then \ >
Hi, On Mon, Jan 19, 2015 at 03:06:11PM -0500, Duncan Murdoch wrote:> On 19/01/2015 2:33 PM, Felipe Balbi wrote: > > git has an interface for cloning SVN repositories into git which > > some users might decide to use. For those users' surprise, the > > repository will always fail to build on svnonly target and it will > > exit early. > > > > The problem is simple enough to fix by just checking if a .git > > directory exists in top_builddir and, if so, call git svn info insstead > > of svn info. > > > > I think we are unlikely to accept this change. Nobody in R Core uses > git this way, so it would never be tested, and would likely soon fail.it will be tested by anybody using git svn clone, right ?> Indeed, it already fails if someone were to try it on Windows, since you > didn't patch the makefiles for that platform.yeah, sorry about that, I wasn't aware there were windows-specific Makefiles with duplicated logic in the repository.> The R sources are kept in an SVN repository, and as long as that's true, > we're only likely to support direct SVN access.Fair enough. But don't you think it's a bit odd to couple the repository compilation with the availability of a specific SCM tool ? I mean, R just won't build unless you have svn info available, I think that's pretty odd. Printing a warning would be another possibility, but exitting build is almost an overreaction. But fair enough, no need to spend days discussing $subject if the community doesn't want to support git svn clone ;-) cheers -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20150119/b91c5deb/attachment.bin>