diff hgext/phabricator.py @ 44718:0680b8a1992a

phabricator: avoid creating unstable children within the review stack The instability occurred when rebasing something that has already been submitted onto something that hasn't, and then resubmitting the stack. Or as the test shows, just resubmitting and including something earlier that wasn't previously submitted. There's a general case here where any children (not just the ones in the range of commits posted for review) should be re-stabilized. But handling the selected commits here will cause the `local:commit` node values that are tracked on Phabricator to be properly kept in sync. Differential Revision: https://phab.mercurial-scm.org/D8436
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 03 Mar 2020 17:37:09 -0500
parents 3dc6a70779f2
children c482e2fe444c
line wrap: on
line diff
--- a/hgext/phabricator.py	Wed Apr 08 17:30:10 2020 -0400
+++ b/hgext/phabricator.py	Tue Mar 03 17:37:09 2020 -0500
@@ -1468,7 +1468,11 @@
 
                 newdesc = get_amended_desc(drev, old, fold)
                 # Make sure commit message contain "Differential Revision"
-                if old.description() != newdesc:
+                if (
+                    old.description() != newdesc
+                    or old.p1().node() in mapping
+                    or old.p2().node() in mapping
+                ):
                     if old.phase() == phases.public:
                         ui.warn(
                             _(b"warning: not updating public commit %s\n")