D6709: config: add --registered flag to show all known configs

2019-08-22 Thread av6 (Anton Shestakov)
av6 added a comment.
av6 accepted this revision.


  @marmoute did you want this flag marked as experimental or am I 
misremembering?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6709/new/

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

To: navaneeth.suresh, #hg-reviewers, av6, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, 
mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6758: narrow: fix typo "respositories"

2019-08-22 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/narrow/narrowcommands.py
  tests/test-narrow-trackedcmd.t

CHANGE DETAILS

diff --git a/tests/test-narrow-trackedcmd.t b/tests/test-narrow-trackedcmd.t
--- a/tests/test-narrow-trackedcmd.t
+++ b/tests/test-narrow-trackedcmd.t
@@ -220,5 +220,5 @@
   $ hg init non-narrow
   $ cd non-narrow
   $ hg tracked --addinclude foobar
-  abort: the tracked command is only supported on respositories cloned with 
--narrow
+  abort: the tracked command is only supported on repositories cloned with 
--narrow
   [255]
diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -368,7 +368,7 @@
 opts = pycompat.byteskwargs(opts)
 if repository.NARROW_REQUIREMENT not in repo.requirements:
 raise error.Abort(_('the tracked command is only supported on '
-'respositories cloned with --narrow'))
+'repositories cloned with --narrow'))
 
 # Before supporting, decide whether it "hg tracked --clear" should mean
 # tracking no paths or all paths.



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


Re: [PATCH STABLE V2] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Yuya Nishihara
On Thu, 22 Aug 2019 15:53:01 +0200, Joerg Sonnenberger wrote:
> On Thu, Aug 22, 2019 at 02:57:04PM +0200, Raphaël Gomès wrote:
> > diff -r 302dbc9d52be -r 450f65349bbe Makefile
> > --- a/Makefile  Fri Aug 16 15:41:53 2019 +0300
> > +++ b/Makefile  Wed Aug 21 17:56:50 2019 +0200
> > @@ -16,6 +16,7 @@
> >  export LC_ALL=C
> >  TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
> >  OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
> > +CARGO=cargo
> >  
> >  # Set this to e.g. "mingw32" to use a non-default compiler.
> >  COMPILER=
> 
> Please use ?= for CARGO too, makes it easier to override from the
> command line.

Command-line arguments supersedes ordinary make variables.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH STABLE V2] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Yuya Nishihara
On Thu, 22 Aug 2019 14:57:04 +0200, Raphaël Gomès wrote:
> # HG changeset patch
> # User Raphaël Gomès 
> # Date 1566403010 -7200
> #  Wed Aug 21 17:56:50 2019 +0200
> # Branch stable
> # Node ID 450f65349bbe7c7a840f7ddd275defbd9f413775
> # Parent  302dbc9d52beeb2ef677aa18b3fa005bbce2134e
> makefile: run Rust tests if cargo is installed

Queued, thanks.

> diff -r 302dbc9d52be -r 450f65349bbe Makefile
> --- a/MakefileFri Aug 16 15:41:53 2019 +0300
> +++ b/MakefileWed Aug 21 17:56:50 2019 +0200
> @@ -16,6 +16,7 @@
>  export LC_ALL=C
>  TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
>  OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
> +CARGO=cargo
>  
>  # Set this to e.g. "mingw32" to use a non-default compiler.
>  COMPILER=
> @@ -110,7 +111,11 @@
>  check: tests
>  
>  tests:
> - cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
> + # Run Rust tests if cargo is installed

Replaced tab with spaces for the comment line.

> + if command -v $(CARGO) >/dev/null 2>&1; then \
> + cd $(HGROOT)/rust/hg-cpython && $(CARGO) test --quiet --all; \
> + fi;
> + cd tests && $(PYTHON) run-tests.py $(TESTFLAGS);

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


mercurial@42804: 57 new changesets

2019-08-22 Thread Mercurial Commits
57 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/7cae6bc29ff9
changeset:   42748:7cae6bc29ff9
user:Raphaël Gomès 
date:Tue Jul 09 11:49:49 2019 +0200
summary: rust-parsers: switch to parse/pack_dirstate to mutate-on-loop

https://www.mercurial-scm.org/repo/hg/rev/7ceded4419a3
changeset:   42749:7ceded4419a3
user:Raphaël Gomès 
date:Tue Jul 09 12:15:09 2019 +0200
summary: rust-dirstate: use EntryState enum instead of literals

https://www.mercurial-scm.org/repo/hg/rev/849e744b925d
changeset:   42750:849e744b925d
user:Raphaël Gomès 
date:Wed Jul 17 11:37:43 2019 +0200
summary: rust-dirstate: improve API of `DirsMultiset`

https://www.mercurial-scm.org/repo/hg/rev/4b3b27d567d5
changeset:   42751:4b3b27d567d5
user:Raphaël Gomès 
date:Tue Jul 09 14:53:34 2019 +0200
summary: rust-docstrings: add missing module docstrings

https://www.mercurial-scm.org/repo/hg/rev/30320c7bf79f
changeset:   42752:30320c7bf79f
user:Raphaël Gomès 
date:Tue Jul 09 15:15:54 2019 +0200
summary: rust-cpython: add macro for sharing references

