D371: simplemerge: extract verifytext as a helper function

2017-08-13 Thread phillco (Phil Cohen)
phillco added a comment. This stack isn't particular complicated; it's just that changing simplemerge to go from files to contexts, with small commits and working intermediate commits, requires some jumping around. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/

D379: simplemerge: use context paths for default labels instead of file paths

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is the last place we used the filepath arguments without first using the context version. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercuria

D383: simplemerge: simplify code now that we always write to a context

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY There's no need for an `out` abstraction between files and contexts anymore. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D383 AFFE

D381: simplemerge: stop accepting, and passing, file parameters

2017-08-13 Thread phillco (Phil Cohen)
phillco 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/D381 AFFECTED FILES contrib/simplemerge mercurial/filemerge.py mercurial/simplemerge.py CHANGE DETA

D380: simplemerge: stop reading from, and writing to, files

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We now use contexts first for everything and also pass them everywhere. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D380 AFFECTED

D375: simplemerge: write merge result to the localctx, if passed

2017-08-13 Thread phillco (Phil Cohen)
phillco 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/D375 AFFECTED FILES mercurial/simplemerge.py CHANGE DETAILS diff --git a/mercurial/simplemerge.py b/me

D372: simplemerge: add optional context parameters to simplemerge

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Rename the existing parameters for clarity. These will, in subsequent patches, allow callers to redirect reads (of the three sides of the merge) and writes (o

D382: simplemerge: make context parameters non-optional

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Also update the function docstring. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D382 AFFECTED FILES mercurial/simplemerge.py CH

D378: contrib: make simplemerge script pass context-like objects

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY `simplemerge()` will soon require context-like objects to work. Create a simple context-like object that wraps the requested files and can be passed to the new

D373: filemerge: pass contexts to simplemerge

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Otherwise, this should be a no-op. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D373 AFFECTED FILES mercurial/filemerge.py CHANG

D374: simplemerge: use contexts to read file data from, if passed

2017-08-13 Thread phillco (Phil Cohen)
phillco 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/D374 AFFECTED FILES mercurial/simplemerge.py tests/test-lfconvert.t CHANGE DETAILS diff --git a/test

D376: filemerge: extract `_picklabels` as a helper function

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This shortens `simplemerge()` and is a bit cleaner, IMO. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D376 AFFECTED FILES mercuri

D377: simplemerge: add `filtereddata=False` to simplemerge()

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY In the next patch we'll make this function only take contexts, and also make contrib/simplemerge work by having it pass fake context-like objects. In order fo

D371: simplemerge: extract verifytext as a helper function

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will be used in a subsequent commit. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D371 AFFECTED FILES mercurial/simplemerge.

D21: rebase: rewrite core algorithm (issue5578) (issue5630)

2017-08-13 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > quark wrote in rebase.py:1019 > I concluded that part of the reasons that the old code is messy is because it > uses too many `if`s and relies heavily on the fact that Mercurial has only 2 > parents. So I started with `for` as top-level block

D369: util: add `hgdatetopython` to convert hg-style dates to datetimes

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Extract the existing code from ``datestr``. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D369 AFFECTED FILES mercurial/util.py C

D370: templatefilters: add `reldate` for human-style relative dates

2017-08-13 Thread phillco (Phil Cohen)
phillco created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY e.g., "3 days ago", "6 hours ago", etc. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D370 AFFECTED FILES mercurial/templatefilter

[PATCH] crecord: fixes the formatting of the select status in the status line

2017-08-13 Thread Filip Filmar
# HG changeset patch # User Filip Filmar # Date 1502608633 25200 # Sun Aug 13 00:17:13 2017 -0700 # Node ID 4a5fd64feb902da51e7eb5759f4c1d3966186726 # Parent 03039ff3082b970e70f582e998a7287d1600e912 crecord: fixes the formatting of the select status in the status line The status line in the

Re: [PATCH 3 of 5 RFC] dirstate: make dirstate._join a bit faster on posix

2017-08-13 Thread Yuya Nishihara
On Sat, 12 Aug 2017 01:22:58 -0700, Kostia Balytskyi wrote: > # HG changeset patch > # User Kostia Balytskyi > # Date 1502522493 25200 > # Sat Aug 12 00:21:33 2017 -0700 > # Node ID bac7b1ae4a0c998c57cea5eac51af66853779918 > # Parent a1c8f310a66ada40697c824f4621bb54c757e9fa > dirstate: make

Re: [PATCH 1 of 5 RFC] util: add platform-agnostic absjoin function and some long-paths win utils

2017-08-13 Thread Gregory Szorc
> On Aug 12, 2017, at 01:22, Kostia Balytskyi wrote: > > # HG changeset patch > # User Kostia Balytskyi > # Date 1502481241 25200 > # Fri Aug 11 12:54:01 2017 -0700 > # Node ID 586870aa06799e2ef49a2be4c8feab1464ad54b1 > # Parent 609606d217659e0a6c1cf6f907b6512be5340e57 > util: add platfo

D334: repository: implement generic capability methods on peer class

2017-08-13 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 849. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D334?vs=759&id=849 REVISION DETAIL https://phab.mercurial-scm.org/D334 AFFECTED FILES mercurial/repository.py CHANGE DETAILS diff --git a/mercurial/repository.

D332: repository: formalize peer interface with abstract base class

2017-08-13 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 847. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D332?vs=757&id=847 REVISION DETAIL https://phab.mercurial-scm.org/D332 AFFECTED FILES mercurial/repository.py CHANGE DETAILS diff --git a/mercurial/repository.

D333: repository: formalize wire protocol interface

2017-08-13 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 848. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D333?vs=758&id=848 REVISION DETAIL https://phab.mercurial-scm.org/D333 AFFECTED FILES mercurial/repository.py CHANGE DETAILS diff --git a/mercurial/repository.

D339: tests: verify that peer instances only expose interface members

2017-08-13 Thread indygreg (Gregory Szorc)
indygreg added a comment. In https://phab.mercurial-scm.org/D339#5376, @durin42 wrote: > Might also be neat to have a test to assert the peer and legacy peer interfaces don't overlap? This can be done as a follow-up IMO. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.

D332: repository: formalize peer interface with abstract base class

2017-08-13 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > durin42 wrote in repository.py:29 > Nit: shouldn't this typically be a connection string with any credentials > potentially redacted? I looked at the code and today we're exposing the raw URL, before any redaction. This raw URL is then fed into

D368: releasenotes: add check flag for use of admonitions and its validity

2017-08-13 Thread rishabhmadan96 (Rishabh Madan)
rishabhmadan96 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY While using releasenotes extension, we will be using admonitions in commit messages. The check (-c) flag will look for an admonition within the message. If

D367: releasenotes: add check flag for use of admonitions and its validity

2017-08-13 Thread rishabhmadan96 (Rishabh Madan)
rishabhmadan96 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY While using releasenotes extension, we will be using admonitions in commit messages. The check (-c) flag will look for an admonition within the message. If

D360: log: add a "graphwidth" template variable

2017-08-13 Thread yuja (Yuya Nishihara)
yuja added a comment. > The edge > drawing function needs to know the number of lines in the template output, so > we need to also determine how wide that drawing would be before we call the > edgefn or evaluate the template. Actually `asciiedges()` doesn't need the `lines` to be

D366: phabricator: remove an unnecessary writediffproperties call

2017-08-13 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGf7d6978a4da9: phabricator: remove an unnecessary writediffproperties call (authored by quark). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D366?vs=837&id=844 R

D356: releasenotes: minor bug fix for index error while serializing

2017-08-13 Thread rishabhmadan96 (Rishabh Madan)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG589fda7895da: releasenotes: minor bug fix for index error while serializing (authored by rishabhmadan96). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D356?vs=81

D252: revset: rename bumped into phasedivergent

2017-08-13 Thread yuja (Yuya Nishihara)
yuja added inline comments. INLINE COMMENTS > revset.py:472 > > -Only non-public and non-obsolete changesets can be `bumped`. > +Only non-public and non-obsolete changesets can be `phasedivergent`. > """ Maybe these revset functions should be marked as `(EXPERIMENTAL)`? REPOSITOR