I have mercurial repository, and by providing the URL to Jenkins, i get the following in stdout:
Started by an SCM change [workspace] $ hg incoming --quiet --bundle hg.bundle --template "{desc|xmlescape}{file_adds|stringify|xmlescape}{file_dels|stringify|xmlescape}{files|stringify|xmlescape}{parents}\n" --rev default [workspace] $ hg unbundle hg.bundle adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) [workspace] $ hg update --clean --rev default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved [workspace] $ hg log --rev . --template {node} No emails were triggered.
Question is HOW are these commands genera开发者_开发技巧ted and can they be modified ?
Those commands are part of the Mercurial Jenkins plugin, with the source code available at GitHub.
You can find the incoming command used in the hudson.plugins.mercurial.MercurialSCM.java
class in the update()
method.
os.write("<changesets>\n".getBytes());
ArgumentListBuilder args = findHgExe(build, listener, false);
args.add(forest ? "fincoming" : "incoming", "--quiet");
if (!forest) {
args.add("--bundle", "hg.bundle");
}
args.add("--template", MercurialChangeSet.CHANGELOG_TEMPLATE);
args.add("--rev", getBranch(env));
精彩评论