D517: journal: do not use atomictemp

2017-08-24 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Writing journal files using `atomictemp` leads to quadratic performance. Other logs like blackbox does not use atomictemp, and journal logs are not critical for

D515: phabricator: standardize colors

2017-08-24 Thread quark (Jun Wu)
quark marked an inline comment as done. quark added inline comments. INLINE COMMENTS > indygreg wrote in phabricator.py:444 > I suspect Python 3 won't be happy with this. You probably want `bytes()`. Good to know `bytes` could be used here! REPOSITORY rHG Mercurial REVISION DETAIL

D514: phabsend: show associated Differential Revisions with --confirm

2017-08-24 Thread quark (Jun Wu)
quark updated this revision to Diff 1279. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D514?vs=1275=1279 REVISION DETAIL https://phab.mercurial-scm.org/D514 AFFECTED FILES contrib/phabricator.py CHANGE DETAILS diff --git a/contrib/phabricator.py

D515: phabricator: standardize colors

2017-08-24 Thread quark (Jun Wu)
quark updated this revision to Diff 1280. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D515?vs=1272=1280 REVISION DETAIL https://phab.mercurial-scm.org/D515 AFFECTED FILES contrib/phabricator.py CHANGE DETAILS diff --git a/contrib/phabricator.py

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

2017-08-24 Thread phillco (Phil Cohen)
phillco updated this revision to Diff 1278. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D381?vs=1220=1278 REVISION DETAIL https://phab.mercurial-scm.org/D381 AFFECTED FILES contrib/simplemerge mercurial/filemerge.py mercurial/simplemerge.py

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

2017-08-24 Thread phillco (Phil Cohen)
phillco updated this revision to Diff 1277. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D378?vs=1038=1277 REVISION DETAIL https://phab.mercurial-scm.org/D378 AFFECTED FILES contrib/simplemerge CHANGE DETAILS diff --git a/contrib/simplemerge

D470: rebase: sort destmap topologically

2017-08-24 Thread quark (Jun Wu)
quark updated this revision to Diff 1276. quark edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D470?vs=1149=1276 REVISION DETAIL https://phab.mercurial-scm.org/D470 AFFECTED FILES hgext/rebase.py

D513: phabsend: print the actual URL with --confirm

2017-08-24 Thread quark (Jun Wu)
quark updated this revision to Diff 1274. This revision is now accepted and ready to land. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D513?vs=1270=1274 REVISION DETAIL https://phab.mercurial-scm.org/D513 AFFECTED FILES contrib/phabricator.py

D514: phabsend: show associated Differential Revisions with --confirm

2017-08-24 Thread quark (Jun Wu)
quark updated this revision to Diff 1275. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D514?vs=1271=1275 REVISION DETAIL https://phab.mercurial-scm.org/D514 AFFECTED FILES contrib/phabricator.py CHANGE DETAILS diff --git a/contrib/phabricator.py

D513: phabsend: print the actual URL with --confirm

2017-08-24 Thread quark (Jun Wu)
quark planned changes to this revision. quark added inline comments. INLINE COMMENTS > phabricator.py:486 > +if ui.promptchoice(_('Send the above changes to %s (yn)?' > + '$$ $$ ') % url): > return False A wrong stack editing. I'll move `url` from another

D511: phabsend: make --amend the default

2017-08-24 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. I suspect most Mercurial developers are using evolve. So this seems reasonable. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D511 To: quark,

D516: pull: do not prompt "hg update" if update.requiredest is set

2017-08-24 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, after pull, we show: (run 'hg update' to get a working copy) unconditionally. People might run `hg update` and get an exception if

D477: revlog: add option to mmap revlog index

2017-08-24 Thread quark (Jun Wu)
quark added a comment. I think revlog is decoupled from `ui` intentionally. I would avoid using `ui.debug` to test it, but just have a extension in `.t` that wraps the `mmap` method and print something to indicate mmap is being used. REPOSITORY rHG Mercurial REVISION DETAIL

D477: revlog: add option to mmap revlog index

2017-08-24 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > mbthomas wrote in test-revlog-mmapindex.t:12-13 > For (1) There's no `ui` object available in the `revlog.revlog` constructor. > Is there a way to get one? > For (2), the rest of the test suite will be loading the revlog without mmap, > so I

D515: phabricator: standardize colors

2017-08-24 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, the `--confirm` text could have colors but the main `phabsend` does not. This patch adjusts the main command so it also has colors. A default color

D514: phabsend: show associated Differential Revisions with --confirm

2017-08-24 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Often people running `phabsend --confirm` just want to check whether a commit will trigger a creation of new Differential Revision, or update an existing one.

