配置hudson以构建多个分支

1 mercurial branch hudson build

我使用ant文件通过hudson在mercurial中构建一个java项目.mailnine哈德森的工作运行得很好.最近创建了一个新的分支并通过commnd line推送到服务器:


hg branch newbranch
hg commit
hg push -f


mainine不包含这些变化,仍然很好.我已经设置了一个与主线相同设置的新作业(实际上是在hudson中复制主线作业),并指定了newbranch.

但是,newbranch作业构建的代码与主线相同.如果我命令行克隆存储库并切换到newbranch,则所有内容都按预期显示.这似乎是一个哈德森配置故障,除非我的merqurial技能偏离正轨.

我还尝试使用与主线相同的设置从sratch设置作业,并添加了newbranch规范,没有任何运气.

我错过了什么?任何想法?

Ry4*_*ase 5

尝试将分支放入URL中进行克隆,如:

http://server/path/to/repo#newbranch
Run Code Online (Sandbox Code Playgroud)

要么

ssh://user@server//path/to/repo#newbranch
Run Code Online (Sandbox Code Playgroud)

您可以看到branch-in-repo-url的完整语法 hg help urls

URL Paths

Valid URLs are of the form:

  local/filesystem/path[#revision]
  file://local/filesystem/path[#revision]
  http://[user[:pass]@]host[:port]/[path][#revision]
  https://[user[:pass]@]host[:port]/[path][#revision]
  ssh://[user[:pass]@]host[:port]/[path][#revision]

Paths in the local filesystem can either point to Mercurial repositories
or to bundle files (as created by 'hg bundle' or 'hg incoming --bundle').

An optional identifier after # indicates a particular branch, tag, or
changeset to use from the remote repository. See also 'hg help revisions'.
Run Code Online (Sandbox Code Playgroud)