Commits

Benoît Allard committed 08899fd

mercurial source step: don't update during pull, it will be done later on

Comments (0)

Files changed (2)

master/buildbot/steps/source/mercurial.py

         d = self._sourcedirIsUpdatable()
         def _cmd(updatable):
             if updatable:
-                command = ['pull', self.repourl, '--update']
+                command = ['pull', self.repourl]
             else:
                 command = ['clone', self.repourl, '.', '--noupdate']
             return command
         current_branch = yield self._getCurrentBranch()
         msg = "Working dir is on in-repo branch '%s' and build needs '%s'." % \
               (current_branch, self.update_branch)
-        if current_branch != self.update_branch:
-            if self.clobberOnBranchChange:
+        if current_branch != self.update_branch and self.clobberOnBranchChange:
                 msg += ' Clobbering.'
                 log.msg(msg)
                 yield self.clobber(None)
-            else:
-                msg += ' Updating.'
-                log.msg(msg)
-                yield self._removeAddedFilesAndUpdate(None)
-        else:
-            msg += ' Updating.'
-            log.msg(msg)
-            yield self._removeAddedFilesAndUpdate(None)
+		return
+        msg += ' Updating.'
+        log.msg(msg)
+        yield self._removeAddedFilesAndUpdate(None)
 
     def _pullUpdate(self, res):
         command = ['pull' , self.repourl]

master/buildbot/test/unit/test_steps_source_mercurial.py

             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'pull',
-                                 'http://hg.mozilla.org/stable', '--update'])
+                                 'http://hg.mozilla.org/stable'])
             + 0,
             Expect('rmdir', dict(dir='wkdir',
                                  logEnviron=True))
             + 0, # directory exists
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'pull',
-                                 'http://hg.mozilla.org', '--update'])
+                                 'http://hg.mozilla.org'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'identify', '--branch'])
             + 0, # directory exists
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'pull',
-                                 'http://hg.mozilla.org', '--update'])
+                                 'http://hg.mozilla.org'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'identify', '--branch'])
             + 0, # directory exists
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'pull',
-                                 'http://hg.mozilla.org', '--update'])
+                                 'http://hg.mozilla.org'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'identify', '--branch'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'pull',
-                                 'http://hg.mozilla.org', '--update'])
+                                 'http://hg.mozilla.org'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'identify', '--branch'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'pull',
-                                 'http://hg.mozilla.org', '--update'])
+                                 'http://hg.mozilla.org'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'identify', '--branch'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'pull',
-                                 'http://hg.mozilla.org', '--update'])
+                                 'http://hg.mozilla.org'])
             + 0,
             ExpectShell(workdir='wkdir',
                         command=['hg', '--verbose', 'identify', '--branch'])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.