D9630: errors: respect ui.detailed-exit-code in chg

2020-12-17 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This fixes `test-globalopts.t`, which has been failing since
  db5dddb38f5b 
 
(errors: raise InputError on early parse error in
  dispatch, 2020-11-23).

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9630

AFFECTED FILES
  mercurial/chgserver.py

CHANGE DETAILS

diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py
--- a/mercurial/chgserver.py
+++ b/mercurial/chgserver.py
@@ -505,6 +505,7 @@
 """
 args = self._readlist()
 errorraised = False
+detailed_exit_code = 255
 try:
 self.ui, lui = _loadnewui(self.ui, args, self.cdebug)
 except error.RepoError as inst:
@@ -515,12 +516,17 @@
 self.ui.error(_(b"(%s)\n") % inst.hint)
 errorraised = True
 except error.Abort as inst:
+if isinstance(inst, error.InputError):
+detailed_exit_code = 10
 self.ui.error(inst.format())
 errorraised = True
 
 if errorraised:
 self.ui.flush()
-self.cresult.write(b'exit 255')
+exit_code = 255
+if self.ui.configbool(b'ui', b'detailed-exit-code'):
+exit_code = detailed_exit_code
+self.cresult.write(b'exit %d' % exit_code)
 return
 newhash = hashstate.fromui(lui, self.hashstate.mtimepaths)
 insts = []



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D9629: relnotes: document automatically setting `HGPLAIN=1` for external hooks

2020-12-17 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9629

AFFECTED FILES
  relnotes/next

CHANGE DETAILS

diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -37,6 +37,8 @@
is also supported by "premerge" as
`merge-tools..premerge=keep-mergediff`.
 
+* External hooks are now called with `HGPLAIN=1` preset.
+
 == New Experimental Features ==
 
 * `experimental.single-head-per-branch:public-changes-only` can be used



To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: mercurial-devel | Pipeline #14811 has failed for branch/default | 7c79e1f1

2020-12-17 Thread Pierre-Yves David

This failure is legitimate (and probably comes from a Martin patch)

On 12/17/20 12:05 PM, Heptapod wrote:

✖   Your pipeline has failed.

Project 	octobus  / mercurial-devel 


Branch  
	branch/default 
 



Commit  
	7c79e1f1 
 



mergetools: alphabetize the config settings Th...
Commit Author   
Matt Harbison

Pipeline #14811 
 
triggered by 		Pierre-Yves David 


had 1 failed build.
Failed builds
✖   tests

	test-py2-chg 



GitLab
You're receiving this email because of your account on 
foss.heptapod.net. Manage all notifications 
 · Help 




___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



--
Pierre-Yves David
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D9628: relnotes: document that `hg extdiff` also got -r replaced by --from/--to

2020-12-17 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9628

AFFECTED FILES
  relnotes/next

CHANGE DETAILS

diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -20,8 +20,8 @@
  * `hg strip`, from the strip extension, is now a core command, `hg
debugstrip`. The extension remains for compatibility.
 
- * `hg diff` now supports `--from ` and `--to ` arguments as
-   clearer alternatives to `-r `. `-r ` has been
+ * `hg diff` and `hg extdiff` now support `--from ` and `--to `
+   arguments as clearer alternatives to `-r `. `-r ` has been
deprecated.
 
  * The memory footprint per changeset during pull/unbundle



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D9627: cext: shut-up sign compare warnings

2020-12-17 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9627

AFFECTED FILES
  mercurial/cext/revlog.c

CHANGE DETAILS

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -2612,7 +2612,7 @@
"data does not support buffer interface");
return -1;
}
-   if (self->nodelen < 20 || self->nodelen > sizeof(nullid)) {
+   if (self->nodelen < 20 || self->nodelen > (Py_ssize_t)sizeof(nullid)) {
PyErr_SetString(PyExc_RuntimeError, "unsupported node size");
return -1;
}



To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial-devel | Pipeline #14817 has failed for branch/default | fc0385a0

2020-12-17 Thread Heptapod


Your pipeline has failed.

Project: mercurial-devel ( https://foss.heptapod.net/octobus/mercurial-devel )
Branch: branch/default ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commits/branch/default )

Commit: fc0385a0 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commit/fc0385a03d0e545375e915aaf4bb8afa1f752a98
 )
Commit Message: rust: document how to enable debug information ...
Commit Author: Simon Sapin ( https://foss.heptapod.net/SimonSapin )

Pipeline #14817 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/14817 ) triggered 
by Pierre-Yves David ( https://foss.heptapod.net/marmoute )
had 2 failed builds.

Job #137451 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/137451/raw )

Stage: tests
Name: test-py2-chg
Job #137447 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/137447/raw )

Stage: tests
Name: test-py3-pure

-- 
You're receiving this email because of your account on foss.heptapod.net.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial@46140: 28 new changesets

2020-12-17 Thread Mercurial Commits
28 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/59fa3890d40a
changeset:   46113:59fa3890d40a
user:Joerg Sonnenberger 
date:Tue Dec 01 21:54:46 2020 +0100
summary: node: import symbols explicitly

https://www.mercurial-scm.org/repo/hg/rev/c6ae1982b2a1
changeset:   46114:c6ae1982b2a1
user:Martin von Zweigbergk 
date:Thu Dec 10 01:18:15 2020 -0800
summary: localrepo: delete obsolete comment about `prefix in repo` raising 
exception

https://www.mercurial-scm.org/repo/hg/rev/be3d8178251e
changeset:   46115:be3d8178251e
user:Martin von Zweigbergk 
date:Wed Dec 09 20:22:25 2020 -0800
summary: errors: raise InputError if an ambiguous revision id prefix is used

https://www.mercurial-scm.org/repo/hg/rev/17a695357270
changeset:   46116:17a695357270
user:Martin von Zweigbergk 
date:Wed Dec 09 19:40:30 2020 -0800
summary: errors: use detailed exit code 50 for StorageError

https://www.mercurial-scm.org/repo/hg/rev/6cc269bd1c29
changeset:   46117:6cc269bd1c29
user:Martin von Zweigbergk 
date:Wed Nov 18 23:37:09 2020 -0800
summary: errors: raise more specifc errors from narrowcommands

https://www.mercurial-scm.org/repo/hg/rev/db5dddb38f5b
changeset:   46118:db5dddb38f5b
user:Martin von Zweigbergk 
date:Mon Nov 23 10:38:05 2020 -0800
summary: errors: raise InputError on early parse error in dispatch

https://www.mercurial-scm.org/repo/hg/rev/9261f6c1d39b
changeset:   46119:9261f6c1d39b
user:Martin von Zweigbergk 
date:Mon Nov 23 16:39:53 2020 -0800
summary: errors: raise StateError when push fails because it creates new 
heads

https://www.mercurial-scm.org/repo/hg/rev/c000eff2c635
changeset:   46120:c000eff2c635
user:Martin von Zweigbergk 
date:Thu Nov 12 10:41:03 2020 -0800
summary: errors: raise InputError on recursive template definition

https://www.mercurial-scm.org/repo/hg/rev/84130fd74a22
changeset:   46121:84130fd74a22
user:Joerg Sonnenberger 
date:Sun Dec 13 00:19:03 2020 +0100
summary: revlog: support none compression

https://www.mercurial-scm.org/repo/hg/rev/1b5aeb928c8f
changeset:   46122:1b5aeb928c8f
user:Joerg Sonnenberger 
date:Mon Dec 14 18:19:58 2020 +0100
summary: tests: workaround for a flaky test

https://www.mercurial-scm.org/repo/hg/rev/5b9bb4e9a3bf
changeset:   46123:5b9bb4e9a3bf
user:Joerg Sonnenberger 
date:Mon Dec 14 19:48:35 2020 +0100
summary: share: properly copy cache files when cloning from a share

https://www.mercurial-scm.org/repo/hg/rev/ceaf1646f420
changeset:   46124:ceaf1646f420
user:Matt Harbison 
date:Thu Dec 17 00:48:36 2020 -0500
summary: mergetools: alphabetize the config settings

https://www.mercurial-scm.org/repo/hg/rev/61afe6215aef
changeset:   46125:61afe6215aef
user:Pierre-Yves David 
date:Sat Nov 21 09:30:34 2020 +0100
summary: copies-rust: extract conflicting value comparison in its own 
function

https://www.mercurial-scm.org/repo/hg/rev/94300498491e
changeset:   46126:94300498491e
user:Pierre-Yves David 
date:Sat Nov 21 09:31:34 2020 +0100
summary: copies-rust: move the mapping merging into a else clause

https://www.mercurial-scm.org/repo/hg/rev/c58c8f1d63b1
changeset:   46127:c58c8f1d63b1
user:Pierre-Yves David 
date:Sat Nov 21 10:50:14 2020 +0100
summary: copies-rust: hide most of the comparison details inside a closure

https://www.mercurial-scm.org/repo/hg/rev/c94d013e2299
changeset:   46128:c94d013e2299
user:Pierre-Yves David 
date:Sat Nov 21 09:40:52 2020 +0100
summary: copies-rust: add smarter approach for merging small mapping with 
large mapping

https://www.mercurial-scm.org/repo/hg/rev/818502d2f5e3
changeset:   46129:818502d2f5e3
user:Pierre-Yves David 
date:Tue Apr 21 15:13:13 2020 +0200
summary: copies-rust: pre-introduce a PathToken type and use it where 
applicable

https://www.mercurial-scm.org/repo/hg/rev/60677eca7434
changeset:   46130:60677eca7434
user:Martin von Zweigbergk 
date:Wed Dec 16 21:40:27 2020 -0800
summary: tests: remove undefined (empty) $opt from test-extdiff.t

https://www.mercurial-scm.org/repo/hg/rev/55542b213813
changeset:   46131:55542b213813
user:Martin von Zweigbergk 
date:Wed Dec 16 22:16:05 2020 -0800
summary: extdiff: pass contexts instead of nodeids into diffrevs()

https://www.mercurial-scm.org/repo/hg/rev/dfe2760db2a6
changeset:   46132:dfe2760db2a6
user:Martin von Zweigbergk 
date:Wed Dec 16 22:30:07 2020 -0800
summary: extdiff: fix crash when showing diff from wdir()

https://www.mercurial-scm.org/repo/hg/rev/0a4d47f4337b
changeset:   46133:0a4d47f4337b
user:Martin von Zweigbergk 
date:Wed Dec 16 21:06:29 2020 -0800
summary: extdiff: add --from/--to and deprecate -r, as was done 

D9626: branchmap: micro-optimize branchinfo

2020-12-17 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  changelogrevision() is supposed to be used if not all data of
  changelog.read is used. This is the case here as only the extra field is
  used. This also improves extensibility as at least hgext.git doesn't
  implement changelog.read.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9626

AFFECTED FILES
  mercurial/changelog.py

CHANGE DETAILS

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -601,7 +601,7 @@
 
 This function exists because creating a changectx object
 just to access this is costly."""
