D4123: resolve: organize 'if confirm' conditionals

2018-08-05 Thread khanchi97 (Sushil khanchi)
khanchi97 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/D4123 AFFECTED FILES mercurial/commands.py CHANGE DETAILS diff --git a/mercurial/commands.py

D4102: resolve: support confirm config option with --unmark flag

2018-08-05 Thread khanchi97 (Sushil khanchi)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGf35f6791595f: resolve: support confirm config option with --unmark flag (authored by khanchi97, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4103: resolve: update commands.resolve.confirm help text

2018-08-05 Thread khanchi97 (Sushil khanchi)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG755741c39230: resolve: update commands.resolve.confirm help text (authored by khanchi97, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D4103?vs=9906=9939#toc REPOSITORY rHG

D4102: resolve: support confirm config option with --unmark flag

2018-08-05 Thread pulkit (Pulkit Goyal)
pulkit added a comment. Please add about this config option in the releasenotes page for 4.8 at https://www.mercurial-scm.org/wiki/Release4.8. INLINE COMMENTS > commands.py:4537 > > if all and confirm: > if ui.promptchoice(_(b're-merge all unresolved files (yn)?' This one

D4103: resolve: update commands.resolve.confirm help text

2018-08-05 Thread pulkit (Pulkit Goyal)
pulkit accepted this revision. pulkit added a comment. Updated the commit message in flight to follow the updated version of patch. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4103 To: khanchi97, #hg-reviewers, pulkit Cc: pulkit, mercurial-devel

D4102: resolve: support confirm config option with --unmark flag

2018-08-05 Thread pulkit (Pulkit Goyal)
pulkit accepted this revision. pulkit added inline comments. INLINE COMMENTS > khanchi97 wrote in commands.py:4555 > Oops, sorry. You should not be sorry! REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4102 To: khanchi97, #hg-reviewers, pulkit Cc: pulkit,

D3976: grep: add MULTIREV support to --allfiles flag

2018-08-05 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9937. sangeet259 edited the summary of this revision. sangeet259 retitled this revision from "grep: add MULTIREV support to --all-files flag" to "grep: add MULTIREV support to --allfiles flag". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4122: localrepo: better error when a repo exists but we lack permissions

2018-08-05 Thread valentin.gatienbaron (Valentin Gatien-Baron)
valentin.gatienbaron created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Claiming "repository foo not found" when the repository does exist causes confusion regularly ("where is the typo?"). REPOSITORY rHG Mercurial

[PATCH 7 of 7] fileset: narrow status computation by left-hand-side of 'and' node

2018-08-05 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1532256530 -32400 # Sun Jul 22 19:48:50 2018 +0900 # Node ID 9694afb6b7a1f3822003f6a8055d6cfb8b7892f2 # Parent e8bfa8f38e3bf8739f6e1bbe8fe742cf0e1fe7f5 fileset: narrow status computation by left-hand-side of 'and' node Timing with warm disk

[PATCH 2 of 7] fileset: keep basectx by matchctx

2018-08-05 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1532224712 -32400 # Sun Jul 22 10:58:32 2018 +0900 # Node ID 733735d06e41efd01c7d21def2a9c00f465ad637 # Parent a3523d37efa3421b6593a920b25ef1e6680ac990 fileset: keep basectx by matchctx diff --git a/mercurial/fileset.py

[PATCH 4 of 7] fileset: insert hints where status should be computed

2018-08-05 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1532172473 -32400 # Sat Jul 21 20:27:53 2018 +0900 # Node ID 3d3578872b9430d0e6681f1fae09c6f2901b1362 # Parent 8cec7522133a5d5a7b4f6d04fd3a729dcfaac67a fileset: insert hints where status should be computed This will allow us to compute

[PATCH 1 of 7] fileset: pass in basectx to _buildstatus()

2018-08-05 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1532224538 -32400 # Sun Jul 22 10:55:38 2018 +0900 # Node ID a3523d37efa3421b6593a920b25ef1e6680ac990 # Parent 7e75777e4a5136685c2a28de899bac96c31877da fileset: pass in basectx to _buildstatus() I'll make matchctx remember both ctx and

[PATCH 3 of 7] fileset: move buildstatus() to matchctx method

2018-08-05 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1532225575 -32400 # Sun Jul 22 11:12:55 2018 +0900 # Node ID 8cec7522133a5d5a7b4f6d04fd3a729dcfaac67a # Parent 733735d06e41efd01c7d21def2a9c00f465ad637 fileset: move buildstatus() to matchctx method In future patches, file status will be

[PATCH 5 of 7] fileset: build status according to 'withstatus' hint

2018-08-05 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1532226048 -32400 # Sun Jul 22 11:20:48 2018 +0900 # Node ID 734e80c5942b88ff437e14f16a4eaa051fbb1e9b # Parent 3d3578872b9430d0e6681f1fae09c6f2901b1362 fileset: build status according to 'withstatus' hint _switchcallers is no longer needed

[PATCH 6 of 7] fileset: move copy constructor of matchctx near __init__

2018-08-05 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1532256237 -32400 # Sun Jul 22 19:43:57 2018 +0900 # Node ID e8bfa8f38e3bf8739f6e1bbe8fe742cf0e1fe7f5 # Parent 734e80c5942b88ff437e14f16a4eaa051fbb1e9b fileset: move copy constructor of matchctx near __init__ diff --git

D4121: resolve: correct behavior of mark-check=none to match docs

2018-08-05 Thread spectral (Kyle Lippincott)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG7e75777e4a51: resolve: correct behavior of mark-check=none to match docs (authored by spectral, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4099: narrow: move .hg/narrowspec to .hg/store/narrowspec (BC)

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG576eef1ab43d: narrow: move .hg/narrowspec to .hg/store/narrowspec (BC) (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4096: narrow: call narrowspec.{save,restore,clear}backup directly

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGad24b581e4d9: narrow: call narrowspec.{save,restore,clear}backup directly (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4106: index: don't add 1 to length variables

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0db50770f388: index: dont add 1 to length variables (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4106?vs=9909=9930

D4098: narrow: drop checkambig=True when restoring backup

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG204e074c188e: narrow: drop checkambig=True when restoring backup (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4104: index: return False for "len(index) in index"

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGaa33988ad8ab: index: return False for len(index) in index (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4097: narrow: remove a repo file-cache invalidation

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGae2962bb56a3: narrow: remove a repo file-cache invalidation (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4105: index: drop support for nullid at position len(index) in index_node

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG4c0fd3f0a15d: index: drop support for nullid at position len(index) in index_node (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

Re: D4099: narrow: move .hg/narrowspec to .hg/store/narrowspec (BC)

2018-08-05 Thread Yuya Nishihara
Queued, thanks. > def savebackup(repo, backupname): > if repository.NARROW_REQUIREMENT not in repo.requirements: > return > vfs = repo.vfs > vfs.tryunlink(backupname) > -util.copyfile(vfs.join(FILENAME), vfs.join(backupname), hardlink=True) > +

D4099: narrow: move .hg/narrowspec to .hg/store/narrowspec (BC)

2018-08-05 Thread yuja (Yuya Nishihara)
yuja added a comment. Queued, thanks. > def savebackup(repo, backupname): > if repository.NARROW_REQUIREMENT not in repo.requirements: > return > vfs = repo.vfs > vfs.tryunlink(backupname) > > - util.copyfile(vfs.join(FILENAME),

D4071: resolve: graduate resolve.mark-check from experimental, add docs

2018-08-05 Thread spectral (Kyle Lippincott)
spectral marked an inline comment as done. spectral added inline comments. INLINE COMMENTS > martinvonz wrote in configitems.py:197 > Unrelated to this patch, but should the default be `'none`` as the > documentation says? It also looks like the code doesn't handle that value.

D4121: resolve: correct behavior of mark-check=none to match docs

2018-08-05 Thread spectral (Kyle Lippincott)
spectral 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/D4121 AFFECTED FILES mercurial/commands.py mercurial/configitems.py tests/test-resolve.t CHANGE

D4119: index: move raise_revlog_error() further up

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 9925. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4119?vs=9922=9925 REVISION DETAIL https://phab.mercurial-scm.org/D4119 AFFECTED FILES mercurial/cext/revlog.c CHANGE DETAILS diff --git

D4118: index: make node tree a Python object

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 9924. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4118?vs=9921=9924 REVISION DETAIL https://phab.mercurial-scm.org/D4118 AFFECTED FILES mercurial/cext/revlog.c CHANGE DETAILS diff --git

D4120: shortest: use nodetree for finding shortest node within revset

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 9926. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4120?vs=9923=9926 REVISION DETAIL https://phab.mercurial-scm.org/D4120 AFFECTED FILES mercurial/cext/revlog.c mercurial/scmutil.py CHANGE DETAILS diff

D4120: shortest: use nodetree for finding shortest node within revset

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This speeds up `hg log -T '{shortest(node,1)}\n'` in my repo from 12s to 4.5s. That's very close to the 4.1s it takes without the disambiguation revset

D4119: index: move raise_revlog_error() further up

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I will add another caller below it. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4119 AFFECTED FILES mercurial/cext/revlog.c

D4112: index: add pointer from nodetree back to index

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is always a cycle right now, but it will not be for the nodetree instances I'm planning to add later (see earlier patch). REPOSITORY rHG Mercurial

D4118: index: make node tree a Python object

2018-08-05 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/D4118 AFFECTED FILES mercurial/cext/revlog.c CHANGE DETAILS diff --git a/mercurial/cext/revlog.c

D4111: index: pass only nodetree to nt_new()

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The function now only depends on the nodetree, not the index. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4111 AFFECTED FILES

D4116: index: move all "nt_*" functions to one place

2018-08-05 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/D4116 AFFECTED FILES mercurial/cext/revlog.c CHANGE DETAILS diff --git a/mercurial/cext/revlog.c

D4113: index: make most "nt_*" functions take a nodetree

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that the nodetree has a pointer to the index, we can pass the nodtree instead of the index. There are few "nt_*" functions left after this. I'll deal

D4114: index: split up nt_init() in two

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I'd like to make nt_init() take a pointer to a nodetree to initialize, but it currently also allocates the nodetree. This patch prepares for that change by

D4115: index: rename "nt_*(indexObject *self, ...)" functions to "index_*"

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These functions do something with the nodetree, but they're less generic and won't make sense as methods on the nodetree when it becomes a Python type.

D4117: index: move index_clearcaches() further down

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I want to add a call from it to a new function (nt_dealloc) that will be inserted below its current position. REPOSITORY rHG Mercurial REVISION DETAIL

D4109: index: move more fields onto nodetree type

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The fields moves are the ones that are not related to how the nodetree is used in the index and that will make sense for the new nodetree instance for a

D4110: index: drop now-redundant "nt" prefix of fields in nodetree struct

2018-08-05 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/D4110 AFFECTED FILES mercurial/cext/revlog.c CHANGE DETAILS diff --git a/mercurial/cext/revlog.c

D4108: index: extract a type for the nodetree

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is a first step towards exposing the nodetree as a Python type. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4108

D4107: index: make "nt_*" functions work on an initialized nodetree

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I want to be able to reuse these functions with another nodetree instance later (for disambiguating node prefix within a revset). That other nodetree

D4104: index: return False for "len(index) in index"

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Since we no longer accept index[len(index)], we should clearly make "len(index) in index" return False. This should have been part of

D4106: index: don't add 1 to length variables

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY A lot of "+ 1" and "-1" were mechanically added to ease the transition in https://phab.mercurial-scm.org/rHG781b2720d2ac005e2806b46d8cb91abacfe4b901 (index:

D4105: index: drop support for nullid at position len(index) in index_node

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I think no callers exist since at least https://phab.mercurial-scm.org/rHGa3dacabd476b6bed04932b08962d7aa2fd2fad41 (index: don't allow index[len(index)] to

D4071: resolve: graduate resolve.mark-check from experimental, add docs

2018-08-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > configitems.py:197 > +coreconfigitem('commands', 'resolve.mark-check', > +default=None, > +) Unrelated to this patch, but should the default be `'none`` as the documentation says? It also looks like the code doesn't handle that value.