Question

I have some scripts run after changes are pushed through a timer and they worked fine in using the proper head, but a force build after those had completed did not succeed. The same slave is being used. Here is a wrapper command for pull/update in master.cfg,

def repo_update( conf ):
    repo = "ssh://buildbot@repo//Users/buildbot/repo"
    repository = Mercurial( repourl=repo, branchType='inrepo', defaultBranch='devel')
    conf.addStep( repository )
    return

In the log it executes the following commands,

/usr/local/bin/hg pull --verbose ssh://buildbot@repo//Users/buildbot/repo
/usr/local/bin/hg identify --num --branch
/usr/local/bin/hg paths default
/usr/local/bin/hg update --clean --repository build --rev 15f87a21bf8aa00d642c2ebbd73a6da161815eaa
/usr/local/bin/hg identify --id --debug

Both logs have the same list of commands and they execute fine. But, in the forcebuild the script has a different argument for --rev --an older head; I'm not even sure where it is grabbing that number, it's not mentioned anywhere else in the script or logs, must be coming from the server, but how do I specify the head or NOT specify it? Am I adding the proper step to the repo?

Was it helpful?

Solution

I had the same problem until I added alwaysUseLatest=True. In your case I suppose you could use:

repository = Mercurial(
    repourl=repo, 
    branchType='inrepo',
    defaultBranch='devel', 
    alwaysUseLatest=True
)

OTHER TIPS

The --rev argument comes either from the revision, or if that is empty, the branch specified in the source stamp. It is possible to specify either of these things when force building.

On the other hand, if you press the rebuild button, when looking at a particular build, the revision built in that particular build is used in the forced build.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top