mail[Wesnoth-commits] r20223 - /trunk/utils/campaigns_client.py


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

Header


Content

Posted by Soliton on September 09, 2007 - 13:30:
Author: soliton
Date: Sun Sep  9 13:30:11 2007
New Revision: 20223

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20223&view=rev
Log:
fix a logic error
mess with the formatting

Modified:
    trunk/utils/campaigns_client.py

Modified: trunk/utils/campaigns_client.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/campaigns_client.py?rev=20223&r1=20222&r2=20223&view=diff
==============================================================================
--- trunk/utils/campaigns_client.py (original)
+++ trunk/utils/campaigns_client.py Sun Sep  9 13:30:11 2007
@@ -83,7 +83,7 @@
     address = options.address
     if not ":" in address:
         address += ":" + str(port)
-        
+
     def get(name, version, uploads, cdir):
         mythread = cs.get_campaign_async(name, options.raw_download)
 
@@ -179,7 +179,8 @@
                     get(name, version, uploads, options.campaigns_dir)
                 else:
                     print "Not downloading", name,\
-                        "as the version already is", local_version
+                        "as the version already is", local_version,\
+                        "(The add-on got re-uploaded.)"
             else:
                 print "Not downloading", name,\
                     "because it is already up-to-date."
@@ -236,26 +237,30 @@
                 info = os.path.join(dir, "info.cfg")
                 sversion = campaigns[dirname].get_text_val("version", "")
                 srev = campaigns[dirname].get_text_val("uploads", "")
-                if os.path.exists(info):                    
+                if os.path.exists(info):
                     lrev, lversion = get_info(info)
                     if not srev:
-                        sys.stdout.write(" ? " + dirname + " has no " +
+                        sys.stdout.write(" ? " + dirname + " - has no " +
                             "version info on the server.\n")
                     elif srev == lrev:
-                        sys.stdout.write("   " + dirname + " - is up to 
date.\n")
+                        sys.stdout.write("   " + dirname + 
+                            " - is up to date.\n")
                     elif sversion == lversion:
-                        sys.stdout.write(" # " + dirname + " version is " +
-                            sversion + ", but you have revision %d not %d." %
-                            (lrev, srev))
-                        if srev < lrev: # server reset?
-                            if options.update: get(dirname, sversion, srev, 
cdir)
+                        sys.stdout.write(" # " + dirname + " - is version " +
+                            sversion + (" but you have revision %s not %s." +
+                           " (The add-on got re-uploaded.)\n") %
+                           (lrev, srev))
+                        if srev > lrev: # server reset?
+                            if options.update:
+                               get(dirname, sversion, srev, cdir)
                     else:
                         sys.stdout.write(" * " + dirname + " - you have " +
                             "revision " + lrev + " but revision " + srev +
                             " is available.\n")
                         if options.update: get(dirname, sversion, srev, cdir)
                 else:
-                    sys.stdout.write(" ? " + dirname + " - is installed but 
has no " +
+                    sys.stdout.write(" ? " + dirname + 
+                        " - is installed but has no " +
                         "version info.\n")
                     if options.update: get(dirname, sversion, srev, cdir)
             else:




Related Messages


Powered by MHonArc, Updated Sun Sep 09 15:00:25 2007