<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 4, 2014 at 7:16 PM, Pierre-Yves David <span dir="ltr"><<a href="mailto:pierre-yves.david@ens-lyon.org" target="_blank">pierre-yves.david@ens-lyon.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 11/04/2014 04:08 PM, Bernhard Urban wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# HG changeset patch<br>
# User Bernhard Urban <<a href="mailto:lewurm@gmail.com" target="_blank">lewurm@gmail.com</a>><br>
# Date 1415116918 -3600<br>
#      Tue Nov 04 17:01:58 2014 +0100<br>
# Node ID 5c6b2329f67f18a6f2bf9fff2ef86f<u></u>04337b25ff<br>
# Parent  30e0dcd7c5ffd99fb9c2474e9d73ca<u></u>01a7d292fa<br>
merge: add option to return successful exit code on a 'no-op merge'<br>
</blockquote>
<br></span>
Can you tell us more about your usecase here ?<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br>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.  </div></div><br>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.<br><br>Granted, we can do something like 'hg clone repoB && hg pull repoA && (test `hg log -r 'head()' --template '{node}\n' | wc -l` -le 1 || hg merge) && make tests', but I think it's somehow unintentional that `hg merge' bails out on such a "no-op" merge.  I would even go that far and make the suggested -a option as default, but I can see how this could break existing software.<br><br><br>What do you think?<br><br><br>Thanks,<br>Bernhard<br></div></div>