-extra = self.read(rev)[5]
+extra = self.changelogrevision(rev).extra
 return encoding.tolocal(extra.get(b"branch")), b'close' in extra
 
 def _nodeduplicatecallback(self, transaction, node):



To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D9625: rust: document how to enable debug information in optimized builds

2020-12-17 Thread SimonSapin
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is particularly useful when profiling.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9625

AFFECTED FILES
  .hgignore
  rust/README.rst

CHANGE DETAILS

diff --git a/rust/README.rst b/rust/README.rst
--- a/rust/README.rst
+++ b/rust/README.rst
@@ -40,7 +40,7 @@
 You might want to check the `features` section in ``hg-cpython/Cargo.toml``.
 It may contain features that might be interesting to try out.
 
-To use features from the Makefile, use the `HG_RUST_FEATURES` environment 
+To use features from the Makefile, use the `HG_RUST_FEATURES` environment
 variable: for instance `HG_RUST_FEATURES="some-feature other-feature"`
 
 Profiling
@@ -51,6 +51,14 @@
 indicate why the rust code cannot be used (say, using lookarounds in
 hgignore).
 
+Creating a ``.cargo/config`` file with the following content enables
+debug information in optimized builds. This make profiles more informative
+with source file name and line number for Rust stack frames and
+(in some cases) stack frames for Rust functions that have been inlined.
+
+  [profile.release]
+  debug = true
+
 ``py-spy`` (https://github.com/benfred/py-spy) can be used to
 construct a single profile with rust functions and python functions
 (as opposed to ``hg --profile``, which attributes time spent in rust
@@ -58,6 +66,11 @@
 as opposed to tools for native code like ``perf``, which attribute
 time to the python interpreter instead of python functions).
 
+Example usage:
+
+  $ make PURE=--rust local # Don't forget to recompile after a code change
+  $ py-spy record --native --output /tmp/profile.svg -- ./hg ...
+
 Developing Rust
 ===
 
diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -64,6 +64,10 @@
 # Generated wheels
 wheelhouse/
 
+syntax: rootglob
+# See Profiling in rust/README.rst
+.cargo/config
+
 syntax: regexp
 ^\.pc/
 ^\.(pydev)?project



To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial-devel | Pipeline #14811 has failed for branch/default | 7c79e1f1

2020-12-17 Thread Heptapod


Your pipeline has failed.

Project: mercurial-devel ( https://foss.heptapod.net/octobus/mercurial-devel )
Branch: branch/default ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commits/branch/default )

Commit: 7c79e1f1 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commit/7c79e1f100db314f083f2cf15fac07ca3c1386ae
 )
Commit Message: mergetools: alphabetize the config settings

Th...
Commit Author: Matt Harbison

Pipeline #14811 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/14811 ) triggered 
by Pierre-Yves David ( https://foss.heptapod.net/marmoute )
had 1 failed build.

Job #137403 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/137403/raw )

Stage: tests
Name: test-py2-chg

-- 
You're receiving this email because of your account on foss.heptapod.net.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel