Commit Graph

162 Commits (8e3ff07969890e0bcdd1e81cb5d63ceef1721719)

Author SHA1 Message Date
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 59c1b8fc11 * Add AutoRevision to raw makefile system
* Set raw makefiles up to use AutoRevision to generate src/autorevision.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2722 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 02:29:46 +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 9c3db2f6e6 * Add building of Autorevision to the automake build-system
* Make the automake build-system use Autorevision to produce src/autorevision.h
   * Add it to the clean-local target as well!
 * Ignore src/autorevision.h (in "svn status")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2579 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 18:53:24 +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