Patchwork D8138: phabricator: add a config knob to create obsolete markers when importing

login
register
mail settings
Submitter phabricator
Date Feb. 21, 2020, 1:10 a.m.
Message ID <differential-rev-PHID-DREV-qpppgihm452ilppnsnlm-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45275/
State Superseded
Headers show

Comments

phabricator - Feb. 21, 2020, 1:10 a.m.
mharbison72 created this revision.
Herald added subscribers: mercurial-devel, Kwan.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This too can get a tristate switch if desired.  But if so, that needs to happen
  by having evolve add the option.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: Kwan, mercurial-devel
phabricator - March 4, 2020, 6:57 p.m.
This revision is now accepted and ready to land.
durin42 added a comment.
durin42 accepted this revision.


  I'm on the fence about this, but overall it seems fine.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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

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

Patch

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -127,6 +127,9 @@ 
 eh.configitem(
     b'phabimport', b'secret', default=False,
 )
+eh.configitem(
+    b'phabimport', b'obsolete', default=False,
+)
 
 colortable = {
     b'phabricator.action.created': b'green',
@@ -1711,6 +1714,8 @@ 
 
     if ui.configbool(b'phabimport', b'secret'):
         opts[b'secret'] = True
+    if ui.configbool(b'phabimport', b'obsolete'):
+        opts[b'obsolete'] = True  # Handled by evolve wrapping tryimportone()
 
     def _write(patches):
         parents = repo[None].parents()