https://www.mercurial-scm.org/repo/hg/rev/fce6dc93a510
changeset:   42753:fce6dc93a510
user:Raphaël Gomès 
date:Wed Jul 10 09:56:23 2019 +0200
summary: rust-dirstate: rust implementation of dirstatemap

https://www.mercurial-scm.org/repo/hg/rev/4e8f504424f3
changeset:   42754:4e8f504424f3
user:Raphaël Gomès 
date:Wed Jul 10 09:56:53 2019 +0200
summary: rust-dirstate: rust-cpython bridge for dirstatemap

https://www.mercurial-scm.org/repo/hg/rev/749ef8c31187
changeset:   42755:749ef8c31187
user:Raphaël Gomès 
date:Wed Jul 10 09:57:28 2019 +0200
summary: rust-dirstate: call rust dirstatemap from Python

https://www.mercurial-scm.org/repo/hg/rev/ed0da6e0d6ee
changeset:   42756:ed0da6e0d6ee
user:Danny Hooper 
date:Mon Aug 12 16:39:39 2019 -0700
summary: fix: allow tools to use :linerange, but also run if a file is 
unchanged

https://www.mercurial-scm.org/repo/hg/rev/2d70b1118af2
changeset:   42757:2d70b1118af2
user:Danny Hooper 
date:Tue Aug 13 14:20:48 2019 -0700
summary: fix: correctly parse the :metadata subconfig

https://www.mercurial-scm.org/repo/hg/rev/e9f503074044
changeset:   42758:e9f503074044
user:Danny Hooper 
date:Tue Aug 13 14:28:10 2019 -0700
summary: fix: pass line ranges as value instead of callback

https://www.mercurial-scm.org/repo/hg/rev/791791a1fd4e
changeset:   42759:791791a1fd4e
user:Augie Fackler 
date:Wed Aug 14 16:11:45 2019 -0400
summary: tests: split joint repo/changelog fake into one for each type

https://www.mercurial-scm.org/repo/hg/rev/9f2189b6bf2a
changeset:   42760:9f2189b6bf2a
user:Navaneeth Suresh 
date:Tue Aug 20 18:35:16 2019 +0300
summary: config: add experimental argument to the config registrar

https://www.mercurial-scm.org/repo/hg/rev/5c285c8e4f98
changeset:   42761:5c285c8e4f98
user:Navaneeth Suresh 
date:Thu Aug 15 20:43:25 2019 +0530
summary: unshelve: abort on using --keep and --interactive together

https://www.mercurial-scm.org/repo/hg/rev/ac6121a24f27
changeset:   42762:ac6121a24f27
user:Taapas Agrawal 
date:Fri Jul 26 01:19:43 2019 +0530
summary: transplant: added support for --stop flag

https://www.mercurial-scm.org/repo/hg/rev/04c3b76fa7a3
changeset:   42763:04c3b76fa7a3
user:Yuya Nishihara 
date:Fri Aug 16 18:31:17 2019 +0900
summary: rust-discovery: remove useless extern crate

https://www.mercurial-scm.org/repo/hg/rev/798b7d4b463e
changeset:   42764:798b7d4b463e
user:Yuya Nishihara 
date:Fri Aug 16 18:34:05 2019 +0900
summary: rust-discovery: use while loop instead of match + break

https://www.mercurial-scm.org/repo/hg/rev/0770e221d24b
changeset:   42765:0770e221d24b
user:Yuya Nishihara 
date:Sat Aug 17 15:43:41 2019 +0900
summary: transplant: unnest --stop case

https://www.mercurial-scm.org/repo/hg/rev/e94c8f584ee2
changeset:   42766:e94c8f584ee2
user:Yuya Nishihara 
date:Sat Aug 17 10:25:04 2019 +0900
summary: py3: do not convert rust module/attribute names to bytes

https://www.mercurial-scm.org/repo/hg/rev/624d86262e14
changeset:   42767:624d86262e14
user:Augie Fackler 
date:Thu Aug 15 14:54:39 2019 -0400
summary: setup: fix a sorting issue I noticed in package names

https://www.mercurial-scm.org/repo/hg/rev/5a8f2c8edff6
changeset:   42768:5a8f2c8edff6
user:Pierre-Yves David 
date:Wed Aug 07 20:08:26 2019 +0200
summary: rawdata: update caller in revlog

https://www.mercurial-scm.org/repo/hg/rev/e75981b7ce84
changeset:   42769:e75981b7ce84
user:Pierre-Yves David 
date:Wed Aug 07 20:08:35 2019 +0200
summary: rawdata: update callers in context


D6755: merge: hint about using `hg resolve` for resolving conflicts

