Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mercurial: how to synchronize mq patches from a master repo as mq patches to a set of clone repos

I have to run a dozen of different build tests on a code base maintained in a mercurial repository. I don't want to run serially these tests on same repository because they modify a set of common files and I want to run them in parallel on different machines. Also, after all tests are run I want to have access to latest test results from those test work areas. Currently I'm cloning the master repository a dozen of times and run in each clone one different test. Before each test execution I do a pull/update/purge preparation sequence in order to start the test on latest clean state. That's good for me.

I'm also preparing new changes using mq extension that I would test on all clones as above before committing them. For testing some ready candidate mq patches I want somehow to deploy/synchronize them to be available in test clones and apply those ready for testing using some guard before running the test.

Did anybody do this synchronization before? What's the most simple way to do it? Do I need to have versioned mq patches for that?

like image 512
dim Avatar asked Dec 29 '22 20:12

dim


1 Answers

patches can be maintained in their own repository provided you passed the "-c" switch to qinit like so

hg qinit -c

You may still be able to create a patch repo after the fact via

cd .hg/patches
hg init
hg addremove
hg commit -m "my patches"

But I haven't ever tried that personally.

then .hg/patches can be treated like any other mercurial repository. so I think you could probably roll some shell scripting. to get into the .hg dir of your cloned repos and do a

hg clone http://centralrepo.com/patch_repo ./patches
like image 94
Tom Willis Avatar answered Jan 13 '23 22:01

Tom Willis