hgext/phabricator.py
changeset 41163 0101a35deae2
parent 41083 9d35ae3d9999
child 41164 43fd1947301d
--- a/hgext/phabricator.py	Thu Jan 10 04:35:48 2019 +0100
+++ b/hgext/phabricator.py	Sat Jan 05 15:20:33 2019 -0500
@@ -59,6 +59,7 @@
     obsutil,
     parser,
     patch,
+    phases,
     registrar,
     scmutil,
     smartset,
@@ -584,6 +585,10 @@
                 newdesc = encoding.unitolocal(newdesc)
                 # Make sure commit message contain "Differential Revision"
                 if old.description() != newdesc:
+                    if old.phase() == phases.public:
+                        ui.warn(_("warning: not updating public commit %s\n")
+                                % scmutil.formatchangeid(old))
+                        continue
                     parents = [
                         mapping.get(old.p1().node(), (old.p1(),))[0],
                         mapping.get(old.p2().node(), (old.p2(),))[0],