Commit Graph

17 Commits (b58826bce4ae7f6f01b69e10fece421ebba561b1)

Author SHA1 Message Date
Giel van Schijndel 5e50119a53 Fix compilation of autorevision on Windows (a copy&paste error)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4387 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 15:24:37 +00:00
Giel van Schijndel 93517102da Add code for extracting the Subversion revision numbers from a git-svn repository
Inspired by http://svn.voria.com/code/synfig-studio/trunk/build_tools/autorevision.sh from Paul Wise
(GPLv2, git invocations where taken from that script)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4380 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 00:37:29 +00:00
Dennis Schridde 3cdcf273a4 Include cstring for gcc 4.3 compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3496 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-16 10:47:43 +00:00
Giel van Schijndel 764a456efc * In AutoRevision set 'LC_ALL' to 'C', as well as 'LANG' which already is set to 'C'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2869 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 11:07:11 +00:00
Giel van Schijndel 94b04775fb * Make sure that AutorRevision can be compiled even when using Unicode (makes lots of WINAPI functions accept UTF-16 LE instead of ASCII)
* Use SetEnvironmentVariableA instead of SetEnvironmentVariable which is a macro
Issue pointed out by Buginator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2748 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 19:24:48 +00:00
Giel van Schijndel 6a2d26babd * Try '''harder''' to detect Windows platforms
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2747 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 19:17:36 +00:00
Giel van Schijndel 9f9cc3b697 * When compiling AutoRevision on MSVC make sure to #define popen and pclose as _popen and _pclose respectively
Fix provided by Buginator in bug #10269


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2743 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 14:32:17 +00:00
Giel van Schijndel 854c5eba1c * In revision information extraction class RevSVNVersionQuery (uses "svnversion"), ignore its output if the word "exported" is encountered (that way compiling from an exported working copy is possible also)
* Parse the "/autorevision.conf" file as last
 * Add template class assign_once<T> which wraps a T object so that it can only be assigned to once (all following assignments will simply be NO-OPS)
 * Make all RevisionInformation members an assign_once<T> object instead of a T object
 * Make sure src/version.c can compile when there is little revision information available
 * Add autorevision.conf which will provide a sane default for wc_uri ("trunk")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2731 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 18:43:30 +00:00
Giel van Schijndel 71a6991cd7 * Add a new revision info extraction class (subclass of RevisionExtractor): RevConfigFile
* This class extracts revision info from a "var=value" style text file (can be used in tarballs)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2721 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 01:41:59 +00:00
Giel van Schijndel eebb1dd97f * Add struct RevisionInformation to bind all revision info together
* Add a new subclass of RevisionExtractor: RevSVNVersionQuery
  * This subclass will use "svnversion" to additionally detect mixed revisions, modifications and switched paths in working copies
 * Add the "low revision", modification and switch state to the output


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2720 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 23:08:17 +00:00
Giel van Schijndel 39e6d26a1f * Add an abstract base class for the extraction of revision information: RevisionExtractor
* This class uses the "Chain of Responsibility" pattern to delegate a task the current subclass cannot perform to a successor in the chain
 * Make QuerySVN() and ParseFile() part of subclasses derived from RevisionExtractor
  * Also make these functions function properly in the chain of responsibility


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2716 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 18:20:00 +00:00
Giel van Schijndel 7191ed7e92 * Set LANG=C in AutoRevision before executing "svn info" rather than the non-portable LANG=en_US
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2656 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 15:40:34 +00:00
Giel van Schijndel ac60bfc81f * Modify function QuerySvn such that we take advantage of std::string's interface rather than using low-level (i.e. character-level) string manipulations (e.g. remove a whole chunk at the end of a string rather than a separate character every time)
* Allow the #definition of SVN_AUTOREVISION_STATIC before #include AutoRevision's output file
   * When #defined to "static" it will mark all variables created in AutoRevision as static
 * Additionally detect the "base-uri" of a working copy (e.g. "trunk", "branches/2.0", etc.) and dump it in the output header file


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2624 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 20:42:03 +00:00
Giel van Schijndel ae8c4b6d2f Autorevision:
* Make function WriteOutput const-correct
 * Mark global variables static
 * Add commandline option "+cstr" which results in Autorevision adding a C-style string into the produced header file
 * When no revision information could be extracted from a working copy give an error message
 * Add some comments
 * Move some variables into a more local scope
 * Don't use member function .close() on iostreams just before leaving scope (the destructor will take care of that!)
 * Don't write the header file in binary mode
 * Fix handling of do_translate
 * Now DO dump revision date as well
 * Add double-quotes around strings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2578 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 17:02:16 +00:00
Giel van Schijndel 355c7a6b0b Autorevision:
* Use C++ iostreams for output as well as input (which was already being used)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2577 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 15:50:50 +00:00
Giel van Schijndel 4849d5bf94 * Use revision 3545 (in the Code::Blocks repository) of autorevision instead; it doesn't depend on TinyXML
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2576 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 15:11:43 +00:00
Giel van Schijndel 2ebe3ddc28 * Add a build-time tool "autorevision", which I copied from the Code::Blocks project (GPLv2+)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2575 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 14:33:16 +00:00