gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1305214 - /gump/trunk/python/gump/core/update/hg.py
Date Mon, 26 Mar 2012 04:11:34 GMT
Author: bodewig
Date: Mon Mar 26 04:11:34 2012
New Revision: 1305214

URL: http://svn.apache.org/viewvc?rev=1305214&view=rev
Log:
true is not in /bin on FreeBSD but in /usr/bin.  Take the opportunity to use a more useful
dummy command.

Modified:
    gump/trunk/python/gump/core/update/hg.py

Modified: gump/trunk/python/gump/core/update/hg.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/update/hg.py?rev=1305214&r1=1305213&r2=1305214&view=diff
==============================================================================
--- gump/trunk/python/gump/core/update/hg.py (original)
+++ gump/trunk/python/gump/core/update/hg.py Mon Mar 26 04:11:34 2012
@@ -67,19 +67,21 @@ class HgUpdater(ScmUpdater):
         cmd.addParameter('incoming')
         setup_common_parameters(module, cmd)
         result = execute(cmd)
+
         if not result.isOk():
             module.addInfo('No updates')
-            return Cmd('/bin/true', 'update_' + module.getName(), 
-                       module.getSourceControlStagingDirectory())
-
-        cmd = Cmd('hg', 'update_' + module.getName(), 
-                  module.getSourceControlStagingDirectory())
-        cmd.addParameter('pull')
-        # update working copy
-        cmd.addParameter('-u')
-        setup_common_parameters(module, cmd)
-        # pull everything, don't ask
-        cmd.addParameter('-y')
+            cmd = Cmd('echo', 'update_' + module.getName(), 
+                      module.getSourceControlStagingDirectory())
+            cmd.addParameter('hg incoming indicated no changes to pull')
+        else:
+            cmd = Cmd('hg', 'update_' + module.getName(), 
+                      module.getSourceControlStagingDirectory())
+            cmd.addParameter('pull')
+            # update working copy
+            cmd.addParameter('-u')
+            setup_common_parameters(module, cmd)
+            # pull everything, don't ask
+            cmd.addParameter('-y')
         return cmd
 
     def workspaceMatchesModule(self, module):



Mime
View raw message