Hg split ?
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Fri Oct 19 07:25:01 CDT 2007
I did take a look now because I needed something similar: Breaking up
an existing hg mq patch into multiple patches. I did not manage using
filterdiff because it will strip out the "diff --git ..." lines and
binary diffs from the patches. The former could easily be addressed
with a filterdiff option to copy n additional lines _before_ a new
file start. The latter is a little harder. I am considering adding
this to filterdiff or else write an hg filterdiff extension that does
this.
-peo
On 10/19/07, Peter Arrenbrecht <peter.arrenbrecht at gmail.com> wrote:
> Maybe a combination of hg export and filterdiff could help here.
> Haven't tried it myself, though.
> -peo
>
> On 10/19/07, Jonas Pfenniger <zimbatm at oree.ch> wrote:
> > Hello world !
> >
> > I am investigating mercurial and one use case that is not really clear
> > to me is when you want to split a repository (Btw, the hgbook[1] was
> > really helpful). I hope that you can enlighten me :)
> >
> > So imagine you build a video player (fictive example). You have all
> > kind of stuff in your repo like the gui and various video format
> > libraries. Then, you decide to make a new product, which will be a
> > video server. Since you want to reuse your work on the video formats
> > and that you two products have independent release schedules, how
> > could you possibly share that part of the code ?
> >
> > The first solution that seems the most easy, would be to develop the
> > video server in the same repository. But since the two products have
> > different schedules, I don't really see how to manage it.
> >
> > The second solution I see would require to split the initial
> > repository in two and maintain a kind of link like svn:externals
> > (except that the feature doesn't exist in hg and that the svn
> > implementation is not ideal). Something like :
> >
> > $ cd vidclient
> > vidclient$ ls
> > gui/
> > libvid/
> > vidclient$ hg split libvid ../libvid
> > ** splitting repo **
> > vidclient$ ls libvid # files are still there with a new .hg dir
> > vidclient$ ls ../libvid # and here
> > vidclient$ cd ..
> > $ mkdir vidserver; cd vidserver; hg init
> > vidserver$ hg link libvid ../libvid at revno # specific revision unlike svn
> >
> > --
> > Cheers,
> > zimbatm
> >
> > [1] : http://hgbook.red-bean.com/
> > _______________________________________________
> > Mercurial mailing list
> > Mercurial at selenic.com
> > http://selenic.com/mailman/listinfo/mercurial
> >
>
More information about the Mercurial
mailing list