Hi,

If you feel that you need to use the Multiple SCMs plugin,
I would strongly encourage you *not* to use it.  The Multiple SCMs plugin
was written
at a time when it was needed to overcome some limitations of the existing
model of Jenkins jobs,
where it was only possible to have one SCM configured for one job.  It was
never supported by the core Jenkins developers.  The Multiple SCMs plugin
kind of works, and people do use it,
but it has limitations, and problems that people run into all the time.

If inside your job you feel you need to do "hg clone" or "hg update"
operations, then explicitly
add those operations in your build steps.
It is not ideal, but it will get you going.

However, if I can encourage you to go in this direction, I would seriously
for you to learn pipeline (
https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin ).

Pipeline is being actively worked on by the core Jenkins developers and is
supported.
With Pipeline, you can check out from multiple repositories (even hg
repositories), and do it in
a supported way.

You can get going with Pipeline by reading some of the documentation here:
https://github.com/jenkinsci/pipeline-plugin#gettings-started

To give you some ideas, you could write a Pipeline that checkouts out from
two hg repositories by doing something like:


node {
    stage "Checkout Python 3.5 source code"
    checkout([ $class: 'MercurialSCM', credentialsId: '', revision: '3.5',
source:
              'https://hg.python.org/cpython', subdir: 'directory1' ])

    stage "Checkout Python 2.7 source code"
    checkout([$class: 'MercurialSCM', credentialsId: '', revision: '2.7',
source:
              'https://hg.python.org/cpython', subdir: 'directory2'])

}


--
Craig



On Thu, Jun 9, 2016 at 9:43 AM, Chastina Li <[email protected]> wrote:

> I've been trying to get the Multiple SCM plugin to manage multiple
> repositories, each with default, qa and prod branches, on Mercurial. But
> there doesn't seem to be a way of tracking multiple branches from a single
> repository using one Multiple SCM task.
> I've read through the official doc here
> <https://wiki.jenkins-ci.org/display/JENKINS/Multiple+SCMs+Plugin>and
> looked online but I can't find any information regarding whether this
> feature exists or not.
> Is it possible to achieve multi-revision management using one SCM task
> through Jenkins? Or else I will have to "hg clone and checkout" all
> branches, which is a bit of a pain.
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVcsgJ53Oz-X2Ai2hRCPGav_Ae12BonRJrTs8A3TL17aUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to