gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1304980 - /gump/trunk/python/gump/core/update/hg.py
Date Sun, 25 Mar 2012 06:01:46 GMT
Author: bodewig
Date: Sun Mar 25 06:01:44 2012
New Revision: 1304980

URL: http://svn.apache.org/viewvc?rev=1304980&view=rev
Log:
ask 'hg incoming' whether there are any changes before running 'hg pull'

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=1304980&r1=1304979&r2=1304980&view=diff
==============================================================================
--- gump/trunk/python/gump/core/update/hg.py (original)
+++ gump/trunk/python/gump/core/update/hg.py Sun Mar 25 06:01:44 2012
@@ -20,6 +20,7 @@ import re
 from gump.core.update.scmupdater import extract_URL, log_repository_and_url, \
     match_workspace_template, ScmUpdater, should_be_quiet
 from gump.util.process.command import Cmd
+from gump.util.process.launcher import execute
 
 def setup_common_parameters(module, cmd):
     if should_be_quiet(module):    
@@ -60,6 +61,17 @@ class HgUpdater(ScmUpdater):
             Build the appropriate hg command for pull
         """
         log_repository_and_url(module, 'hg')
+
+        cmd = Cmd('hg', 'incoming_' + module.getName(), 
+                  module.getSourceControlStagingDirectory())
+        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')



Mime
View raw message