2019-08-22 Thread martinvonz (Martin von Zweigbergk)
Closed by commit rHG7b80ad5af239: merge: hint about using `hg resolve` for 
resolving conflicts (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6755?vs=16289=16296

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6755/new/

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

AFFECTED FILES
  mercurial/merge.py
  tests/test-rebase-inmemory.t
  tests/test-resolve.t

CHANGE DETAILS

diff --git a/tests/test-resolve.t b/tests/test-resolve.t
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -210,12 +210,15 @@
   [1]
   $ hg up 0
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
   $ hg merge 2
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
   $ hg merge --force 2
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
 
 set up conflict-free merge
diff --git a/tests/test-rebase-inmemory.t b/tests/test-rebase-inmemory.t
--- a/tests/test-rebase-inmemory.t
+++ b/tests/test-rebase-inmemory.t
@@ -506,6 +506,7 @@
   $ hg rebase -s 2 -d 7
   rebasing 2:177f92b77385 "c"
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
   $ hg resolve -l
   U e
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -2025,7 +2025,8 @@
 raise error.Abort(_("outstanding uncommitted merge"))
 ms = mergestate.read(repo)
 if list(ms.unresolved()):
-raise error.Abort(_("outstanding merge conflicts"))
+raise error.Abort(_("outstanding merge conflicts"),
+  hint=_("use 'hg resolve' to resolve"))
 if branchmerge:
 if pas == [p2]:
 raise error.Abort(_("merging with a working directory ancestor"



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


D6757: bdiff-torture: fix pyflakes warning reporting undefined name 'inst'

2019-08-22 Thread pulkit (Pulkit Goyal)
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Looks like I got a latest version of pyflakes somehow or it's running on py3 
and
  it spotted this.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/bdiff-torture.py

CHANGE DETAILS

diff --git a/contrib/bdiff-torture.py b/contrib/bdiff-torture.py
--- a/contrib/bdiff-torture.py
+++ b/contrib/bdiff-torture.py
@@ -53,8 +53,7 @@
 test1(a, b)
 return
 except Exception as inst:
-pass
-print("exception:", inst)
+print("exception:", inst)
 reducetest(a, b)
 
 def test(a, b):



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


Mercurial mini-sprint in Leipzig (Germany) from September 5th to 8th

2019-08-22 Thread Manuel Jacob

Hi,

In addition to the sprints that are hosted about every two minor 
releases, the Mercurial community organizes so called "mini-sprints" in 
irregular intervals.


What's the goal of the mini-sprint?  It's not only an opportunity for 
existing developers to collaborate in person.  Even more importantly, 
it's a chance for mere users to become contributors.  So no matter 
whether you are a long-term contributor or someone wanting to start 
hacking on Mercurial, you will be welcome.


The official dates for the mini-sprint are September 5th to 8th.  The 
largest number of people is expected to stay from Friday (6th) evening 
to Monday morning.  But to make it possible to attend for people only 
having time during the week, the sprint officially starts at Thursday 
(5th) around noon.  That date is flexible.  If a substantial amount of 
people want to come on Monday and Tuesday following the weekend, we can 
extend the dates.


The list of topics is open, but there are some pressing issues:

- Now that BitBucket is going to stop Mercurial hosting, what are the 
alternatives for free Mercurial repository hosting?
- Python 2 will reach End of Life on January 1, 2020.  Before that, 
there'll be only one Mercurial major release.
- Blocking the Python 3 porting on Windows, the code calling the file 
system API on Windows needs to be changed to pass Unicode strings.  If 
there are developers using Windows, we might work on that issue.


The location will be an office in Leipzig, which is easily reachable by 
train.  For example, from Paris it's about 8h for about 60€ – 120€.  
From Frankfurt airport it's about 3h for about 20€ – 50€.  It provides 
space for around 10 people (more on weekends).


Lunch will be provided for a contribution towards expenses.  At least 2 
sleeping facilities can be provided free of charge.  See the 
registration page for more details.


For registration, send a pull request for the file linked below or send 
me an e-mail.  Of course, if you don't want your name to be listed, I'll 
respect that and add you anonymously.


https://bitbucket.org/mjacob/mercurial-mini-sprint-leipzig-2019/src/default/people.rst

Please spread the word. :)  Here's this e-mail as a link: 
https://bitbucket.org/mjacob/mercurial-mini-sprint-leipzig-2019/raw/default/announcement.txt


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


D6735: update: added support for --abort flag(issue4404)

2019-08-22 Thread taapas1128 (Taapas Agrawal)
taapas1128 added inline comments.
taapas1128 marked an inline comment as done.

INLINE COMMENTS

> mharbison72 wrote in test-merge-tools.t:2092
> When you add more tests, please include some with 1 dirty subrepo, and then 
> another where the first subrepo is already merged/resolved, and the second 
> subrepo is dirty and pending a merge/resolve.  If it simplifies the initial 
> implementation to detect a dirty subrepo and then abort the `--abort` before 
> it starts, that seems fine.

@mharbison72 Have a look. I have updated the diff.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6735/new/

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

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


D6735: update: added support for --abort flag(issue4404)

2019-08-22 Thread taapas1128 (Taapas Agrawal)
taapas1128 updated this revision to Diff 16294.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6735?vs=16262=16294

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6735/new/

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/hg.py
  tests/test-update-abort.t

CHANGE DETAILS

diff --git a/tests/test-update-abort.t b/tests/test-update-abort.t
new file mode 100644
--- /dev/null
+++ b/tests/test-update-abort.t
@@ -0,0 +1,177 @@
+Tests for 'hg update --abort'
+
+  $ cat >> $HGRCPATH << EOF
+  > [extensions]
+  > graphlog=
+  > EOF
+
+Basic test
+  $ hg init test
+  $ cd test
+  $ echo before > file
+  $ hg add file
+  $ hg commit -mbefore
+  $ echo after > file
+  $ hg commit -mafter
+  $ echo edited > file
+
+abort flag with no interrupted update
+  $ hg update --abort
+  abort: no update in progress
+  [255]
+
+Pre-update log and file content
+  $ hg glog
+  @  changeset:   1:47d1da7c1f80
+  |  tag: tip
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: after
+  |
+  o  changeset:   0:dd67ebc4de84
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: before
+  
+
+  $ cat file
+  edited
+  $ hg update 0
+  merging file
+  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges
+  [1]
+
+  $ hg update --abort
+  aborting the update, updating back to 47d1da7c1f80
+  merging file
+  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
+  update aborted
+  working directory is now at 47d1da7c1f80
+
+Post-update log and file content
+  $ hg glog
+  @  changeset:   1:47d1da7c1f80
+  |  tag: tip
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: after
+  |
+  o  changeset:   0:dd67ebc4de84
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: before
+  
+
+  $ cat file
+  edited
+
+Test when not all files are resolved
+  $ echo foo > foo
+  $ hg add foo
+  $ hg commit -m "added foo"
+  $ echo changed > file
+  $ echo bar > foo
+  $ hg update 0
+  file 'foo' was deleted in other [destination] but was modified in local 
[working copy].
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
+  merging file
+  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 2 files unresolved
+  use 'hg resolve' to retry unresolved file merges
+  [1]
+  $ echo resolved > file
+  $ hg resolve --mark
+  (no more unresolved files)
+  $ cat file
+  resolved
+  $ hg update --abort
+  aborting the update, updating back to a2b94c20eadb
+  merging file
+  merging foo
+  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
+  warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
+  update aborted
+  working directory is now at a2b94c20eadb
+  $ cat file
+  changed
+  $ cat foo
+  bar
+  $ cd ..
+
+Test with dirty subrepo
+  $ hg init repo
+  $ cd repo
+  $ echo foo > bar
+  $ hg add bar
+  $ hg commit -minitial
+  $ mkdir subrepo
+  $ cd subrepo
+  $ echo foo1 > bar1
+  $ hg add bar1
+  $ hg commit -m "initial subrepo"
+  $ echo edited > bar1
+  $ hg up 0
+  file 'subrepo/bar1' was deleted in other [destination] but was modified in 
local [working copy].
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges
+  [1]
+  $ hg update --abort
+  aborting the update, updating back to 4fa4579cc2b0
+  merging subrepo/bar1
+  warning: conflicts while merging subrepo/bar1! (edit, then use 'hg resolve 
--mark')
+  update aborted
+  working directory is now at 4fa4579cc2b0
+  $ cat bar1
+  edited
+  $ cd ..
+
+Test with not all subrepos resolved
+  $ mkdir subrepo2
+  $ cd subrepo2
+  $ echo foo2 > bar2
+  $ hg add bar2
+  $ hg commit -m "initial subrepo2"
+  $ echo bar > bar2
+  $ cd ..
+  $ cd subrepo
+  $ echo edited1 > bar1
+  $ cd ..
+  $ hg up 0
+  file 'subrepo/bar1' was deleted in other [destination] but was modified in 
local [working copy].
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
+  file 'subrepo2/bar2' was deleted in other [destination] but was modified in 
local [working copy].
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
+  0 files updated, 0 files merged, 0 files removed, 2 files unresolved
+  use 'hg resolve' to retry unresolved file merges
+  [1]
+  $ cd subrepo2
+  $ echo resolved > bar2
+  $ cat bar2
+  resolved
+  $ hg resolve --mark
+  (no more unresolved 

Re: [PATCH STABLE V2] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Joerg Sonnenberger
On Thu, Aug 22, 2019 at 02:57:04PM +0200, Raphaël Gomès wrote:
> diff -r 302dbc9d52be -r 450f65349bbe Makefile
> --- a/MakefileFri Aug 16 15:41:53 2019 +0300
> +++ b/MakefileWed Aug 21 17:56:50 2019 +0200
> @@ -16,6 +16,7 @@
>  export LC_ALL=C
>  TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
>  OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
> +CARGO=cargo
>  
>  # Set this to e.g. "mingw32" to use a non-default compiler.
>  COMPILER=

Please use ?= for CARGO too, makes it easier to override from the
command line.

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


D6734: git: RFC of a new extension to _directly_ operate on git repositories

2019-08-22 Thread durin42 (Augie Fackler)
durin42 edited the summary of this revision.
durin42 updated this revision to Diff 16293.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6734?vs=16228=16293

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6734/new/

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

AFFECTED FILES
  hgext/git/__init__.py
  hgext/git/dirstate.py
  hgext/git/gitlog.py
  hgext/git/index.py
  setup.py
  tests/test-git-interop.t

CHANGE DETAILS

diff --git a/tests/test-git-interop.t b/tests/test-git-interop.t
new file mode 100644
--- /dev/null
+++ b/tests/test-git-interop.t
@@ -0,0 +1,182 @@
+This test requires pygit2:
+  > python -c 'import pygit2' || exit 80
+
+Setup:
+  > GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
+  > GIT_AUTHOR_EMAIL='t...@example.org'; export GIT_AUTHOR_EMAIL
+  > GIT_AUTHOR_DATE="2007-01-01 00:00:00 +"; export GIT_AUTHOR_DATE
+  > GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
+  > GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
+  > GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
+
+  > count=10
+  > gitcommit() {
+  >GIT_AUTHOR_DATE="2007-01-01 00:00:$count +";
+  >GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
+  >git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
+  >count=`expr $count + 1`
+  >  }
+
+  > echo "[extensions]" >> $HGRCPATH
+  > echo "git=" >> $HGRCPATH
+
+Make a new repo with git:
+  $ mkdir foo
+  $ cd foo
+  $ git init
+  Initialized empty Git repository in $TESTTMP/foo/.git/
+Ignore the .hg directory within git:
+  $ echo .hg >> .git/info/exclude
+  $ echo alpha > alpha
+  $ git add alpha
+  $ gitcommit -am 'Add alpha'
+  $ echo beta > beta
+  $ git add beta
+  $ gitcommit -am 'Add beta'
+  $ echo gamma > gamma
+  $ git status
+  On branch master
+  Untracked files:
+(use "git add ..." to include in what will be committed)
+  
+   gamma
+  
+  nothing added to commit but untracked files present (use "git add" to track)
+
+Without creating the .hg, hg status fails:
+  $ hg status
+  abort: no repository found in '$TESTTMP/foo' (.hg not found)!
+  [255]
+But if you run hg init --git, it works:
+  $ hg init --git
+  $ hg id
+  3d9be8deba43
+  $ hg status
+  ? gamma
+Log works too:
+  $ hg log
+  changeset:   1:3d9be8deba43
+  bookmark:master
+  user:test 
+  date:Mon Jan 01 00:00:11 2007 +
+  summary: Add beta
+  
+  changeset:   0:c5864c9d16fb
+  user:test 
+  date:Mon Jan 01 00:00:10 2007 +
+  summary: Add alpha
+  
+
+
+and bookmarks:
+  $ hg bookmarks
+   * master1:3d9be8deba43
+
+diff even works transparently in both systems:
+  $ echo blah >> alpha
+  $ git diff
+  diff --git a/alpha b/alpha
+  index 4a58007..faed1b7 100644
+  --- a/alpha
+  +++ b/alpha
+  @@ -1 +1,2 @@
+   alpha
+  +blah
+  $ hg diff --git
+  diff --git a/alpha b/alpha
+  --- a/alpha
+  +++ b/alpha
+  @@ -1,1 +1,2 @@
+   alpha
+  +blah
+
+Remove a file, it shows as such:
+  $ rm alpha
+  $ hg status
+  ! alpha
+  ? gamma
+
+Revert works:
+  $ hg revert alpha --traceback
+  $ hg status
+  ? gamma
+  $ git status
+  On branch master
+  Untracked files:
+(use "git add ..." to include in what will be committed)
+  
+   gamma
+  
+  nothing added to commit but untracked files present (use "git add" to track)
+
+Add shows sanely in both:
+  $ hg add gamma
+  $ hg status
+  A gamma
+  $ git status
+  On branch master
+  Changes to be committed:
+(use "git reset HEAD ..." to unstage)
+  
+   new file:   gamma
+  
+
+forget does what it should as well:
+  $ hg forget gamma
+  $ hg status
+  ? gamma
+  $ git status
+  On branch master
+  Untracked files:
+(use "git add ..." to include in what will be committed)
+  
+   gamma
+  
+  nothing added to commit but untracked files present (use "git add" to track)
+
+hg log FILE
+
+  $ echo a >> alpha
+  $ hg ci -m 'more alpha'
+  $ echo b >> beta
+  $ hg ci -m 'more beta'
+  $ echo a >> alpha
+  $ hg ci -m 'even more alpha'
+  $ hg log -G alpha
+  @  changeset:   4:3d8853b3aed9
+  |  bookmark:master
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: even more alpha
+  |
+  o  changeset:   2:31e1d4310954
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: more alpha
+  |
+  o  changeset:   0:c5864c9d16fb
+ user:test 
+ date:Mon Jan 01 00:00:10 2007 +
+ summary: Add alpha
+  
+  $ hg log -G beta
+  o  changeset:   3:e634e4550ceb
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: more beta
+  |
+  o  changeset:   1:3d9be8deba43
+  |  user:test 
+  |  date:Mon Jan 01 00:00:11 2007 +
+  |  summary: Add beta
+  |
+
+hg annotate
+
+  $ hg annotate alpha
+  0: alpha
+  2: a
+  4: a
+  $ hg annotate beta
+  1: beta
+  3: b
diff --git a/setup.py 

D6732: localrepo: push manifestlog and changelog construction code into store

2019-08-22 Thread durin42 (Augie Fackler)
durin42 added a comment.


  I think pushing it down into the store makes a reasonable amount of sense, 
since it's going to be pretty heavily tied to the revision storage mechanism...

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6732/new/

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

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


D6747: hgit: fix some pyflakes and check-code warning

2019-08-22 Thread durin42 (Augie Fackler)
durin42 added a comment.


  Folded this and D6748  back into 6734, 
many thanks!

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6747/new/

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

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


[Bug 6188] New: zstd differences on big-endian (test-repo-compengines.t fails)

2019-08-22 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6188

Bug ID: 6188
   Summary: zstd differences on big-endian
(test-repo-compengines.t fails)
   Product: Mercurial
   Version: unspecified
  Hardware: PC
OS: Linux
Status: UNCONFIRMED
  Severity: feature
  Priority: wish
 Component: Mercurial
  Assignee: bugzi...@mercurial-scm.org
  Reporter: jcris...@debian.org
CC: mercurial-devel@mercurial-scm.org

Created attachment 2056
  --> https://bz.mercurial-scm.org/attachment.cgi?id=2056=edit
zstd-level-default/.hg/store/data/a.i from test-repo-compengines.t on s390x

Hi,

I'm not sure whether this is an issue with zstd itself, python-zstandard or
mercurial, so filing here.

Running test-repo-compengines.t on a big-endian host seems to fail consistently
(reproduced on mips and on s390x, with hg 5.1):

--- /home/jcristau/mercurial/tests/test-repo-compengines.t
+++ /home/jcristau/mercurial/tests/test-repo-compengines.t.err
@@ -171,7 +171,7 @@
   $ $RUNTESTDIR/f -s zstd-*/.hg/store/data/*
   zstd-level-1/.hg/store/data/a.i: size=4097
   zstd-level-22/.hg/store/data/a.i: size=4091
-  zstd-level-default/.hg/store/data/a.i: size=4094
+  zstd-level-default/.hg/store/data/a.i: size=4102

 Test error cases


ERROR: test-repo-compengines.t output changed

Attaching the file I get on s390x.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH STABLE V2] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Raphaël Gomès
# HG changeset patch
# User Raphaël Gomès 
# Date 1566403010 -7200
#  Wed Aug 21 17:56:50 2019 +0200
# Branch stable
# Node ID 450f65349bbe7c7a840f7ddd275defbd9f413775
# Parent  302dbc9d52beeb2ef677aa18b3fa005bbce2134e
makefile: run Rust tests if cargo is installed

While no particular minimum toolchain version is targeted as of yet, this
serves as a first step to make more people/machines run the Rust tests.

diff -r 302dbc9d52be -r 450f65349bbe Makefile
--- a/Makefile  Fri Aug 16 15:41:53 2019 +0300
+++ b/Makefile  Wed Aug 21 17:56:50 2019 +0200
@@ -16,6 +16,7 @@
 export LC_ALL=C
 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
+CARGO=cargo
 
 # Set this to e.g. "mingw32" to use a non-default compiler.
 COMPILER=
@@ -110,7 +111,11 @@
 check: tests
 
 tests:
-   cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
+   # Run Rust tests if cargo is installed
+   if command -v $(CARGO) >/dev/null 2>&1; then \
+   cd $(HGROOT)/rust/hg-cpython && $(CARGO) test --quiet --all; \
+   fi;
+   cd tests && $(PYTHON) run-tests.py $(TESTFLAGS);
 
 test-%:
cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Raphaël Gomès

That makes it easier indeed, thanks.

On 8/22/19 2:50 PM, Yuya Nishihara wrote:

On Thu, 22 Aug 2019 21:41:40 +0900, Yuya Nishihara wrote:

On Thu, 22 Aug 2019 07:47:30 +0200, Raphaël Gomès wrote:

I'm not sure I agree, checking for execute this way seems very common
and looks more semantic to me.

[ -x path ] is valid, but why do you want to test the result of
`command -v cmd` again? It maybe an empty string if the cmd doesn't exist.

According to the doc, we can simply test the exit code.

   if command -v cargo >/dev/null 2>&1; then

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html

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


D6756: rust-utils: add normalize_case util to mirror Python one

2019-08-22 Thread Raphaël Gomès
Alphare created this revision.
Herald added subscribers: mercurial-devel, kevincox, durin42.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  While we still don't handle filenames properly cross-platform, this at least
  sticks closer to the Python behavior.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  rust/hg-core/src/dirstate/dirstate_map.rs
  rust/hg-core/src/utils/files.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/utils/files.rs b/rust/hg-core/src/utils/files.rs
--- a/rust/hg-core/src/utils/files.rs
+++ b/rust/hg-core/src/utils/files.rs
@@ -71,6 +71,15 @@
 dirs
 }
 
+/// TODO improve handling of utf8 file names. Our overall strategy for
+/// filenames has to be revisited anyway, since Windows is UTF-16.
+pub fn normalize_case(bytes: &[u8]) -> Vec {
+#[cfg(windows)] // NTFS compares via upper()
+return bytes.to_ascii_uppercase();
+#[cfg(unix)]
+bytes.to_ascii_lowercase()
+}
+
 #[cfg(test)]
 mod tests {
 #[test]
diff --git a/rust/hg-core/src/dirstate/dirstate_map.rs 
b/rust/hg-core/src/dirstate/dirstate_map.rs
--- a/rust/hg-core/src/dirstate/dirstate_map.rs
+++ b/rust/hg-core/src/dirstate/dirstate_map.rs
@@ -7,9 +7,10 @@
 
 use crate::{
 dirstate::{parsers::PARENT_SIZE, EntryState},
-pack_dirstate, parse_dirstate, CopyMap, DirsMultiset, DirstateEntry,
-DirstateError, DirstateMapError, DirstateParents, DirstateParseError,
-StateMap,
+pack_dirstate, parse_dirstate,
+utils::files::normalize_case,
+CopyMap, DirsMultiset, DirstateEntry, DirstateError, DirstateMapError,
+DirstateParents, DirstateParseError, StateMap,
 };
 use core::borrow::Borrow;
 use std::collections::{HashMap, HashSet};
@@ -127,7 +128,7 @@
 }
 
 if let Some(ref mut file_fold_map) = self.file_fold_map {
-file_fold_map.remove(_ascii_uppercase());
+file_fold_map.remove(_case(filename));
 }
 self.state_map.insert(
 filename.to_owned(),
@@ -162,7 +163,7 @@
 }
 }
 if let Some(ref mut file_fold_map) = self.file_fold_map {
-file_fold_map.remove(_ascii_uppercase());
+file_fold_map.remove(_case(filename));
 }
 self.non_normal_set.remove(filename);
 
@@ -326,10 +327,8 @@
 for (filename, DirstateEntry { state, .. }) in self.state_map.borrow()
 {
 if *state == EntryState::Removed {
-new_file_fold_map.insert(
-filename.to_ascii_uppercase().to_owned(),
-filename.to_owned(),
-);
+new_file_fold_map
+.insert(normalize_case(filename), filename.to_owned());
 }
 }
 self.file_fold_map = Some(new_file_fold_map);



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


Re: [PATCH] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Yuya Nishihara
On Thu, 22 Aug 2019 21:41:40 +0900, Yuya Nishihara wrote:
> On Thu, 22 Aug 2019 07:47:30 +0200, Raphaël Gomès wrote:
> > I'm not sure I agree, checking for execute this way seems very common 
> > and looks more semantic to me.
> 
> [ -x path ] is valid, but why do you want to test the result of
> `command -v cmd` again? It maybe an empty string if the cmd doesn't exist.

According to the doc, we can simply test the exit code.

  if command -v cargo >/dev/null 2>&1; then

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Yuya Nishihara
On Thu, 22 Aug 2019 07:47:30 +0200, Raphaël Gomès wrote:
> I'm not sure I agree, checking for execute this way seems very common 
> and looks more semantic to me.

[ -x path ] is valid, but why do you want to test the result of
`command -v cmd` again? It maybe an empty string if the cmd doesn't exist.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-22 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.
navaneeth.suresh marked 2 inline comments as done.

INLINE COMMENTS

> navaneeth.suresh wrote in exchange.py:1044
> `ctx = pushop.repo[node]` is needed to check the phase of the ctx. also, 
> iiuc, if i write `if a and b: pass` in python, both a and b are evaluated 
> before performing the comparison. iiuc, when ctx is `None`, `ctx.phase()` 
> won't exist as `ctx = repo[None]` is not actually a changeset but, the 
> uncommitted changes in the working directory instead. if we need to skip the 
> return, we need to have the `ctx = pushop.repo[node]` inside the `if` 
> statement. but, for me, skipping the further evaluation earlier using a 
> `return` without the nested `if` with more alignment sounds good.

@pulkit i have updated as you suggested to get rid of all returns. sorry for 
being vague, thanks for the suggestion.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6731/new/

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-22 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16291.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6731?vs=16267=16291

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6731/new/

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1345,38 +1345,27 @@
   $ hg log -r . --template '{node}'
   cf489fd8a374cab73c2dc19e899bde6fe3a43f8f (no-eol)
 
+Create a bookmark that points to a non-secret changeset
+  $ hg bookmark bar
+  $ echo c > c
+  $ hg ci -Am_
+  adding c
 
 Pushing the bookmark "foo" now fails as it contains a secret changeset
 #if b2-pushkey
-  $ hg push -r foo
+  $ hg push
   pushing to $TESTTMP/issue6159remote
   searching for changes
-  no changes found (ignored 1 secret changesets)
-  abort: updating bookmark foo failed!
+  no changes found (ignored 2 secret changesets)
+  abort: cannot push bookmark foo as it points to a secret changeset
   [255]
 #endif
 
 #if b2-binary
-  $ hg push -r foo
+  $ hg push
   pushing to $TESTTMP/issue6159remote
   searching for changes
-  no changes found (ignored 1 secret changesets)
-  updating bookmark foo
-  [1]
+  no changes found (ignored 2 secret changesets)
+  abort: cannot push bookmark foo as it points to a secret changeset
+  [255]
 #endif
-
-Now the "remote" repo contains a bookmark pointing to a nonexistent revision
-$ cd ../issue6159remote
-#if b2-pushkey
-  $ hg bookmark
-   * foo   1:cf489fd8a374
-  $ hg log -r cf489fd8a374
-  1:cf489fd8a374 _ (no-eol)
-#endif
-
-#if b2-binary
-  $ hg bookmark
-   * foo   1:cf489fd8a374
-  $ hg log -r cf489fd8a374
-  1:cf489fd8a374 _ (no-eol)
-#endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,12 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if node and pushop.repo[node].phase() == phases.secret:
+raise error.Abort(_('cannot push bookmark %s as it points to a secret'
+' changeset') % b)
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1048,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1077,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6709: config: add --registered flag to show all known configs

2019-08-22 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16290.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16286=16290

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6709/new/

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  

Re: [PATCH STABLE] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Joerg Sonnenberger
On Thu, Aug 22, 2019 at 08:08:07AM +0200, Raphaël Gomès wrote:
> # HG changeset patch
> # User Raphaël Gomès 
> # Date 1566403010 -7200
> #  Wed Aug 21 17:56:50 2019 +0200
> # Branch stable
> # Node ID 8b57d53e4b0c4d84962c945ee179e3aa6c231c9f
> # Parent  302dbc9d52beeb2ef677aa18b3fa005bbce2134e
> makefile: run Rust tests if cargo is installed
> 
> While no particular minimum toolchain version is targeted as of yet, this
> serves as a first step to make more people/machines run the Rust tests.
> 
> diff -r 302dbc9d52be -r 8b57d53e4b0c Makefile
> --- a/MakefileFri Aug 16 15:41:53 2019 +0300
> +++ b/MakefileWed Aug 21 17:56:50 2019 +0200
> @@ -16,6 +16,7 @@
>  export LC_ALL=C
>  TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
>  OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
> +CARGO=cargo
>  
>  # Set this to e.g. "mingw32" to use a non-default compiler.
>  COMPILER=
> @@ -110,7 +111,11 @@
>  check: tests
>  
>  tests:
> - cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
> +  # Run Rust tests if cargo is installed
> + if [ -x "$$(command -v $(CARGO))" ]; then \
> + cd $(HGROOT)/rust/hg-cpython && $(CARGO) test --quiet --all; \
> + fi;
> + cd tests && $(PYTHON) run-tests.py $(TESTFLAGS);
>  
>  test-%:
>   cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@

Tabs?

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


Re: [PATCH] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Raphaël Gomès
Good catch. I somehow screwed up twice in the same patch with the 
comment and this bit. The original patch did not even apply locally, go 
figure. My follow up should address that.


On 8/22/19 6:44 AM, Anton Shestakov wrote:

On Wed, 21 Aug 2019 18:09:33 +0200
Raphaël Gomès  wrote:


# HG changeset patch
# User Raphaël Gomès 
# Date 1566403010 -7200
#  Wed Aug 21 17:56:50 2019 +0200
# Branch stable
# Node ID 5b9efc6098154fb5079f06b3c485b58363e0f43d
# Parent  302dbc9d52beeb2ef677aa18b3fa005bbce2134e
makefile: run Rust tests if cargo is installed

While no particular minimum toolchain version is targeted as of yet, this
serves as a first step to make more people/machines run the Rust tests.

diff -r 302dbc9d52be -r 5b9efc609815 Makefile
--- a/Makefile  Fri Aug 16 15:41:53 2019 +0300
+++ b/Makefile  Wed Aug 21 17:56:50 2019 +0200
@@ -110,8 +110,11 @@
  check: tests
  
  tests:

-   cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
-
+   if [ -x "$$(command -v cargo)" ]; then \
+   # Run Rust tests if cargo is installed
+   cd $(HGROOT)/rust/hg-cpython && cargo test --quiet --all; \
+   fi;
+   cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) && \
  test-%:

I most likely forgot all the intricacies of make syntax, but this looks
like a shell command is getting chained by && with a make target?

Also an unrelated change removes an empty line between "tests" and
"test-%" targets.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

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


[PATCH STABLE] makefile: run Rust tests if cargo is installed

2019-08-22 Thread Raphaël Gomès
# HG changeset patch
# User Raphaël Gomès 
# Date 1566403010 -7200
#  Wed Aug 21 17:56:50 2019 +0200
# Branch stable
# Node ID 8b57d53e4b0c4d84962c945ee179e3aa6c231c9f
# Parent  302dbc9d52beeb2ef677aa18b3fa005bbce2134e
makefile: run Rust tests if cargo is installed

While no particular minimum toolchain version is targeted as of yet, this
serves as a first step to make more people/machines run the Rust tests.

diff -r 302dbc9d52be -r 8b57d53e4b0c Makefile
--- a/Makefile  Fri Aug 16 15:41:53 2019 +0300
+++ b/Makefile  Wed Aug 21 17:56:50 2019 +0200
@@ -16,6 +16,7 @@
 export LC_ALL=C
 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
+CARGO=cargo
 
 # Set this to e.g. "mingw32" to use a non-default compiler.
 COMPILER=
@@ -110,7 +111,11 @@
 check: tests
 
 tests:
-   cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
+  # Run Rust tests if cargo is installed
+   if [ -x "$$(command -v $(CARGO))" ]; then \
+   cd $(HGROOT)/rust/hg-cpython && $(CARGO) test --quiet --all; \
+   fi;
+   cd tests && $(PYTHON) run-tests.py $(TESTFLAGS);
 
 test-%:
cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel