[PATCH] merge: add option to return successful exit code on a 'no-op merge'

Bernhard Urban lewurm at gmail.com
Wed Nov 5 07:11:43 CST 2014


On Tue, Nov 4, 2014 at 11:09 PM, Matt Mackall <mpm at selenic.com> wrote:

> On Tue, 2014-11-04 at 22:13 +0100, Bernhard Urban wrote:
> > On Tue, Nov 4, 2014 at 7:16 PM, Pierre-Yves David <
> > pierre-yves.david at ens-lyon.org> wrote:
> >
> > >
> > >
> > > On 11/04/2014 04:08 PM, Bernhard Urban wrote:
> > >
> > >> # HG changeset patch
> > >> # User Bernhard Urban <lewurm at gmail.com>
> > >> # Date 1415116918 -3600
> > >> #      Tue Nov 04 17:01:58 2014 +0100
> > >> # Node ID 5c6b2329f67f18a6f2bf9fff2ef86f04337b25ff
> > >> # Parent  30e0dcd7c5ffd99fb9c2474e9d73ca01a7d292fa
> > >> merge: add option to return successful exit code on a 'no-op merge'
> > >>
> > >
> > > Can you tell us more about your usecase here ?
> > >
> > >
> > Our concrete situation is that we've a downstream repo (repoB) that we
> want
> > to automatically merge on pushes to its upstream repo (repoA) and run
> some
> > tests.
> >
> > So we do something like `hg clone repoB && hg pull repoA && hg merge &&
> > make tests'.  The intended behaviour is that if the merge fails, the
> whole
> > build should be marked as failed (and thus, needs human interaction).
> > However, it can happen that for some reasons repoB is already merged with
> > repoA and then `hg merge' breaks the chain because it returns something
> !=0
> > since there's nothing to merge.
>
> We're pretty reluctant to add new flags with very narrow uses. The fact
> that we've gotten nearly 10 years without this being proposed suggests
> it might be a pretty obscure need.
>

ok I understand.  Thanks for your comments and suggestions anyway! :)

-Bernhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20141105/de7f068a/attachment.html>


More information about the Mercurial-devel mailing list