D510: phabsend: polish the docstring a bit

2017-08-24 Thread quark (Jun Wu)
quark 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/D510 AFFECTED FILES contrib/phabricator.py CHANGE DETAILS diff --git a/contrib/phabricator.py

D513: phabsend: print the actual URL with --confirm

2017-08-24 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Sometimes people have multiple Phabricator endpoints set in multiple repos. It seems better for `--confirm` to prompt about the Phabricator endpoint patches being

D511: phabsend: make --amend the default

2017-08-24 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The local tag feature was intended to make `phabsend` closer to `email` workflow. But its experience is not great in multiple ways: - after rebase, obsoleted

D512: phabsend: detect patch change with larger context

2017-08-24 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously phabsend has an optimization that will skip uploading a diff if the patch (with context line number = 1) remains unchanged. That could be confusing:

D422: mdiff: add a --ignore-space-at-eol option

2017-08-24 Thread dsp (David Soria Parra)
dsp updated this revision to Diff 1266. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D422?vs=1241=1266 REVISION DETAIL https://phab.mercurial-scm.org/D422 AFFECTED FILES mercurial/cmdutil.py mercurial/help/config.txt mercurial/mdiff.py

[PATCH 2 of 3 evolve-ext] messages: use hyphenated '{phase, content}-divergent' in user messages

2017-08-24 Thread Martin von Zweigbergk via Mercurial-devel
# HG changeset patch # User Martin von Zweigbergk # Date 1503597452 25200 # Thu Aug 24 10:57:32 2017 -0700 # Node ID bffdf2aafc3ddceabc5645eaef909abfda01c018 # Parent f56cdb3e73fddd085e84a3ba58367a83ad1f71ee messages: use hyphenated '{phase,content}-divergent' in user

[PATCH 3 of 3 evolve-ext] evolve: undo change from "divergent" to "phasedivergent" for --divergent

2017-08-24 Thread Martin von Zweigbergk via Mercurial-devel
# HG changeset patch # User Martin von Zweigbergk # Date 1503597613 25200 # Thu Aug 24 11:00:13 2017 -0700 # Node ID 459f72224b05858b91595dcb74e269589ae0529e # Parent bffdf2aafc3ddceabc5645eaef909abfda01c018 evolve: undo change from "divergent" to "phasedivergent" for

[PATCH 1 of 3 evolve-ext] warning: use 'divergent', not 'contentdivergent' on old Mercurial

2017-08-24 Thread Martin von Zweigbergk via Mercurial-devel
# HG changeset patch # User Martin von Zweigbergk # Date 1503596918 25200 # Thu Aug 24 10:48:38 2017 -0700 # Node ID f56cdb3e73fddd085e84a3ba58367a83ad1f71ee # Parent f6517779a7c47471772dbbfb7025050ed71650ab warning: use 'divergent', not 'contentdivergent' on old

D422: mdiff: add a --ignore-space-at-eol option

2017-08-24 Thread dsp (David Soria Parra)
dsp added inline comments. INLINE COMMENTS > yuja wrote in cmdutil.py:126-127 > `-Z` sounds good, which doesn't conflict with any existing short > options. > > FWIW, the long option is called as `--ignore-trailing-space` in > GNU diff. I am happy to change '-Z'. The used the long opt name from

D451: revset: remove order information from tree

2017-08-24 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D451#8029, @yuja wrote: > > How about making `registrar.revsetpredicate` conservative? If it sees any > > predicate registered with the old API, Disable `anyorder` optimization and > > change it to `followorder` in runtime?

Re: [PATCH evolve-ext v2] obscache: use _readmarkers() from core with correct signature

2017-08-24 Thread Boris Feld
Queue thanks. On Wed, 2017-08-23 at 06:19 -0700, Martin von Zweigbergk via Mercurial- devel wrote: > # HG changeset patch > # User Martin von Zweigbergk > # Date 1503424759 25200 > #  Tue Aug 22 10:59:19 2017 -0700 > # Node ID 59ad0904a77f4fe8398b10a9c05a46bf79d900c5 >

Re: [PATCH 6 of 9 V4] template: compute user in obsfateusers

2017-08-24 Thread Yuya Nishihara
On Wed, 23 Aug 2017 17:18:40 +0200, Boris Feld wrote: > # HG changeset patch > # User Boris Feld > # Date 1499088840 -7200 > # Mon Jul 03 15:34:00 2017 +0200 > # Node ID fc257b24c35c492591f348b039d9e3f9488118a8 > # Parent 8c1da4748240142e1ee62521279cf8556192c79e > #

