D6835: phabricator: don't abort if property writing fails during amending

Kwan (Ian Moody) phabricator at mercurial-scm.org
Mon Sep 9 17:21:38 EDT 2019


Closed by commit rHG0a7e60f50dd4: phabricator: don't abort if property writing fails during amending (authored by Kwan).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6835?vs=16472&id=16473

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6835/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6835

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -659,7 +659,12 @@
 
                     mapping[old.node()] = [newnode]
                     # Update diff property
-                    writediffproperties(unfi[newnode], diffmap[old.node()])
+                    # If it fails just warn and keep going, otherwise the DREV
+                    # associations will be lost
+                    try:
+                        writediffproperties(unfi[newnode], diffmap[old.node()])
+                    except util.urlerr.urlerror:
+                        ui.warn(b'Failed to update metadata for D%s\n' % drevid)
                 # Remove local tags since it's no longer necessary
                 tagname = b'D%d' % drevid
                 if tagname in repo.tags():



To: Kwan, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list