[Patches] [ python-Patches-1628061 ] Win32: Fix build when you have TortoiseSVN but no .svn/*

SourceForge.net noreply at sourceforge.net
Thu Jan 4 18:56:38 CET 2007


Patches item #1628061, was opened at 2007-01-04 17:56
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1628061&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 3000
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Larry Hastings (lhastings)
Assigned to: Nobody/Anonymous (nobody)
Summary: Win32: Fix build when you have TortoiseSVN but no .svn/*

Initial Comment:

Recent snazzy improvements to the Win32 build system include embedding SVN version information in the builds.  This is done by compiling a short C file, make_buildinfo.c, and running the result.  make_buildinfo.exe runs the liltingly-named SubWCRev.exe--a tool that comes with TortoiseSVN--over one of the source files, ../Modules/getbuildinfo.c, producing a second file, getbuildinfo2.c.

The code is reasonably smart; if you don't have TortoiseSVN, it doesn't bother trying, and just compiles ../Modules/getbuildinfo.c unmodified.  However: it blindly assumes that if SubWCRev.exe exists, and the system() call to run it returns 0 or greater, getbuildinfo2.c must have been successfully created.  If you have TortoiseSVN, but *don't* have the .svn/... directories in your source tree, system(SubWCRev.exe) returns 0 or greater (seemingly indicating success) but in fact fails and does *not* create getbuildinfo2.c.  When it fails in this way I see this inscrutable message in the log:
"C:\b\tortoisesvn\bin\subwcrev.exe" .. ..\Modules\getbuildinfo.c getbuildinfo2.c
SubWCRev : Path '..' ends in '..', which is unsupported for this operation

This patch changes make_buildinfo.c so that it calls _stat(getbuildinfo2.c) as a final step.  If getbuildinfo2.c exists, it returns true, else it returns false.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1628061&group_id=5470


More information about the Patches mailing list