D6369: templatekw: get file_{adds, mods, dels} directly from context (issue4292)

2019-05-11 Thread yuja (Yuya Nishihara)
yuja added a comment. > This redefines the template keywords by getting the lists from the > recently introduced context methods instead of getting them from > status compared to p1. A mentioned before, these are better defined on > merge commits. The total number of files from

Re: D6369: templatekw: get file_{adds, mods, dels} directly from context (issue4292)

2019-05-11 Thread Yuya Nishihara
> This redefines the template keywords by getting the lists from the > recently introduced context methods instead of getting them from > status compared to p1. A mentioned before, these are better defined on > merge commits. The total number of files from the three lists now > always

D6367: context: add modified(), added(), removed() to changectx too

2019-05-11 Thread yuja (Yuya Nishihara)
yuja added a comment. > +def modified(self): > +modified = set(self.files()) > +modified.difference_update(self.added()) > +modified.difference_update(self.removed()) > +return sorted(modified) > +def added(self): > +added = []

Re: D6367: context: add modified(), added(), removed() to changectx too

2019-05-11 Thread Yuya Nishihara
> +def modified(self): > +modified = set(self.files()) > +modified.difference_update(self.added()) > +modified.difference_update(self.removed()) > +return sorted(modified) > +def added(self): > +added = [] > +for f in self.files(): > +

D6371: record: avoid modifying the matcher passed as a method parameter

2019-05-11 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY No problem observed, but I remember the previous pattern causing problems with largefiles and/or subrepos. This special matcher was added in

D5299: phabricator: fallback reading arcanist config files

2019-05-11 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > Kwan wrote in phabricator.py:201 > I think you could do > > url = util.url(conduit_uri) > url.path = None > url = b'%s' % url > > Also I think you need to check for `phabricator.uri` first, then fall back to > `conduit_uri`, see change to

Re: [PATCH] histedit: make actions toggleables

2019-05-11 Thread Anton Shestakov
On Fri, 10 May 2019 10:15:31 -0700 Yu Feng wrote: > # HG changeset patch > # User f...@google.com > # Date 1557508115 25200 > # Fri May 10 10:08:35 2019 -0700 > # Node ID 23bc04dc2d149829133db571f6a922e95843c9f9 > # Parent 458dc948aff9f1217718b7679f890fea510d54f7 > histedit: make actions

D6369: templatekw: get file_{adds, mods, dels} directly from context (issue4292)

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This redefines the template keywords by getting the lists from the recently introduced context methods instead of getting them from status compared to p1. A

D6370: templatekw: move showfileadds() close to showfile{mods, dels}()

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6370 AFFECTED FILES mercurial/templatekw.py CHANGE DETAILS diff --git a/mercurial/templatekw.py

D6367: context: add modified(), added(), removed() to changectx too

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY committablectx already has these, so it seems reasonable for changectx to also have them. I have considered storing these sets in the changeset extras in

D6368: tests: add test for {file_mods}, {file_adds}, {file_dels} on merge commit

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6368 AFFECTED FILES tests/test-template-keywords.t CHANGE DETAILS diff --git

D6365: context: move contents of committablectx.markcommitted() to workingctx

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Same reasoning as previous commits: this function updates the dirstate. By not updating the dirstate here, we also fix the close-head test. REPOSITORY rHG

D6366: context: let caller pass in branch to committablectx.__init__()

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY committablectx.__init__() currently looks up the branch from the dirstate unless it's passed in the extras. memctx.__init__() has a branch argument, but

D6363: context: move walk() and match() overrides from committablectx to workingctx

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Same reasoning as previous commit: these functions update the dirstate. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6363

D6364: tests: demonstrate that close-head command updates working copy

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The help text for the command says "...it doesn't change the working directory", so I don't think this is intentional. REPOSITORY rHG Mercurial REVISION

D6362: context: move flags overrides from committablectx to workingctx

2019-05-11 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These read from the dirstate, so they shouldn't be used in other subclasses. REPOSITORY rHG Mercurial REVISION DETAIL