Tracking 3rd-party sources

Zachery Hostens context-hg at relayd.net
Mon Apr 30 05:07:02 CDT 2007


I think id recommend against the whole patches idea.  This would be kind of similar to tackle how hg is handled with hg, hg-crew, hg-stable (granted i dont know exactly how matt and crew use these at all)

This is actually something im gonna be looking at doing with some code i use from a 3rd party thats modified.

Your easiest bet id say is using 2 repositories.  one (pristine) copy thats pulled from tar ball, and 1 (cloned, active) copy of the code.  You really dont have to worry about applying your patch all the time.  (unless you are trying to release patches for each release then this is a /completely/ different story.)

tar -xzf proj-0.1.tgz ; mv proj-0.1 proj-pristine ; cd proj ; hg init ; hg add ; hg ci -m"init"
cd .. ; hg clone proj-pristine proj-active .

now you work on active.  when an update comes out you unpack into proj-pristine, hg addremove ; hg ci.  then you do hg pull inside of proj-active.  this only pulls the CHANGES from the old to new version.  you do NOT have worry about re-applying your patch in any way, shape, or form unless they modify the exact same code that you patched.

this is actually a recommended format for development in the wiki.  and having a pristine copy around is always good incase you decide to totally hose your local (active) copy.

it shouldnt be to hard to keep pristine copies in there own seperate directory that you just have to be smart enough to not open your editor in.  and you should ONLY be touching the pristine copy to update from tarball , and commit.  other than these two actions which will be done once every so often (for each release) you should not be poking your head around at these copies what so ever.


On Mon, 30 Apr 2007 11:38:49 +0200, Marcin Kasperski <Marcin.Kasperski at softax.com.pl> wrote:
>
>> ** Solution 1 - mercurial queues **
>> (...)
>
> I forgot about one more rather important problem: case when I am
> updating my patch to the newer version, but later on need to get
> the patch suitable for the old mainstream version. It seems that
> unless I remember to manually cd .hg/patches and hg tag there
> at suitable moment, I am out of luck (plus, even if I make this
> tag, I am left to apply patches manually)
>
> (hmm, looks like I am criticizing Queues idea most. This is
> probably because I experimented mainly with this approach, as it
> seems most promising...)
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial

--
Zachery Hostens



More information about the Mercurial mailing list