Strategies for push/merge problem?

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Jul 22 19:43:37 CDT 2008


On Tue, 22 Jul 2008 17:18:55 -0400, Doug Philips <dgou at mac.com> wrote:
> My question is, how well does Mercurial cope with lots of branch
> names?

I don't know about branch names, but it seems to work very nicely for
the Greek FreeBSD doc/ translation effort.  There are times that Manolis
works in his own tree for a week or so before I pull from him.  I make
several imports from the upstream CVS tree of FreeBSD doc/, merge with
my own changes and then periodically pull & merge from Manolis too.

The resulting merge history can be either 'simple' like:

    http://hg.hellug.gr/freebsd/doc-el/graph/461?revcount=50

or it may end up with several almost parallel lines of changes, like:

    http://hg.hellug.gr/freebsd/doc-el/graph/421?revcount=50
    http://hg.hellug.gr/freebsd/doc-el/graph/414?revcount=60
    http://hg.hellug.gr/freebsd/doc-el/graph/315?revcount=60

It looks like about every 100 changesets we manage to be awake and
patching the tree at the same time.  Merging happens often enough that
this sort of 'parallelism' in the commits hasn't really been a problem
at all until now.

> Medium-esque changes (5+ changesets) often last many days or weeks
> before being remerged. But lets say I have 1,000 of them over the
> course of several years of development, will that cause performance
> issues with 'hg log' or any of the other commands? I can't seem to
> figure out when in the wiki or book or man pages to go for that
> answer...

It probably makes a LOT sense to merge more often than `once every 1000
changesets'.

Having said that, at my last job I pulled with a bunch of shell scripts
all the changesets of a Perforce branch into an Hg repository.  Then I
cloned at the branch point of a second Perforce branch and pulled the
changes of the 'other' branch into the clone.  Let's call these branches
"main" and "devel" for this example.

Merging the two clones with 'imerge', even though there were more than
2000 commits in the second branch, was really nice with Hg.  When it was
done _once_ and the merge-tree (a third clone) grew a merge changeset,
it was _easier_ to repeat again and again.  Finally, more than a couple
of weeks later, when I got the 'ok' to pull-up all the changes of
"devel" into "main".  I just pulled the changes of Perforce one final
time into the "incoming" branch copies, pulled both branches into the
merge tree once more and merged the remaining stuff in a few minutes.

To make a long story short, you don't _have_ to merge after thousands of
changes have flown by.  Even if you do, however, it isn't really *that*
difficult.

- Giorgos



More information about the Mercurial mailing list