[PATCH 4 of 4] test-doctest: normalize b'', u'' and exception name on Python 3

2017-08-24 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1503581608 -32400 # Thu Aug 24 22:33:28 2017 +0900 # Node ID 098312faf83c46ea590c0c865874ccfc2f1b4df7 # Parent a9b6c464c13b6a6d7dce4e8adf88d0e80dc96003 test-doctest: normalize b'', u'' and exception name on Python 3 Still

[PATCH 3 of 4] run-tests: pass unicode to Pygments

2017-08-24 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1503580802 -32400 # Thu Aug 24 22:20:02 2017 +0900 # Node ID a9b6c464c13b6a6d7dce4e8adf88d0e80dc96003 # Parent 7b0eeb08d182eec00c79fe4617c09c1ec12bcbc5 run-tests: pass unicode to Pygments This is required on Python 3, and is

[PATCH 2 of 4] run-tests: factor out highlight functions

2017-08-24 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1503580540 -32400 # Thu Aug 24 22:15:40 2017 +0900 # Node ID 7b0eeb08d182eec00c79fe4617c09c1ec12bcbc5 # Parent f22153763155ce72938f11beed25db352b923ff2 run-tests: factor out highlight functions diff --git a/tests/run-tests.py

[PATCH 1 of 4] run-tests: include "\n" in formatted message instead of calling writeln()

2017-08-24 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1503580197 -32400 # Thu Aug 24 22:09:57 2017 +0900 # Node ID f22153763155ce72938f11beed25db352b923ff2 # Parent 10f1809ab98f18e7ad3284fcf5d3ec9b699c6e15 run-tests: include "\n" in formatted message instead of calling writeln()

D422: mdiff: add a --ignore-space-at-eol option

2017-08-24 Thread yuja (Yuya Nishihara)
yuja added inline comments. INLINE COMMENTS > morisgi wrote in cmdutil.py:126-127 > Regular diff chose -Z for the short option `-Z` sounds good, which doesn't conflict with any existing short options. FWIW, the long option is called as `--ignore-trailing-space` in GNU diff. REPOSITORY rHG

D451: revset: remove order information from tree

2017-08-24 Thread yuja (Yuya Nishihara)
yuja added a comment. > How about making `registrar.revsetpredicate` conservative? If it sees any > predicate registered with the old API, Disable `anyorder` optimization and > change it to `followorder` in runtime? Sounds unnecessarily complicated. How fast is the `anyorder` set in

D477: revlog: add option to mmap revlog index

2017-08-24 Thread mbthomas (Mark Thomas)
mbthomas added inline comments. INLINE COMMENTS > simonfar wrote in test-revlog-mmapindex.t:12-13 > Two things: > > 1. Can you add a `ui.debug()` or similar so that you can show that `mmap()` > is in use here? > 2. Can you repeat the test without `mmap()` to show that `mmap()` and >

[PATCH 6 of 9] contrib: add bzrlib to list of packages from which we import symbols

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503430134 14400 # Tue Aug 22 15:28:54 2017 -0400 # Node ID 3973af0b0ae185ab05b0ddd54867bbc23df6b701 # Parent a2b9f131501a0c1dbb83ce425faa4acd50d5f8f8 contrib: add bzrlib to list of packages from which we import symbols

[PATCH 7 of 9] contrib: make import-checker agree more with run-tests about heredocpy

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503434226 14400 # Tue Aug 22 16:37:06 2017 -0400 # Node ID a4244fddca70195060f81b4e7975375dee9a0d8e # Parent 3973af0b0ae185ab05b0ddd54867bbc23df6b701 contrib: make import-checker agree more with run-tests about heredocpy

[PATCH 8 of 9] tests: add blank output lines to test-commandserver

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503434276 14400 # Tue Aug 22 16:37:56 2017 -0400 # Node ID f55070ce9b76fbd05457df39563010fc2a3918ce # Parent a4244fddca70195060f81b4e7975375dee9a0d8e tests: add blank output lines to test-commandserver This helps the

[PATCH 9 of 9] tests: update test-commandserver to pass our import checker

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503426385 14400 # Tue Aug 22 14:26:25 2017 -0400 # Node ID 9ddbab8e7b33de19eca201e68c188bec23e38d32 # Parent f55070ce9b76fbd05457df39563010fc2a3918ce tests: update test-commandserver to pass our import checker diff --git

[PATCH 4 of 9] tests: blacklist test-demandimport from test-check-module-imports

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503429418 14400 # Tue Aug 22 15:16:58 2017 -0400 # Node ID 054834a8867e719f9decfe043ae58dfaa91a8812 # Parent c05adc0d06b66acfbf85be5c78a14396401a8336 tests: blacklist test-demandimport from test-check-module-imports It

