D1376: bundlerepo: don't assume there are only two bundle classes

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY exchange.readbundle() can return a type that represents a stream clone bundle. Explicitly handle the bundle1 type and raise a reasonable error message for unhan

D1375: bundlerepo: add docstring for bundlerepository class

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg 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/D1375 AFFECTED FILES mercurial/bundlerepo.py CHANGE DETAILS diff --git a/mercurial/bundlerepo.py b/me

D1378: bundlerepo: assign bundle attributes in bundle type blocks

2017-11-11 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 bit wonky to assign the same object to multiple attributes and then possibly overwrite them later. Refactor the code to use a local variable and defe

D1379: bundlerepo: rename _bundle to _cgunpacker

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY _bundle is really a changegroup unpacker instance. Rename the variable accordingly. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/

D1377: bundlerepo: make bundle and bundlefile attributes private

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These attributes are implementation details and shouldn't be exposed outside the class. .. api:: bundlerepo.bundlerepository.bundle and bundlerepo

D1374: bundlerepo: rename arguments to bundlerepository.__init__

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY To reflect what they actually are. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1374 AFFECTED FILES mercurial/bundlerepo.py CH

D1372: bundlerepo: make methods agree with base class

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY My editor was complaining about mismatches between method signatures. For methods that are implemented, we change arguments to match the base. For those th

D1373: bundlerepo: use suffix variable

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It looks like the refactor in https://phab.mercurial-scm.org/rHG702a26fec3e2e85f05af3ebeaf0fc037027ad2b6 attempted to establish this method argument but failed

D1370: bundle2: use os.SEEK_* constants

2017-11-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Constants make code easier to read than magic numbers. I also threw in an explicit argument in a caller to further increase code comprehension. REPOSITORY

D1336: remove: print message for each file in verbose mode only while using `-A`

2017-11-11 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. Looks good to me, thanks. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1336 To: pavanpc, #hg-reviewers Cc: mitrandir, mharbison72, mercurial-devel ___ Mercurial-devel mailing list Mercuri

D1336: remove: print message for each file in verbose mode only while using `-A`

2017-11-11 Thread pavanpc (Pavan Kumar PC)
pavanpc updated this revision to Diff 3424. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1336?vs=3423&id=3424 REVISION DETAIL https://phab.mercurial-scm.org/D1336 AFFECTED FILES mercurial/cmdutil.py tests/test-remove.t CHANGE DETAILS diff --git

[PATCH 4 of 4 STABLE] dispatch: abort if early boolean options can't be parsed

2017-11-11 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1510376561 -32400 # Sat Nov 11 14:02:41 2017 +0900 # Branch stable # Node ID a8d8c3229692d77881a6242329160803cb5ab8c5 # Parent ed13a7f6d26a28f73593a091a6a57c756678245b dispatch: abort if early boolean options can't be parsed Perhaps we'll ne

[PATCH 2 of 4 STABLE] dispatch: extract stub function to peek boolean command option

2017-11-11 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1510320159 -32400 # Fri Nov 10 22:22:39 2017 +0900 # Branch stable # Node ID e8c581ae8e8835cf7fc83e749a84919aea11f63a # Parent ffd80f114a5568161658da273af2942f471e05bc dispatch: extract stub function to peek boolean command option We should

[PATCH 3 of 4 STABLE] dispatch: stop parsing of early boolean option at "--"

2017-11-11 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1510320446 -32400 # Fri Nov 10 22:27:26 2017 +0900 # Branch stable # Node ID ed13a7f6d26a28f73593a091a6a57c756678245b # Parent e8c581ae8e8835cf7fc83e749a84919aea11f63a dispatch: stop parsing of early boolean option at "--" diff --git a/mercu

[PATCH 1 of 4 STABLE] dispatch: do not drop unpaired argument at _earlygetopt()

2017-11-11 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1510369759 -32400 # Sat Nov 11 12:09:19 2017 +0900 # Branch stable # Node ID ffd80f114a5568161658da273af2942f471e05bc # Parent 691524f0bbf6cd44fc26ebfce046e6c4888a1b0f dispatch: do not drop unpaired argument at _earlygetopt() Before, "hg log

D1336: remove: print message for each file in verbose mode only while using `-A`

