<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 14, 2017 at 1:21 PM, Denis Laxalde <span dir="ltr"><<a href="mailto:denis@laxalde.org" target="_blank">denis@laxalde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Martin von Zweigbergk a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Nov 14, 2017 at 3:24 AM, Denis Laxalde <<a href="mailto:denis@laxalde.org" target="_blank">denis@laxalde.org</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Martin von Zweigbergk a écrit :<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Nov 13, 2017 at 3:07 PM, Augie Fackler <<a href="mailto:raf@durin42.com" target="_blank">raf@durin42.com</a>> wrote:<br>
<br>
On Sun, Nov 12, 2017 at 06:06:37PM +0100, Denis Laxalde wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# HG changeset patch<br>
# User Denis Laxalde <<a href="mailto:denis@laxalde.org" target="_blank">denis@laxalde.org</a>><br>
# Date 1510489041 -3600<br>
#      Sun Nov 12 13:17:21 2017 +0100<br>
# Node ID 25d1891bd300bc527cb7e878532c85<wbr>12ff5489de<br>
# Parent  1d16e28225e01d2fac9f31ed058ae1<wbr>f4c00bb9da<br>
# EXP-Topic rebase-obsolete<br>
rebase: exclude obsoletes without a successor in destination (issue5300)<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
If I read it right, this line should be something like "rebase: exclude<br>
*descendants of* obsoletes without..."<br>
<br>
</blockquote>
<br>
That's correct here and in the release note below.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I took patches 1-3. I think this is right. I'm 90% sure this is<br>
right. But I'm a little tired, and so I want Martin's more careful eye<br>
on it if he has time.<br>
<br>
<br>
</blockquote>
Thanks for asking. I think this makes sense. Thanks for working on this,<br>
Denis!<br>
<br>
I think a general thing to note is that if a commit in the rebase set has<br>
become obsolete, then there's a conflict between the rebase invocation and<br>
the obsmarkers. The rebase command tells us to move the descendants onto<br>
the rebase destination, while the obsmarkers tell us to move them onto the<br>
obsolete commit's successor. Since we don't keep track of some default<br>
rebase destination (like git's upstream concept), any "hg rebase"<br>
invocation is a one-off as far as hg is concerned, so I think it makes<br>
sense to resolve the conflict in favor of the obsmarkers. That probably<br>
didn't make much sense, so let me give an example:<br>
<br>
o B'<br>
|<br>
o O<br>
|<br>
| o U<br>
| |<br>
| | o C<br>
| | |<br>
| | x B<br>
| |/<br>
| .<br>
|/<br>
o A<br>
<br>
Let's say C's upstream was somehow configured to be U here, and that B had<br>
been rebased onto O instead. If the user then runs "hg evolve -r C", you<br>
could argue that there would be a similar conflict between rebase/upstream<br>
that want to move C onto U and obsmarkers that want to move C onto B'.<br>
However, since we don't have that feature, B' is the only natural<br>
destination.<br>
<br>
</blockquote>
<br>
I think I get this right, but I'm not sure if you actually expect me to<br>
change something (apart for other explicit comments, which I'll address)?<br>
<br>
</blockquote>
<br>
Not asking for any changes. I just thought I'd mention an aspect I had not<br>
thought about before.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, the change proposed here handles cases where we cannot rebase C<br>
onto B' because both B and B' are part of the rebase set (and B' is not<br>
in destination).<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In the following example, when trying to rebase 3:: onto 2, the rebase<br>
will abort with "this rebase will cause divergence from: 4":<br>
<br>
      o  7 f<br>
      |<br>
      | o  6 e<br>
      | |<br>
      | o  5 d'<br>
      | |<br>
      x |  4 d (rewritten as 5)<br>
      |/<br>
      o  3 c<br>
      |<br>
      | o  2 x<br>
      | |<br>
      o |  1 b<br>
      |/<br>
      o  0 a<br>
<br>
By excluding obsolete changesets without a successor in destination (4<br>
in the example above) and their descendants, we make rebase work in this<br>
case, thus giving:<br>
<br>
      o  11 e<br>
      |<br>
      o  10 d'<br>
      |<br>
      o  9 c<br>
      |<br>
      o  8 b<br>
      |<br>
      | o  7 f<br>
      | |<br>
      | | x  6 e (rewritten using rebase as 11)<br>
      | | |<br>
      | | x  5 d' (rewritten using rebase as 10)<br>
      | | |<br>
      | x |  4 d<br>
      | |/<br>
      | x  3 c (rewritten using rebase as 9)<br>
      | |<br>
      o |  2 x<br>
      | |<br>
      | x  1 b (rewritten using rebase as 8)<br>
      |/<br>
      o  0 a<br>
<br>
where branch 4:: is left behind while branch 5:: is rebased as expected.<br>
<br>
The rationale is that users may not be interested in rebasing orphan<br>
changesets when specifying a rebase set that include them but would<br>
still want "stable" ones to be rebased. Currently, the user is suggested<br>
to allow divergence (but probably does not want it) or they must specify<br>
a rebase set excluding problematic changesets (which might be a bit<br>
cumbersome). The approach proposed here corresponds to "Option 2" in<br>
<a href="https://www.mercurial-scm.org/wiki/CEDRebase" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/<wbr>wiki/CEDRebase</a>.<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
I think I'd still want "Option 3", but I don't think this patch prevents<br>
that from happening later.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
.. feature::<br>
<br>
     Let 'hg rebase' avoid content-divergence when obsolete changesets<br>
are<br>
     present in the rebase set by skipping possible sources of<br>
divergence.<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
Similar to what I said above, I think it would help to mention descendants<br>
here. While "possible sources of divergence" is vague enough to be<br>
correct,<br>
it would be helpful if we could clarify it.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote>
<br>
</blockquote>
Just to make sure, the stuff below is not part of the release notes, is<br>
it?<br>
I'm not familiar with the syntax, so I can't tell (and I'm too lazy to<br>
test<br>
it).<br>
<br>
</blockquote>
<br>
The directive block only includes indented lines, so by de-denting the<br>
text below, it will not be in the release note.<br>
<br>
<br>
We extend _computeobsoletenotrebased() so that it also return a set of<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
obsolete changesets in rebaseset without a successor in destination.<br>
This 'obsoletewithoutsuccessorindes<wbr>tination' is then stored as an<br>
attribute of rebaseruntime and used in _performrebasesubset() to:<br>
<br>
* filter out descendants of these changesets from the revisions to<br>
    rebase;<br>
* issue a message about these revisions being skipped.<br>
<br>
This only occurs if 'evolution.allowdivergence' option is off and<br>
'rebaseskipobsolete' is on.<br>
<br>
diff --git a/hgext/rebase.py b/hgext/rebase.py<br>
--- a/hgext/rebase.py<br>
+++ b/hgext/rebase.py<br>
@@ -179,6 +179,7 @@ class rebaseruntime(object):<br>
           # other extensions<br>
           self.keepopen = opts.get('keepopen', False)<br>
           self.obsoletenotrebased = {}<br>
+        self.obsoletewithoutsuccessori<wbr>ndestination = set()<br>
<br>
       @property<br>
       def repo(self):<br>
@@ -311,9 +312,10 @@ class rebaseruntime(object):<br>
           if not self.ui.configbool('experiment<wbr>al',<br>
<br>
</blockquote>
'rebaseskipobsolete'):<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
               return<br>
           obsoleteset = set(obsoleterevs)<br>
-        self.obsoletenotrebased = _computeobsoletenotrebased(sel<br>
f.repo,<br>
-                                    obsoleteset, destmap)<br>
+        self.obsoletenotrebased, self.obsoletewithoutsuccessori<br>
ndestination<br>
<br>
</blockquote>
= \<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+            _computeobsoletenotrebased(sel<wbr>f.repo, obsoleteset,<br>
destmap)<br>
           skippedset = set(self.obsoletenotrebased)<br>
+        skippedset.update(self.obsolet<wbr>ewithoutsuccessorindestination<wbr>)<br>
           _checkobsrebase(self.repo, self.ui, obsoleteset, skippedset)<br>
<br>
       def _prepareabortorcontinue(self, isabort):<br>
@@ -419,12 +421,26 @@ class rebaseruntime(object):<br>
       def _performrebasesubset(self, tr, subset, pos, total):<br>
           repo, ui, opts = self.repo, self.ui, self.opts<br>
           sortedrevs = repo.revs('sort(%ld, -topo)', subset)<br>
+        allowdivergence = self.ui.configbool(<br>
+            'experimental', 'evolution.allowdivergence')<br>
+        if not allowdivergence:<br>
+            sortedrevs -= repo.revs(<br>
+                'descendants(%ld) and not %ld',<br>
+                self.obsoletewithoutsuccessori<wbr>ndestination,<br>
+                self.obsoletewithoutsuccessori<wbr>ndestination,<br>
+            )<br>
           for rev in sortedrevs:<br>
               dest = self.destmap[rev]<br>
               ctx = repo[rev]<br>
               desc = _ctxdesc(ctx)<br>
               if self.state[rev] == rev:<br>
                   ui.status(_('already rebased %s\n') % desc)<br>
+            elif (not allowdivergence<br>
+                  and rev in self.obsoletewithoutsuccessori<br>
<br>
</blockquote>
ndestination):<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+                msg = _('note: not rebasing %s and its descendants as '<br>
+                        'this would cause divergences\n') % desc<br>
+                repo.ui.status(msg)<br>
+                self.skipped.add(rev)<br>
               elif rev in self.obsoletenotrebased:<br>
                   succ = self.obsoletenotrebased[rev]<br>
                   if succ is None:<br>
@@ -1616,11 +1632,16 @@ def _filterobsoleterevs(repo, revs):<br>
       return set(r for r in revs if repo[r].obsolete())<br>
<br>
   def _computeobsoletenotrebased(rep<wbr>o, rebaseobsrevs, destmap):<br>
-    """return a mapping obsolete => successor for all obsolete nodes to<br>
<br>
</blockquote>
be<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-    rebased that have a successors in the destination<br>
+    """Return (obsoletenotrebased, obsoletewithoutsuccessorindest<br>
<br>
</blockquote>
ination).<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+    `obsoletenotrebased` is a mapping mapping obsolete => successor for<br>
<br>
</blockquote>
all<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+    obsolete nodes to be rebased given in `rebaseobsrevs`.<br>
<br>
-    obsolete => None entries in the mapping indicate nodes with no<br>
<br>
</blockquote>
successor"""<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+    `obsoletewithoutsuccessorindes<wbr>tination` is a set with obsolete<br>
<br>
</blockquote>
revisions<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+    without a successor in destination.<br>
+    """<br>
       obsoletenotrebased = {}<br>
+    obsoletewithoutsuccessorindest<wbr>ination = set([])<br>
<br>
       assert repo.filtername is None<br>
       cl = repo.changelog<br>
@@ -1641,8 +1662,17 @@ def _computeobsoletenotrebased(rep<wbr>o, reb<br>
                   if cl.isancestor(succnode, destnode):<br>
                       obsoletenotrebased[srcrev] = nodemap[succnode]<br>
                       break<br>
+            else:<br>
+                # Unless 'srcrev' only has one successor and it's not<br>
in<br>
+                # rebaseset, we might skip it and its descendants as it<br>
<br>
</blockquote>
has no<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+                # successor in destination. Otherwise, we'll issue the<br>
+                # divergence warning and abort.<br>
<br>
</blockquote>
<br>
</blockquote></blockquote></blockquote>
Hmm, that actually doesn't sound like "successor in destination", it sounds<br>
like "no successor in rebase set". It sounds like it'll miss this case:<br>
<br>
$ hg hg rebase -b C -d E<br>
<br>
o E<br>
|<br>
o B''<br>
|<br>
| o D<br>
| |<br>
| x B'<br>
| |<br>
| | o C<br>
| | |<br>
| | x B<br>
| |/<br>
| o A<br>
|/<br>
o X<br>
<br>
I think it would be nice to *not* skip C or D in this case (IIUC, C would<br>
be skipped by this patch). Maybe it's enough to check only the immediate<br>
visible successors? I.e. using the "closest=True" thing that I think Boris<br>
added recently.<br>
<br>
</blockquote>
<br></div></div>
This case appears to be handled independently of this patch (because b<br>
has a successor in destination b''). So I get:</blockquote><div><br></div><div>Oh, right, that makes sense.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
  o  10 d<br>
  |<br>
  | o  9 c<br></span>
  |/<br>
  o  8 a<br>
  |<br>
  | x  7 d (rewritten using rebase as 10)<br>
  | |<br>
  | | x  6 c (rewritten using rebase as 9)<br>
  | | |<br>
  o | |  5 e<br>
  | | |<br>
  | x |  4 b'<br>
  | | |<br>
  | | x  3 b<br>
  | |/<br>
  o |  2 b''<br>
  | |<br>
  | x  1 a (rewritten using rebase as 8)<br>
  |/<br>
  o  0 x<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+                if (len(successors) > 1<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote>
<br>
<br>
</blockquote>
This line doesn't seem necessary, but feel free to keep if you think it<br>
helps readability (I find it slightly distracting).<br>
<br>
</blockquote>
<br>
You're right, it's not needed.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+                        and any(nodemap[s] in destmap<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+                                for s in successors if s != srcnode)):<br>
+                    obsoletewithoutsuccessorindest<wbr>ination.add(srcrev)<br>
<br>
</blockquote>
<br>
</blockquote></blockquote></blockquote>
This does not seem to check the "only has one successor" that you<br>
described. I'm not sure what the reason for that condition is, so I don't<br>
know if the code or the description should be fixed (or if I just<br>
misunderstood). I saw some comment suggesting that we don't care much about<br>
splits yet, so I suppose the "only has one successor" is not about that?<br>
</blockquote>
<br></span>
Sorry, the comment is wrong (and the "if len(successors) > 1" is<br>
useless). I'd rephrase it as: "If 'srcrev' has a successor in rebase set<br>
but none in destination, we shall skip it and its descendants to avoid<br>
divergence".<br>
The check for "no successor in destination" is done through the "break"<br>
in the loop above (and if the loop does not break, we enter the else<br>
clause and check if there's a successor in rebase set).<br>
The case for "a successor in rebase set but none in destination" still<br>
produces the divergence warning and aborts (this is tested below the "If<br>
the rebase set has an obsolete (d) with..." comment; though this one is<br>
also wrongly talking about "unique successor).</blockquote><div><br></div><div>Ah, it's both of those conditions ("not in destination" and "in rebase set"). Thanks for explaining. Just update the commit message and the code comments and this patch will look good to me then, I think. Thanks again for working on this.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-    return obsoletenotrebased<br>
+    return obsoletenotrebased, obsoletewithoutsuccessorindest<wbr>ination<br>
<br>
   def summaryhook(ui, repo):<br>
       if not repo.vfs.exists('rebasestate')<wbr>:<br>
diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t<br>
--- a/tests/test-rebase-obsolete.t<br>
+++ b/tests/test-rebase-obsolete.t<br>
@@ -987,6 +987,208 @@ Create the changes that we will rebase<br>
     rebasing 21:7bdc8a87673d "dummy change" (tip)<br>
     $ cd ..<br>
<br>
+Divergence cases due to obsolete changesets<br>
+-----------------------------<wbr>--------------<br>
+<br>
+We should ignore branches with unstable changesets when they are based<br>
<br>
</blockquote>
on an<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+obsolete changeset which successor is in rebase set.<br>
+<br>
+  $ hg init divergence<br>
+  $ cd divergence<br>
+  $ cat >> .hg/hgrc << EOF<br>
+  > [extensions]<br>
+  > strip =<br>
+  > [alias]<br>
+  > strip = strip --no-backup --quiet<br>
+  > [templates]<br>
+  > instabilities = '{rev}:{node|short} {desc|firstline}{if(instabilit<br>
ies,"<br>
<br>
</blockquote>
({instabilities})")}\n'<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  > EOF<br>
+<br>
+  $ hg debugdrawdag <<EOF<br>
+  >   e   f<br>
+  >   |   |<br>
+  >   d'  d # replace: d -> d'<br>
+  >    \ /<br>
+  >     c<br>
+  >     |<br>
+  >   x b<br>
+  >    \|<br>
+  >     a<br>
+  > EOF<br>
+  $ hg log -G -r 'a'::<br>
+  o  7:1143e9adc121 f<br>
+  |<br>
+  | o  6:d60ebfa0f1cb e<br>
+  | |<br>
+  | o  5:027ad6c5830d d'<br>
+  | |<br>
+  x |  4:76be324c128b d (rewritten using replace as 5:027ad6c5830d)<br>
+  |/<br>
+  o  3:a82ac2b38757 c<br>
+  |<br>
+  | o  2:630d7c95eff7 x<br>
+  | |<br>
+  o |  1:488e1b7e7341 b<br>
+  |/<br>
+  o  0:b173517d0057 a<br>
+<br>
+<br>
+Changeset d and its descendants are excluded to avoid divergence of d,<br>
<br>
</blockquote>
which<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+would occur because the successor of d (d') is also in rebaseset. As a<br>
+consequence f (descendant of d) is left behind.<br>
+<br>
+  $ hg rebase -b 'e' -d 'x'<br>
+  rebasing 1:488e1b7e7341 "b" (b)<br>
+  rebasing 3:a82ac2b38757 "c" (c)<br>
+  rebasing 5:027ad6c5830d "d'" (d')<br>
+  rebasing 6:d60ebfa0f1cb "e" (e)<br>
+  note: not rebasing 4:76be324c128b "d" (d) and its descendants as this<br>
<br>
</blockquote>
would cause divergences<br>
<br>
<br>
</blockquote>
The plural "divergences" sounds wrong to me, but I'm not sure. Augie (or<br>
others), since you're a native English speaker, do you think it should be<br>
singular or plural?<br>
<br>
</blockquote>
<br>
It feels strange to me as well. I took it from the existing message<br>
"this rebase will cause divergences from: <obsolete>" (which, maybe, was<br>
also written by a non-native).<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  $ hg log -G -r 'a'::<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  o  11:eb6d63fc4ed5 e<br>
+  |<br>
+  o  10:44d8c724a70c d'<br>
+  |<br>
+  o  9:d008e6b4d3fd c<br>
+  |<br>
+  o  8:67e8f4a16c49 b<br>
+  |<br>
+  | o  7:1143e9adc121 f<br>
+  | |<br>
+  | | x  6:d60ebfa0f1cb e (rewritten using rebase as 11:eb6d63fc4ed5)<br>
+  | | |<br>
+  | | x  5:027ad6c5830d d' (rewritten using rebase as 10:44d8c724a70c)<br>
+  | | |<br>
+  | x |  4:76be324c128b d (rewritten using replace as 5:027ad6c5830d)<br>
+  | |/<br>
+  | x  3:a82ac2b38757 c (rewritten using rebase as 9:d008e6b4d3fd)<br>
+  | |<br>
+  o |  2:630d7c95eff7 x<br>
+  | |<br>
+  | x  1:488e1b7e7341 b (rewritten using rebase as 8:67e8f4a16c49)<br>
+  |/<br>
+  o  0:b173517d0057 a<br>
+<br>
+  $ hg strip -r 8:<br>
+<br>
+If the rebase set has an obsolete (d) with a unique successor (d')<br>
<br>
</blockquote>
outside the<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+rebase set and not in destination, we still get the divergence warning.<br>
<br>
</blockquote>
By<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+allowing divergence, we can perform the rebase.<br>
+<br>
+  $ hg rebase -r 'c'::'f' -d 'x'<br>
+  abort: this rebase will cause divergences from: 76be324c128b<br>
+  (to force the rebase please set experimental.evolution.allowdi<br>
<br>
</blockquote>
vergence=True)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  [255]<br>
+  $ hg rebase --config experimental.evolution.allowdi<wbr>vergence=true -r<br>
<br>
</blockquote>
'c'::'f' -d 'x'<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  rebasing 3:a82ac2b38757 "c" (c)<br>
+  rebasing 4:76be324c128b "d" (d)<br>
+  rebasing 7:1143e9adc121 "f" (f tip)<br>
+  $ hg log -G -r 'a':: -T instabilities<br>
+  o  10:e1744ea07510 f<br>
+  |<br>
+  o  9:e2b36ea9a0a0 d (content-divergent)<br>
+  |<br>
+  o  8:6a0376de376e c<br>
+  |<br>
+  | x  7:1143e9adc121 f<br>
+  | |<br>
+  | | o  6:d60ebfa0f1cb e (orphan)<br>
+  | | |<br>
+  | | o  5:027ad6c5830d d' (orphan content-divergent)<br>
+  | | |<br>
+  | x |  4:76be324c128b d<br>
+  | |/<br>
+  | x  3:a82ac2b38757 c<br>
+  | |<br>
+  o |  2:630d7c95eff7 x<br>
+  | |<br>
+  | o  1:488e1b7e7341 b<br>
+  |/<br>
+  o  0:b173517d0057 a<br>
+<br>
+  $ hg strip -r 8:<br>
+<br>
+(Not skipping obsoletes means that divergence is allowed.)<br>
+<br>
+  $ hg rebase --config experimental.rebaseskipobsolet<wbr>e=false -r<br>
<br>
</blockquote>
'c'::'f' -d 'x'<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  rebasing 3:a82ac2b38757 "c" (c)<br>
+  rebasing 4:76be324c128b "d" (d)<br>
+  rebasing 7:1143e9adc121 "f" (f tip)<br>
+<br>
+  $ hg strip -r 0:<br>
+<br>
+Similar test on a more complex graph<br>
+<br>
+  $ hg debugdrawdag <<EOF<br>
+  >       g<br>
+  >       |<br>
+  >   f   e<br>
+  >   |   |<br>
+  >   e'  d # replace: e -> e'<br>
+  >    \ /<br>
+  >     c<br>
+  >     |<br>
+  >   x b<br>
+  >    \|<br>
+  >     a<br>
+  > EOF<br>
+  $ hg log -G -r 'a':<br>
+  o  8:2876ce66c6eb g<br>
+  |<br>
+  | o  7:3ffec603ab53 f<br>
+  | |<br>
+  x |  6:e36fae928aec e (rewritten using replace as 5:63324dc512ea)<br>
+  | |<br>
+  | o  5:63324dc512ea e'<br>
+  | |<br>
+  o |  4:76be324c128b d<br>
+  |/<br>
+  o  3:a82ac2b38757 c<br>
+  |<br>
+  | o  2:630d7c95eff7 x<br>
+  | |<br>
+  o |  1:488e1b7e7341 b<br>
+  |/<br>
+  o  0:b173517d0057 a<br>
+<br>
+  $ hg rebase -b 'f' -d 'x'<br>
+  rebasing 1:488e1b7e7341 "b" (b)<br>
+  rebasing 3:a82ac2b38757 "c" (c)<br>
+  rebasing 5:63324dc512ea "e'" (e')<br>
+  rebasing 7:3ffec603ab53 "f" (f)<br>
+  rebasing 4:76be324c128b "d" (d)<br>
+  note: not rebasing 6:e36fae928aec "e" (e) and its descendants as this<br>
<br>
</blockquote>
would cause divergences<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  $ hg log -G -r 'a':<br>
+  o  13:a1707a5b7c2c d<br>
+  |<br>
+  | o  12:ef6251596616 f<br>
+  | |<br>
+  | o  11:b6f172e64af9 e'<br>
+  |/<br>
+  o  10:d008e6b4d3fd c<br>
+  |<br>
+  o  9:67e8f4a16c49 b<br>
+  |<br>
+  | o  8:2876ce66c6eb g<br>
+  | |<br>
+  | | x  7:3ffec603ab53 f (rewritten using rebase as 12:ef6251596616)<br>
+  | | |<br>
+  | x |  6:e36fae928aec e (rewritten using replace as 5:63324dc512ea)<br>
+  | | |<br>
+  | | x  5:63324dc512ea e' (rewritten using rebase as 11:b6f172e64af9)<br>
+  | | |<br>
+  | x |  4:76be324c128b d (rewritten using rebase as 13:a1707a5b7c2c)<br>
+  | |/<br>
+  | x  3:a82ac2b38757 c (rewritten using rebase as 10:d008e6b4d3fd)<br>
+  | |<br>
+  o |  2:630d7c95eff7 x<br>
+  | |<br>
+  | x  1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49)<br>
+  |/<br>
+  o  0:b173517d0057 a<br>
+<br>
+<br>
+  $ cd ..<br>
+<br>
   Rebase merge where successor of one parent is equal to destination<br>
<br>
</blockquote>
(issue5198)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
     $ hg init p1-succ-is-dest<br>
______________________________<wbr>_________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@mercurial-scm.org" target="_blank">Mercurial-devel@mercurial-scm.<wbr>org</a><br>
<a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/<wbr>mailman/listinfo/mercurial-dev<wbr>el</a><br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>