[Bug 5958] New: A case that "shouldn't happen" can happen relatively easily

2018-08-13 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=5958 Bug ID: 5958 Summary: A case that "shouldn't happen" can happen relatively easily Product: Mercurial Version: unspecified Hardware: PC OS: Linux

D4280: perf: time loading branchmap caches

2018-08-13 Thread mjpieters (Martijn Pieters)
mjpieters 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/D4280 AFFECTED FILES contrib/perf.py CHANGE DETAILS diff --git a/contrib/perf.py b/contrib/perf.py

D4281: branchmap: load branchmap as an iterable

2018-08-13 Thread mjpieters (Martijn Pieters)
mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This avoids reading all the file into memory if the cache turns out to be invalid. REPOSITORY rHG Mercurial REVISION DETAIL

D4264: zsh_completion: declare appropriate local parameters for ->string form

2018-08-13 Thread spectral (Kyle Lippincott)
spectral accepted this revision. spectral added a comment. I don't understand this aspect super well, I admit I haven't read the docs you linked to, but I can see why this would be more correct :) REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4264 To: av6,

D4267: zsh_completion: update all options

2018-08-13 Thread spectral (Kyle Lippincott)
spectral accepted this revision. spectral added inline comments. INLINE COMMENTS > zsh_completion:373 > # Common options > _hg_global_opts=( > +'(--repository -R)'{-R+,--repository=}'[repository root directory or > name of overlay bundle file]:repository:_files -/' I wonder how hard it

D4261: zsh_completion: rename _hg_style_opts to _hg_template_opts

2018-08-13 Thread spectral (Kyle Lippincott)
spectral accepted this revision. spectral added a comment. (Like the description says, this hides --style in tab completion. I think this is an improvement). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4261 To: av6, #hg-reviewers, spectral Cc: spectral,

D4262: zsh_completion: drop -w, add -S to _arguments

2018-08-13 Thread spectral (Kyle Lippincott)
spectral added a comment. In https://phab.mercurial-scm.org/D4262#65777, @av6 wrote: > Thanks, `‘` and `’`, for making it difficult to phabsend this. I had to > > diff --git a/contrib/phabricator.py b/contrib/phabricator.py > --- a/contrib/phabricator.py > +++

Re: [PATCH] byteify-strings: prevent "__name__ == '__main__'" from being transformed

2018-08-13 Thread Augie Fackler
> On Aug 12, 2018, at 1:10 AM, Yuya Nishihara wrote: > > # HG changeset patch > # User Yuya Nishihara > # Date 1534050202 -32400 > # Sun Aug 12 14:03:22 2018 +0900 > # Node ID 6ee5e64e124c87b356874367dbf6355707d00883 > # Parent 1c137e0a33afe4d7e61325513d2518af8b93434a > byteify-strings:

Re: [PATCH 5 of 5] mail: convert encoding.encoding to sysstr

2018-08-13 Thread Augie Fackler
> On Aug 11, 2018, at 11:27 PM, Yuya Nishihara wrote: > > # HG changeset patch > # User Yuya Nishihara > # Date 1534043768 -32400 > # Sun Aug 12 12:16:08 2018 +0900 > # Node ID 1c137e0a33afe4d7e61325513d2518af8b93434a > # Parent a160d88772ff1da51160faa5cfdbd7ecdbcd07fa > mail: convert

D4271: changegroup: rename mfs to manifests

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY In the name of readability. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4271 AFFECTED FILES mercurial/changegroup.py CHANGE

D4274: manifest: remove addgroup() from manifestlog and imanifestlog

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY addgroup() is part of the storage interface for manifests. Unfortunately, we don't yet have a formal storage interface for manifests. (One will be established

D4272: changegroup: change topics during generation

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Changegroup generation and consumption currently uses different sets of topics. Generation uses "bundling" and consumption uses the name of the thing being

D4273: repository: clarify role of imanifestlog

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Looking at the implementation of manifest.manifestlog, it is highly tailored towards servicing the root manifest. So clarify that in the interface docstring.

D4269: changegroup: call rev() on manifestlog instance

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY rev() is part of the imanifestlog interface and should be used instead of using the private revlog instance, which is an implementation detail. REPOSITORY

D4279: manifest: use rev() instead of nodemap.__contains__

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY nodemap is an implementation detail of revlogs and isn't appropriate to expose on the manifest storage API. While revlogs don't have a __contains__, they do

D4276: manifest: rename dir argument and attribute to tree

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY dir shadows a built-in. We use it throughout the manifest code, which is unfortunate. This commit updates just manifestrevlog to be more well behaved.

D4275: manifest: set appropriate cache entry when clearing _dirlogcache()

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY manifestrevlog applies to any manifest, not just the root manifest. Resetting the cache and populating its root entry with self is not correct when the

D4278: manifest: rename manifestlog._treeinmem to ._treemanifests

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Not sure what "inmem" was supposed to indicate. This object is an interface to manifest data on disk as well as "in memory" (assuming that's what "inmem"

D4277: manifest: add getstorage() to manifestlog and use it globally

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It is a common pattern to obtain a directory manifest storage instance (a manifestrevlog) by going through manifestlog._revlog.dirlog(). Why access to

D4270: changegroup: clean up changelog callback

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY changelog.read() calls changelog.changelogrevion() then turns it into a tuple. Let's call changelogrevision() directly and used named attributes to make code

D4268: manifest: rename dir to tree to avoid shadowing built-in

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY And update the argument name in the imanifestlog interface. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4268 AFFECTED FILES

D4267: zsh_completion: update all options

2018-08-13 Thread av6 (Anton Shestakov)
av6 added inline comments. INLINE COMMENTS > spectral wrote in zsh_completion:644 > I assume the first section here makes continue and abort mutually exclusive? > I believe that revision arguments are also forbidden if either --continue or > --abort are specified; I don't know if there's a