2017-11-11 Thread pavanpc (Pavan Kumar PC)
pavanpc updated this revision to Diff 3423. pavanpc marked an inline comment as done. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1336?vs=3391&id=3423 REVISION DETAIL https://phab.mercurial-scm.org/D1336 AFFECTED FILES mercurial/cmdutil.py tests/

D971: uncommit: unify functions _uncommitdirstate and _unamenddirstate to one

2017-11-11 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 3422. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D971?vs=2494&id=3422 REVISION DETAIL https://phab.mercurial-scm.org/D971 AFFECTED FILES hgext/uncommit.py CHANGE DETAILS diff --git a/hgext/uncommit.py b/hgext/

D821: unamend: move fb extension unamend to core

2017-11-11 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 3421. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D821?vs=2493&id=3421 REVISION DETAIL https://phab.mercurial-scm.org/D821 AFFECTED FILES hgext/uncommit.py tests/test-unamend.t CHANGE DETAILS diff --git a/tes

D1348: histedit: add support to output nodechanges using formatter

2017-11-11 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 3420. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1348?vs=3349&id=3420 REVISION DETAIL https://phab.mercurial-scm.org/D1348 AFFECTED FILES hgext/histedit.py tests/test-histedit-templates.t CHANGE DETAILS dif

D1341: dirstate: move management of nonnormal sets into dirstate map

2017-11-11 Thread mbthomas (Mark Thomas)
mbthomas added inline comments. INLINE COMMENTS > mbolin wrote in dirstate.py:1247 > I would prefer to see all mutations to `self._map` go through a common code > path so that we can override this behavior easier in Eden. > > As it stands, when this logic is conflated, it makes it much harder f

D1340: dirstate: add explicit methods for modifying dirstate

2017-11-11 Thread mbthomas (Mark Thomas)
mbthomas added inline comments. INLINE COMMENTS > mbolin wrote in dirstate.py:1275 > To avoid doing two lookups in `self._map`: > > try: > self._map.pop(f) > return True > except KeyError: > return False Good idea. I think `return self._map.pop(f, None) is not None` would

D1340: dirstate: add explicit methods for modifying dirstate

2017-11-11 Thread mbthomas (Mark Thomas)
mbthomas added inline comments. INLINE COMMENTS > durin42 wrote in dirstate.py:1196 > Per my comment above, let's insert a patch before this one that documents in > more detail the API that dirstatemap is supposed to be providing, probably in > a docstring on this class. Sound reasonable? > >

[PATCH 2 of 3 hglib] util: make cmdbuilder() robust for faulty parsing of early options

2017-11-11 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1510397568 -32400 # Sat Nov 11 19:52:48 2017 +0900 # Node ID cd73c3ee469e22216fbb9116701eed7059c1833c # Parent 519dfa937de37d1441e2a39da76d700c7099b0c7 util: make cmdbuilder() robust for faulty parsing of early options Also fixed handling of

[PATCH 3 of 3 hglib] client: make it robust for weird repository path

2017-11-11 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1510400155 -32400 # Sat Nov 11 20:35:55 2017 +0900 # Node ID 56b442f108be3ef960a60805e10ccda003e96bfb # Parent cd73c3ee469e22216fbb9116701eed7059c1833c client: make it robust for weird repository path diff --git a/hglib/client.py b/hglib/cli

[PATCH 1 of 3 hglib] client: do not append an option to a list of arguments

2017-11-11 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1510399286 -32400 # Sat Nov 11 20:21:26 2017 +0900 # Node ID 519dfa937de37d1441e2a39da76d700c7099b0c7 # Parent 5f3e6f1a7e68298e21f893683c5b5d3f634c2c30 client: do not append an option to a list of arguments It wouldn't work if args are termi

Re: [PATCH 2 of 2] tests: use jshint when available to check .js files

2017-11-11 Thread Denis Laxalde
LGTM. Anton Shestakov a écrit : # HG changeset patch # User Anton Shestakov # Date 1510384041 -28800 # Sat Nov 11 15:07:21 2017 +0800 # Node ID 42809ebcbc783e0d27385c6ea1e1731df44a4f4e # Parent 36e26161d81233a8ef18e40b4198d86b23113159 tests: use jshint when available to check .js files d