Hit me with the mercurial clue bat...

Greg Lewis glewis at eyesbeyond.com
Sat Oct 11 19:43:19 PDT 2008


On Thu, Oct 09, 2008 at 09:17:41AM -0700, Kelly O'Hair wrote:
> A few helpful bits of info...

Thanks Kelly, these were indeed very helpful :).  I'm still working my
way through some of the finer details but I'm now up and running at least
in terms of checking changes and pushing them out.

>    * Even though http://hg.openjdk.java.net/cvmi/cvmi/ is a Mercurial forest
>      each repository inside that forest, and in your own forest clone has it's
>      own .hg/hgrc file and it's own private repository settings.
>      The .hg/hgrc file at the top of the forest does not have any influence
>      on the .hg/hgrc file in the other repositories.
>      A forest is a very loose confederation of repositories, doing a
>      fclone-or-fpull-or-fpush is just an easy way of doing:
>         foreach i in ( `find . -name .hg` )
>           ( cd ${i}/.. && hg clone-or-pull-or-push )
>         done
>      So doing an 'fpush' is no different that doing a push in each of the
>      repositories where you made changes.

So, to update the bsd-port forest I would do something like this:

hg fpull http://hg.openjdk.java.net/cvmi/cvmi/ 
[is that the main forest?]
hg fupdate
[merging, fixing any problems this causes]
hg ci
[in each repository]
hg fpush
[would go to the default tree in .hg/hgrc which is the bsd-port tree]

Or thats what it seems like to me :).

>      If you only make changes in say the 'hotspot' repository, all you really
>      need is that one repository, and no forest commands. But pushing changes
>      into any repository without making sure the entire forest builds might
>      not be very co-worker friendly. ;^)

Well, I always make sure it builds on my current platform at least :).
Detecting breakage for the other *BSDs is currently a little difficult, but
that doesn't happen that often for the most part.

>    * The .hg/hgrc file on each repository typically contains a [paths] section
>      which defines the "default" path to the parent repository, usually the
>      path to the repository used to create the initial clone.
>      This .hg/hgrc file is NOT part of the permanent repository data and
>      you can edit it.  See http://www.selenic.com/mercurial/hgrc.5.html.
>      You can have a "default-push" [paths] setting too, so that pulls by default
>      come from one place and push by default goes to another.
>      Or you can provide the path or the name of a path defined in [paths] to
>      the actual 'hg pull' or 'hg push' commands. Lots of choices here.

Cool, so I can define a paths entry for the main forest to avoid having to
remember it :).

> Andrew John Hughes wrote:
> > 2008/10/9 Greg Lewis <glewis at eyesbeyond.com>:
> >> G'day all,
> >>
> >> Okay, I've made some changes to get things working on my FreeBSD 7 box
> >> (since X isn't installed in /usr/X11R6 and it postdates the compat
> >> symlinks that were originally being made).  I've committed them locally
> >> and now want to push them out.
> >>
> >> I assume I use fpush as per the pushing portion of section 7 of
> >> http://www.selenic.com/mercurial/wiki/index.cgi/ForestExtension ?
> >> Bonus points if you can provide exact commands and/or explain what
> >> the 'default' parameter is in the fpush command.
> >>
> >> Also I want to start catching up the BSD port to the changes happening
> >> in the mainstream port before we get too far behind, so any hints on that
> >> would be appreciated.
> >>
> >> cvs, p4, svn and now hg -- too many commands to remember!
> >>
> >> --
> >> Greg Lewis                          Email   : glewis at eyesbeyond.com
> >> Eyes Beyond                         Web     : http://www.eyesbeyond.com
> >> Information Technology              FreeBSD : glewis at FreeBSD.org
> >>
> >>
> > 
> > I assume it uses the same default as standard push which is specified
> > by paths.default in .hg/hgrc.  A clone will create a copy of this file in the
> > root of the checkout with the path cloned as the default e.g.:
> > 
> > $ cat .hg/hgrc
> > [paths]
> > default = http://hg.openjdk.java.net/cvmi/cvmi/
> > 

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org



More information about the bsd-port-dev mailing list