D451: revset: remove order information from tree

quark (Jun Wu) phabricator at mercurial-scm.org
Tue Aug 22 14:15:23 EDT 2017


quark added a comment.


  Interestingly, I checked some well known 3rd-party extensions:
  
  hgsubversion:
  
  - svnrev() uses "x for x in myset if x in subset" therefore enforces "defineorder" and wrong.
  - fromsvn() is also wrong similarly.
  
  hg-git:
  
  - fromgit(), gitnode(): happened to be "followorder" since it uses `x for x in subset if ...`
  
  mutable-history:
  
  - troubled(), suspended(), precursors(), ...: all of them use "subset &" , therefore enforces "followorder"
  
  remotenames:
  
  - remotenames(): uses "subset &" pattern
  - upstream(): uses "smartset.filteredset(subset, ...)", which could be changed to "subset.filter(...)"
  - pushed(): same as upstream()
  
  So there are only 2 users (upstream() and pushed()) which can benefit from "subset.filter(...)". All of the remaining cases could benefit from the simpler API and do not take the "subset" argument.

REPOSITORY
  rHG Mercurial

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

To: quark, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list