mail[Wesnoth-commits] r24796 - in /trunk: data/tools/ src/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on March 19, 2008 - 06:15:
Author: esr
Date: Wed Mar 19 06:15:30 2008
New Revision: 24796

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24796&view=rev
Log:
Clean up the way the game_config::svnrev string is computed (now 
game_config::revsion).  As a result, user will never see "unknown" when the 
SVN revision is not available.

Modified:
    trunk/data/tools/Makefile
    trunk/src/game.cpp
    trunk/src/game_config.cpp
    trunk/src/game_config.hpp
    trunk/src/menu_events.cpp
    trunk/src/titlescreen.cpp

Modified: trunk/data/tools/Makefile
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/Makefile?rev=24796&r1=24795&r2=24796&view=diff
==============================================================================
--- trunk/data/tools/Makefile (original)
+++ trunk/data/tools/Makefile Wed Mar 19 06:15:30 2008
@@ -79,6 +79,8 @@
 # For performing test lifts of mainline
 lift:
        ./wmllint --oldversion 1.3.1 --verbose $(MAINLINE) $(UMC)
+trylift:
+       ./wmllint --oldversion 1.3.1 --dryrun --verbose $(MAINLINE) $(UMC)
 diffs:
        ./wmllint --diffs $(MAINLINE) $(UMC)
 revert:

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=24796&r1=24795&r2=24796&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Wed Mar 19 06:15:30 2008
@@ -464,9 +464,7 @@
 
        if(!no_gui_) {
                std::string wm_title_string = _("The Battle for Wesnoth");
-               wm_title_string += " - " + game_config::version
-                       + (game_config::svnrev.empty() ? "" :
-                       " (" + game_config::svnrev + ")");
+               wm_title_string += " - " + game_config::revision;
                SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
        }
 
@@ -1605,9 +1603,7 @@
 
                if(!no_gui_) {
                        std::string wm_title_string = _("The Battle for 
Wesnoth");
-                       wm_title_string += " - " + game_config::version
-                               + (game_config::svnrev.empty() ? "" :
-                               " (" + game_config::svnrev + ")");
+                       wm_title_string += " - " + game_config::revision;
                        SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
                }
 
@@ -2352,10 +2348,7 @@
 #endif
 
        try {
-               const std::string rev = game_config::svnrev.empty() ? "" :
-                       " (" + game_config::svnrev + ")";
-
-               std::cerr << "Battle for Wesnoth v" << VERSION << rev << '\n';
+               std::cerr << "Battle for Wesnoth v" << game_config::revision 
<< '\n';
                time_t t = time(NULL);
                std::cerr << "Started on " << ctime(&t) << "\n";
 

Modified: trunk/src/game_config.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_config.cpp?rev=24796&r1=24795&r2=24796&view=diff
==============================================================================
--- trunk/src/game_config.cpp (original)
+++ trunk/src/game_config.cpp Wed Mar 19 06:15:30 2008
@@ -41,9 +41,9 @@
        const bool gold_carryover_add = false;
        const std::string version = VERSION;
 #ifdef SVNREV
-       const std::string svnrev = SVNREV;
+       const std::string revision = VERSION " (" SVNREV ")";
 #else
-       const std::string svnrev = "unknown";
+       const std::string revision = VERSION;
 #endif
        bool debug = false, editor = false, ignore_replay_errors = false, 
mp_debug = false, exit_at_end = false, no_delay = false, disable_autosave = 
false;
 

Modified: trunk/src/game_config.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_config.hpp?rev=24796&r1=24795&r2=24796&view=diff
==============================================================================
--- trunk/src/game_config.hpp (original)
+++ trunk/src/game_config.hpp Wed Mar 19 06:15:30 2008
@@ -34,7 +34,7 @@
        extern int kill_experience;
        extern unsigned lobby_refresh;
        extern const std::string version;
-       extern const std::string svnrev;
+       extern const std::string revision;
 
        //! Default percentage gold carried over to the next scenario.
        extern const int gold_carryover_percentage;

Modified: trunk/src/menu_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/menu_events.cpp?rev=24796&r1=24795&r2=24796&view=diff
==============================================================================
--- trunk/src/menu_events.cpp (original)
+++ trunk/src/menu_events.cpp Wed Mar 19 06:15:30 2008
@@ -2320,10 +2320,7 @@
                        game_events::fire(data);
                        gui_->redraw_everything();
                } else if(cmd == "version") {
-                       add_chat_message(time(NULL), "", 0, 
-                                        game_config::version
-                                        + (game_config::svnrev.empty() ? "" :
-                                           " (" + game_config::svnrev + 
")"));
+                       add_chat_message(time(NULL), "", 0, 
game_config::revision);
                }
        }
 

Modified: trunk/src/titlescreen.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=24796&r1=24795&r2=24796&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Wed Mar 19 06:15:30 2008
@@ -322,12 +322,9 @@
        } while (fade_failed);
        LOG_DP << "faded logo\n";
 
-       // Display Wesnoth version and (if configured with 
--enable-display-revision) the svn-revision
-       const std::string rev =  game_config::svnrev.empty() ? "" :
-               " (" + game_config::svnrev + ")";
-
+       // Display Wesnoth version and (if possible) revision
        const std::string& version_str = _("Version") +
-               std::string(" ") + game_config::version + rev;
+               std::string(" ") + game_config::revision;
 
        const SDL_Rect version_area = font::draw_text(NULL, screen_area(),
                                                                  
font::SIZE_TINY, font::NORMAL_COLOUR,




Related Messages


Powered by MHonArc, Updated Wed Mar 19 06:20:57 2008