Patchwork D2193: narrowwirepeer: rename expandnarrow capability to exp-expandnarrow

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 8:03 p.m.
Message ID <differential-rev-PHID-DREV-vqwrtgvfu36egdfwwuex-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27686/
State Superseded
Headers show

Comments

phabricator - Feb. 12, 2018, 8:03 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The expandnarrow functionality lets a client have a shorthand (for
  Google it's a reference to a checked-in file) for a set of includes
  and excludes. For testing we should probably implement a simple
  version of that functionality here. For now, rename the capability so
  we don't burn the good name in the future if we need to change
  behavior.
  
  It's plausible that this functionality should be dropped from the
  narrowhg we ship long-term, but I'm dubious as it seems pretty likely
  other organizations will want similar shorthands for commonly-used
  subsets of their trees.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/narrow/narrowwirepeer.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/narrow/narrowwirepeer.py b/hgext/narrow/narrowwirepeer.py
--- a/hgext/narrow/narrowwirepeer.py
+++ b/hgext/narrow/narrowwirepeer.py
@@ -24,7 +24,7 @@ 
         class expandingpeer(peer.__class__):
             def expandnarrow(self, narrow_include, narrow_exclude, nodes):
                 ui.status(_("expanding narrowspec\n"))
-                if not self.capable('expandnarrow'):
+                if not self.capable('exp-expandnarrow'):
                     raise error.Abort(
                         'peer does not support expanding narrowspecs')