[PATCH 3 of 9] tests: sort excluded test files in test-check-module-imports

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503429369 14400 # Tue Aug 22 15:16:09 2017 -0400 # Node ID c05adc0d06b66acfbf85be5c78a14396401a8336 # Parent 4954e118c22f530c2cc91cb7900f003b5d920ddd tests: sort excluded test files in test-check-module-imports diff --git

[PATCH 1 of 9] tests: blacklist some more entries in module import checks

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503425716 14400 # Tue Aug 22 14:15:16 2017 -0400 # Node ID ee1f4dd1c3a53cd08e5329b80ba5d93811ab5d1c # Parent 10f1809ab98f18e7ad3284fcf5d3ec9b699c6e15 tests: blacklist some more entries in module import checks diff --git

[PATCH 2 of 9] contrib: allow symbol imports from hgclient for tests

2017-08-24 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1503426306 14400 # Tue Aug 22 14:25:06 2017 -0400 # Node ID 4954e118c22f530c2cc91cb7900f003b5d920ddd # Parent ee1f4dd1c3a53cd08e5329b80ba5d93811ab5d1c contrib: allow symbol imports from hgclient for tests diff --git

D477: revlog: add option to mmap revlog index

2017-08-24 Thread simonfar (Simon Farnsworth)
simonfar added inline comments. INLINE COMMENTS > test-revlog-mmapindex.t:12-13 > + > +mmap index which is now more than 4k long > + $ hg log -l 5 -T '{rev}\n' --config experimental.mmapindexthreshold=4k > + 100 Two things: 1. Can you add a `ui.debug()` or similar so that you can show that

D477: revlog: add option to mmap revlog index

2017-08-24 Thread mbthomas (Mark Thomas)
mbthomas added a comment. I've switched to a configurable threshold for mmap as suggested. This does require an extra `stat` call for the changelog and manifest indexes, however python already calls stat each time you open a file, so we should just hit the filesystem cache. REPOSITORY

D477: revlog: add option to mmap revlog index

2017-08-24 Thread mbthomas (Mark Thomas)
mbthomas added a comment. In https://phab.mercurial-scm.org/D477#7739, @indygreg wrote: > Do you know what happens with the underlying file descriptor when it is memory mapped? If an fd stays open, that could lead to fd exhaustion. This can be mitigated by only using mmap for certain

Re: [PATCH v2] bookmarks: allow renaming active bookmark using '.'

2017-08-24 Thread Yuya Nishihara
On Thu, 24 Aug 2017 09:07:53 +0200, David Demelier wrote: > # HG changeset patch > # User David Demelier > # Date 1503298366 -7200 > # Mon Aug 21 08:52:46 2017 +0200 > # Node ID 546e72c2f4134145b4a91d6e03c1b0ff70b2bd9a > # Parent

Re: [PATCH 06 of 10] simplemerge: update to conform with modern import conventions

2017-08-24 Thread Yuya Nishihara
On Wed, 23 Aug 2017 10:55:05 -0400, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler > # Date 1503425593 14400 > # Tue Aug 22 14:13:13 2017 -0400 > # Node ID a513d142d47423242743902f8e94d033c8ecc563 > # Parent ab897b232da53bc7b198027103de5e521f6e8e29 >

D472: extensions: make wrapfunction() return a context manager

2017-08-24 Thread mjpieters (Martijn Pieters)
mjpieters accepted this revision. mjpieters added a comment. I was being too strict; like `open()` it's sometimes fine to apply the action in the constructor. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D472 To: martinvonz, #hg-reviewers, quark, mjpieters

[PATCH v2] bookmarks: allow renaming active bookmark using '.'

2017-08-24 Thread David Demelier
# HG changeset patch # User David Demelier # Date 1503298366 -7200 # Mon Aug 21 08:52:46 2017 +0200 # Node ID 546e72c2f4134145b4a91d6e03c1b0ff70b2bd9a # Parent 4e8a46c25facaebca476634d52dd78431d3143e8 bookmarks: allow renaming active bookmark using '.' diff -r

D422: mdiff: add a --ignore-space-at-eol option

2017-08-24 Thread morisgi (Gilles Moris)
morisgi added inline comments. INLINE COMMENTS > cmdutil.py:126-127 > _('ignore changes whose lines are all blank')), > +('E', 'ignore-space-at-eol', None, > + _('ignore changes in whitespace at EOL')), > ] Regular diff chose -Z for the short option REPOSITORY rHG Mercurial