D6633: rust-dirstate: rust-cpython bridge for dirstatemap

2019-08-16 Thread yuja (Yuya Nishihara)
yuja added a comment.


  > +def getdirs(&self) -> PyResult {
  > +// TODO don't copy, share the reference
  > +self.inner(py).borrow_mut().set_dirs();
  > +Dirs::from_inner(
  > +py,
  > +DirsMultiset::new(
  > +DirsIterable::Dirstate(&self.inner(py).borrow()),
  > +Some(EntryState::Removed),
  > +),
  > +)
  > +}
  > +def getalldirs(&self) -> PyResult {
  > +// TODO don't copy, share the reference
  > +self.inner(py).borrow_mut().set_all_dirs();
  > +Dirs::from_inner(
  > +py,
  > +DirsMultiset::new(
  > +DirsIterable::Dirstate(&self.inner(py).borrow()),
  > +None,
  > +),
  > +)
  > +}
  
  How do these set_dirs/set_all_dirs work? IIUC, the return value is built
  from state_map.

REPOSITORY
  rHG Mercurial

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

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

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


Re: D6633: rust-dirstate: rust-cpython bridge for dirstatemap

2019-08-16 Thread Yuya Nishihara
> +def getdirs(&self) -> PyResult {
> +// TODO don't copy, share the reference
> +self.inner(py).borrow_mut().set_dirs();
> +Dirs::from_inner(
> +py,
> +DirsMultiset::new(
> +DirsIterable::Dirstate(&self.inner(py).borrow()),
> +Some(EntryState::Removed),
> +),
> +)
> +}
> +def getalldirs(&self) -> PyResult {
> +// TODO don't copy, share the reference
> +self.inner(py).borrow_mut().set_all_dirs();
> +Dirs::from_inner(
> +py,
> +DirsMultiset::new(
> +DirsIterable::Dirstate(&self.inner(py).borrow()),
> +None,
> +),
> +)
> +}

How do these set_dirs/set_all_dirs work? IIUC, the return value is built
from state_map.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial@42745: 3 new changesets

2019-08-16 Thread Mercurial Commits
3 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/8c9a6adec67a
changeset:   42743:8c9a6adec67a
user:Georges Racinet 
date:Tue Apr 16 01:16:39 2019 +0200
summary: rust-discovery: using the children cache in add_missing

https://www.mercurial-scm.org/repo/hg/rev/c5748c6969b9
changeset:   42744:c5748c6969b9
user:Georges Racinet on percheron.racinet.fr 
date:Tue May 21 12:46:38 2019 +0200
summary: rust-discovery: optimization of add commons/missings for empty 
arguments

https://www.mercurial-scm.org/repo/hg/rev/4d20b1fe8a72
changeset:   42745:4d20b1fe8a72
bookmark:@
tag: tip
user:Georges Racinet 
date:Wed Feb 20 09:04:54 2019 +0100
summary: rust-discovery: using from Python code

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


mercurial@42742: 4 new changesets (1 on stable)

2019-08-16 Thread Mercurial Commits
4 new changesets (1 on stable) in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/302dbc9d52be
changeset:   42739:302dbc9d52be
branch:  stable
parent:  42715:f59f8a5e9096
user:Augie Fackler 
date:Fri Aug 16 15:41:53 2019 +0300
summary: tests: use `tr -d` and not `tr --delete` as the latter is absent 
on BSD tr(1)

https://www.mercurial-scm.org/repo/hg/rev/1c4b5689bef5
changeset:   42740:1c4b5689bef5
parent:  42738:8041a1b45163
user:Georges Racinet 
date:Fri May 17 01:56:57 2019 +0200
summary: rust-discovery: exposing sampling to python

https://www.mercurial-scm.org/repo/hg/rev/4e7bd6180b53
changeset:   42741:4e7bd6180b53
user:Georges Racinet 
date:Tue May 21 17:43:55 2019 +0200
summary: rust-discovery: optionally don't randomize at all, for tests

https://www.mercurial-scm.org/repo/hg/rev/334c1ea57136
changeset:   42742:334c1ea57136
bookmark:@
tag: tip
user:Georges Racinet 
date:Tue May 21 17:44:15 2019 +0200
summary: discovery: new devel.discovery.randomize option

-- 
Repository URL: https://www.mercurial-scm.org/repo/hg
___
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-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16229.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16220&id=16229

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
+  p

Re: [PATCH 2 of 2] rust-discovery: use while loop instead of match + break

2019-08-16 Thread Augie Fackler
queued, thanks

> On Aug 16, 2019, at 07:28, Yuya Nishihara  wrote:
> 
> # HG changeset patch
> # User Yuya Nishihara 
> # Date 1565948045 -32400
> #  Fri Aug 16 18:34:05 2019 +0900
> # Node ID 7c07a39ae2557c7a41a56ff2552ae635b8c5d880
> # Parent  efcd5928d84224dea38b08d1dc1e135b91e0c045
> rust-discovery: use while loop instead of match + break
> 
> This looks slightly nicer.
> 
> diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs
> --- a/rust/hg-core/src/discovery.rs
> +++ b/rust/hg-core/src/discovery.rs
> @@ -65,13 +65,7 @@ where
> let mut visit: VecDeque = heads.into_iter().collect();
> let mut factor: u32 = 1;
> let mut seen: HashSet = HashSet::new();
> -loop {
> -let current = match visit.pop_front() {
> -None => {
> -break;
> -}
> -Some(r) => r,
> -};
> +while let Some(current) = visit.pop_front() {
> if !seen.insert(current) {
> continue;
> }
> ___
> 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


Re: Interest in integrating hg-git into Mercurial

2019-08-16 Thread Augie Fackler


> On Aug 1, 2019, at 22:30, Gregory Szorc  wrote:
> 
> On Thu, Aug 1, 2019 at 10:38 AM Augie Fackler  wrote:
> 
> 
> > On Aug 1, 2019, at 13:01, Gregory Szorc  wrote:
> > 
> > Is there any interest in integrating hg-git (or hg-git functionality) into 
> > the Mercurial distribution as an officially supported extension?
> > 
> > Given the popularity of Git and the difficulty of installing semi-complex 
> > Python software like hg-git, I was thinking it would be beneficial to 
> > end-users for Mercurial to support interacting with Git repositories 
> > out-of-the-box with as little set-up pain as possible. hg-git feels like 
> > the path of least resistance towards attaining that goal. (I would 
> > eventually like to see support for Mercurial opening Git repositories 
> > natively. While I think this is technically viable, it is probably a year 
> > or two away, as it needs significant work to shore up Mercurial's storage 
> > interfaces and internal code contracts to support such a significant 
> > invariant as interfacing with Git repositories.)
> > 
> > Vendoring hg-git would like also entail vendoring its dependencies: 
> > urllib3, certifi, and dulwich. Vendoring urllib3 and certifi is probably 
> > not the worst thing in the world, as it would give us an excuse to refactor 
> > Mercurial's HTTP internals to move off the ugly hacks we employ to use 
> > Python's standard library.
> > 
> > I'm not promising I will follow through and do this work. At this time I'm 
> > mostly interested in taking a quick pulse to see if there is any interest 
> > in doing it. If there is general support, I may follow through :)
> 
> I'm semi-enthusiastic, but I'd rather we took a storage-abstraction approach 
> than the hg-git "convert the repo" approach. With our newfound storage 
> abstractions, I think it's reasonable to index a git repository and present 
> its data in an hg-friendly format. A few places in hg would likely need 
> patching to handle more than two parents in a merge, but other than that I 
> think things basically work.
> 
> I would prefer we interface with Git repositories using the storage 
> abstraction and not have to maintain a shadow Mercurial repository as well. 
> And I do think that is technically viable.

For your consideration, a (crude) prototype: phab.mercurial-scm.org/D6734

It's a hack, but that's under a week of hacking, even when I try to account for 
the reuse of code I had laying around. You're right that octopus merges will be 
a pain, but it looks like rationalizing the dirstate interface is the real big 
hassle at the moment. I suspect we could dummy up octopus merges with some 
weird hash tricks...

> But I think there is a long, long tail of issues that will prevent that from 
> working as robustly as we all want it to - and as many end-users will want it 
> to. The handling of octopus merges alone will be a giant PITA because there 
> is code all over Mercurial that assumes exactly 2 parents. Plus, the storage 
> abstraction work stopped short of the changelog and locks/transactions, which 
> I think will be the hardest parts to abstract. I think there's a lot of work 
> there and we shouldn't block Git repo integration on solving that general 
> problem.
> 
> If we were to move forward with integrating hg-git, I would do so by making 
> the hg<->git repo coupling stronger. For example, I would install hooks into 
> the Git repository that prevented mutations unless Mercurial were driving 
> them (e.g. by looking for the presence of an environment variable). And I 
> would define repo requirements that denoted special behavior in the presence 
> of an associated Git repository. This would be designed such that in a future 
> world one could run `hg debugupgraderepo` and replace the Mercurial full 
> conversion repo with storage abstractions that allow us to write directly 
> into the Git repo.

My worry is that hg-git is a tortured codebase, and I'm not sure the effort 
necessary to bring it up to sane standards for core is well-spent when it feels 
like we're _really close_ to having small-to-medium repositories working.

>  Note that I'm also willing to try and push this forward, and have some 
> experimental hacks lying around that should make a proof of concept fairly 
> easy. The reaction at the last sprint took away some of my enthusiasm, but if 
> people are receptive to the idea I'll carve out some time in August...
> 
> (I think your "a year or two" estimate is pessimistic on this front: I think 
> it could be done very quickly by indexing the git repo at load time, and the 
> indexing can be made reasonably quick, especially given that I had this 
> _working_ in the 3.x era, albeit slowly.)
> 
> > ___
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> 

___
Mercurial-devel mailing list
Merc

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

2019-08-16 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is _extremely_ rough, but I feel like it's a worthwhile proof of
  concept to help us push interfaces in the direction required to just
  make this work for real.
  
  This is based in part of work I did years ago in hgit, but it's mostly
  new code since I'm using pygit2 instead of dulwich and the hg storage
  interfaces have improved.
  
  test-git-interop.t does not fully pass, and this exposes some pretty
  rough edges on some of our interfaces (eg bookmarks need to be
  reworked to be clean, dirstate needs to be indirected and given a
  proper interface), but overall as an RFC I feel like this is a good
  starting place.
  
  To get this test to pass, we need to figure out (at minimum):
  
  - writing back to git dirstate objects (aka the index)
  - fix bookmarks handling
  - creating commits (which implies moving refs)
  - fill in more of the filelog implementation, including linkrevs
  
  This is _not_ production quality code: this is an experimental hack to
  try and push us towards this approach over the hg-git approach.

REPOSITORY
  rHG Mercurial

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
+ 

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

2019-08-16 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This feels substantially more appropriate, as the store is actually
  the layer with knowledge of how to handle this storage. I didn't move
  the caching decorators for now because that's going to require some
  more involved work, and this unblocks my current experimentation.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/localrepo.py
  mercurial/store.py

CHANGE DETAILS

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -15,7 +15,9 @@
 
 from .i18n import _
 from . import (
+changelog,
 error,
+manifest,
 node,
 policy,
 pycompat,
@@ -379,6 +381,14 @@
 l.sort()
 return l
 
+def changelog(self, trypending):
+return changelog.changelog(self.vfs, trypending=trypending)
+
+def manifestlog(self, repo, storenarrowmatch):
+rootstore = manifest.manifestrevlog(self.vfs)
+return manifest.manifestlog(
+self.vfs, repo, rootstore, storenarrowmatch)
+
 def datafiles(self, matcher=None):
 return self._walk('data', True) + self._walk('meta', True)
 
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -28,7 +28,6 @@
 branchmap,
 bundle2,
 changegroup,
-changelog,
 color,
 context,
 dirstate,
@@ -41,7 +40,6 @@
 filelog,
 hook,
 lock as lockmod,
-manifest,
 match as matchmod,
 merge as mergemod,
 mergeutil,
@@ -1300,14 +1298,11 @@
 
 @storecache('00changelog.i')
 def changelog(self):
-return changelog.changelog(self.svfs,
-   
trypending=txnutil.mayhavepending(self.root))
+return self.store.changelog(txnutil.mayhavepending(self.root))
 
 @storecache('00manifest.i')
 def manifestlog(self):
-rootstore = manifest.manifestrevlog(self.svfs)
-return manifest.manifestlog(self.svfs, self, rootstore,
-self._storenarrowmatch)
+return self.store.manifestlog(self, self._storenarrowmatch)
 
 @repofilecache('dirstate')
 def dirstate(self):



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


D6733: setup: fix a sorting issue I noticed in package names

2019-08-16 Thread durin42 (Augie Fackler)
durin42 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/D6733

AFFECTED FILES
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1078,8 +1078,8 @@
 'hgext', 'hgext.convert', 'hgext.fsmonitor',
 'hgext.fastannotate',
 'hgext.fsmonitor.pywatchman',
+'hgext.highlight',
 'hgext.infinitepush',
-'hgext.highlight',
 'hgext.largefiles', 'hgext.lfs', 'hgext.narrow',
 'hgext.remotefilelog',
 'hgext.zeroconf', 'hgext3rd',



To: durin42, #hg-reviewers
Cc: 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-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Until now, if there is a bookmark points to a changeset which is in secret
  phase, hg will push the bookmark, but not the changeset referenced by that
  bookmark. This leaves the server bookmarks in a bad state, because that
  bookmark now points to a revision that does not exist on the server. This
  patch makes hg to abort on such cases.

REPOSITORY
  rHG Mercurial

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
@@ -1322,3 +1322,42 @@
   abort: push failed on remote
   [255]
 #endif
+
+-- test for stop pushing bookmarks pointing to secret changesets
+
+Set up a "remote" repo
+  $ hg init issue6159remote
+  $ cd issue6159remote
+  $ echo a > a
+  $ hg add a
+  $ hg commit -m_
+  $ hg bookmark foo
+  $ cd ..
+
+Clone a local repo
+  $ hg clone -q issue6159remote issue6159local
+  $ cd issue6159local
+  $ hg up -qr foo
+  $ echo b > b
+
+Move the bookmark "foo" to point at a secret changeset
+  $ hg commit -qAm_
+  $ hg phase -s -f
+
+Pushing the bookmark "foo" now fails as it contains a secret changeset
+#if b2-pushkey
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: bookmark foo points to a secret changeset
+  [255]
+#endif
+#if b2-binary
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: bookmark foo points to a secret changeset
+  [255]
+#endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,15 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if not node:
+return False
+ctx = pushop.repo[node]
+if ctx.phase() == phases.secret:
+raise error.Abort(_('bookmark %s points to a secret changeset') % b)
+return False
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1051,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 +1080,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: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH hg-website] who: remove Python, OpenSolaris and add nginx

2019-08-16 Thread Pulkit Goyal
On Fri, Jul 26, 2019 at 3:40 PM David Demelier  wrote:
>
> # HG changeset patch
> # User David Demelier 
> # Date 1564144028 -7200
> #  Fri Jul 26 14:27:08 2019 +0200
> # Node ID 1bf7e259ffb1b212152eb155803984b1ad9118a0
> # Parent  e3a73084715ab55f78f1c75474a89bed5e485f63
> who: remove Python, OpenSolaris and add nginx

Queued this, many thanks!
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[Bug 6186] New: test-merge-combination.t test failure: unportable tr(1) usage

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

Bug ID: 6186
   Summary: test-merge-combination.t test failure: unportable
tr(1) usage
   Product: Mercurial
   Version: 5.1
  Hardware: All
OS: NetBSD
Status: UNCONFIRMED
  Severity: bug
  Priority: wish
 Component: Mercurial
  Assignee: bugzi...@mercurial-scm.org
  Reporter: t...@giga.or.at
CC: mercurial-devel@mercurial-scm.org

The test-merge-combination test fails on NetBSD because its tr(1) does not
support '--' (I think):

---
/scratch/devel/py-mercurial/work/mercurial-5.1/tests/test-merge-combination.t
+++
/scratch/devel/py-mercurial/work/mercurial-5.1/tests/test-merge-combination.t.err
@@ -89,57 +89,317 @@
   > }

   $ genmerges
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
     : agree on ""
-  1112  : agree on "a"
-  111-  : agree on "a"
-  1121  : agree on "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1112  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  111-  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1121  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
   1122  : agree on ""
-  1123  : agree on "a"
-  112-  : agree on "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1123  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  112-  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
   11-1  : hg said "", expected "a"
-  11-2  : agree on "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  11-2  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
   11--  : agree on ""
-  1211  : agree on "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1211  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
   1212  : agree on ""
-  1213  : agree on "a"
-  121-  : agree on "a"
-  1221  : agree on "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1213  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  121-  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1221  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
   1222  : agree on ""
-  1223  : agree on "a"
-  122-  : agree on "a"
-  1231 C: agree on "a"
-  1232 C: agree on "a"
-  1233 C: agree on "a"
-  1234 C: agree on "a"
-  123- C: agree on "a"
-  12-1 C: agree on "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1223  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  122-  : hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ tr [-c] -s string1
+ tr [-c] -ds string1 string2
+  1231 C: hg said "", expected "a"
+  tr: unknown option -- -
+  usage: tr [-cs] string1 string2
+ tr [-c] -d string1
+ t

[PATCH 2 of 2] rust-discovery: use while loop instead of match + break

2019-08-16 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1565948045 -32400
#  Fri Aug 16 18:34:05 2019 +0900
# Node ID 7c07a39ae2557c7a41a56ff2552ae635b8c5d880
# Parent  efcd5928d84224dea38b08d1dc1e135b91e0c045
rust-discovery: use while loop instead of match + break

This looks slightly nicer.

diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs
--- a/rust/hg-core/src/discovery.rs
+++ b/rust/hg-core/src/discovery.rs
@@ -65,13 +65,7 @@ where
 let mut visit: VecDeque = heads.into_iter().collect();
 let mut factor: u32 = 1;
 let mut seen: HashSet = HashSet::new();
-loop {
-let current = match visit.pop_front() {
-None => {
-break;
-}
-Some(r) => r,
-};
+while let Some(current) = visit.pop_front() {
 if !seen.insert(current) {
 continue;
 }
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 1 of 2] rust-discovery: remove useless extern crate

2019-08-16 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1565947877 -32400
#  Fri Aug 16 18:31:17 2019 +0900
# Node ID efcd5928d84224dea38b08d1dc1e135b91e0c045
# Parent  e67d9b6bad4df2eaaf7544de8a39f41a3c08e2c2
rust-discovery: remove useless extern crate

diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs
--- a/rust/hg-core/src/discovery.rs
+++ b/rust/hg-core/src/discovery.rs
@@ -10,17 +10,15 @@
 //! This is a Rust counterpart to the `partialdiscovery` class of
 //! `mercurial.setdiscovery`
 
-extern crate rand;
-extern crate rand_pcg;
-use self::rand::seq::SliceRandom;
-use self::rand::{thread_rng, RngCore, SeedableRng};
 use super::{Graph, GraphError, Revision, NULL_REVISION};
 use crate::ancestors::MissingAncestors;
 use crate::dagops;
+use rand::seq::SliceRandom;
+use rand::{thread_rng, RngCore, SeedableRng};
 use std::cmp::{max, min};
 use std::collections::{HashMap, HashSet, VecDeque};
 
-type Rng = self::rand_pcg::Pcg32;
+type Rng = rand_pcg::Pcg32;
 
 pub struct PartialDiscovery {
 target_heads: Option>,
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6695: transplant: added support for --stop flag

2019-08-16 Thread taapas1128 (Taapas Agrawal)
Closed by commit rHG4d10aada6c3b: transplant: added support for --stop flag 
(authored by taapas1128).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6695?vs=16215&id=16223

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

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

AFFECTED FILES
  hgext/transplant.py
  tests/test-transplant.t

CHANGE DETAILS

diff --git a/tests/test-transplant.t b/tests/test-transplant.t
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -2,6 +2,7 @@
   $ cat <> $HGRCPATH
   > [extensions]
   > transplant=
+  > graphlog=
   > EOF
 
 #if continueflag
@@ -19,6 +20,9 @@
   $ hg transplant --continue --all
   abort: --continue is incompatible with --branch, --all and --merge
   [255]
+  $ hg transplant --stop --all
+  abort: --stop is incompatible with --branch, --all and --merge
+  [255]
   $ hg transplant --all tip
   abort: --all requires a branch revision
   [255]
@@ -376,7 +380,8 @@
   applying 722f4667af76
   722f4667af76 transplanted to 76e321915884
 
-transplant --continue
+
+transplant --continue and --stop behaviour
 
   $ hg init ../tc
   $ cd ../tc
@@ -416,6 +421,36 @@
   $ echo foobar > foo
   $ hg ci -mfoobar
   created new head
+
+Repo log before transplant
+  $ hg glog
+  @  changeset:   4:e8643552fde5
+  |  tag: tip
+  |  parent:  0:493149fa1541
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: foobar
+  |
+  | o  changeset:   3:1dab759070cf
+  | |  user:test
+  | |  date:Thu Jan 01 00:00:00 1970 +
+  | |  summary: bar2
+  | |
+  | o  changeset:   2:9d6d6b5a8275
+  | |  user:test
+  | |  date:Thu Jan 01 00:00:00 1970 +
+  | |  summary: bar
+  | |
+  | o  changeset:   1:46ae92138f3c
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: foo2
+  |
+  o  changeset:   0:493149fa1541
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: foo
+  
   $ hg transplant 1:3
   applying 46ae92138f3c
   patching file foo
@@ -425,6 +460,49 @@
   abort: fix up the working directory and run hg transplant --continue
   [255]
 
+  $ hg transplant --stop
+  stopped the interrupted transplant
+  working directory is now at e8643552fde5
+Repo log after abort
+  $ hg glog
+  @  changeset:   4:e8643552fde5
+  |  tag: tip
+  |  parent:  0:493149fa1541
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: foobar
+  |
+  | o  changeset:   3:1dab759070cf
+  | |  user:test
+  | |  date:Thu Jan 01 00:00:00 1970 +
+  | |  summary: bar2
+  | |
+  | o  changeset:   2:9d6d6b5a8275
+  | |  user:test
+  | |  date:Thu Jan 01 00:00:00 1970 +
+  | |  summary: bar
+  | |
+  | o  changeset:   1:46ae92138f3c
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: foo2
+  |
+  o  changeset:   0:493149fa1541
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: foo
+  
+  $ hg transplant 1:3
+  applying 46ae92138f3c
+  file added already exists
+  1 out of 1 hunks FAILED -- saving rejects to file added.rej
+  patching file foo
+  Hunk #1 FAILED at 0
+  1 out of 1 hunks FAILED -- saving rejects to file foo.rej
+  patch failed to apply
+  abort: fix up the working directory and run hg transplant --continue
+  [255]
+
 transplant -c shouldn't use an old changeset
 
   $ hg up -C
@@ -436,6 +514,9 @@
   abort: no transplant to continue (continueflag !)
   abort: no operation in progress (no-continueflag !)
   [255]
+  $ hg transplant --stop
+  abort: no interrupted transplant found
+  [255]
   $ hg transplant 1
   applying 46ae92138f3c
   patching file foo
@@ -489,23 +570,23 @@
   [255]
   $ hg transplant 1:3
   abort: transplant in progress
-  (use 'hg transplant --continue' or 'hg update' to abort)
+  (use 'hg transplant --continue' or 'hg transplant --stop')
   [255]
   $ hg status -v
   A bar
+  ? added.rej
   ? baz.rej
   ? foo.rej
   # The repository is in an unfinished *transplant* state.
   
   # To continue:hg transplant --continue
-  # To abort:   hg update
+  # To stop:hg transplant --stop
   
   $ echo fixed > baz
   $ hg continue
   9d6d6b5a8275 transplanted as d80c49962290
   applying 1dab759070cf
   1dab759070cf transplanted to aa0ffe6bd5ae
-
   $ cd ..
 
 Issue: Test transplant --merge
diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -412,6 +412,17 @@
 # this is kept only to reduce changes in a patch.
 pass
 
+def stop(self, ui, repo):
+"""logic to stop an interrupted transplant"""
+if self.canresume():
+startctx = repo['.']
+hg.updaterepo(re

D6699: unshelve: abort on using --keep and --interactive together

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG4b0c9d47f714: unshelve: abort on using --keep and 
--interactive together (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6699?vs=16211&id=16222

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

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

AFFECTED FILES
  mercurial/shelve.py
  tests/test-shelve.t

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1475,3 +1475,7 @@
   record this change to 'bar2'?
   (enter ? for help) [Ynesfdaq?] y
   
+-- test for --interactive --keep
+  $ hg unshelve -i --keep
+  abort: --keep on --interactive is not yet supported
+  [255]
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -942,6 +942,8 @@
 if opts.get("name"):
 shelved.append(opts["name"])
 
+if interactive and opts.get('keep'):
+raise error.Abort(_('--keep on --interactive is not yet supported'))
 if abortf or continuef:
 if abortf and continuef:
 raise error.Abort(_('cannot use both abort and continue'))



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


mercurial@42738: 2 new changesets

2019-08-16 Thread Mercurial Commits
2 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/388622cbc911
changeset:   42737:388622cbc911
user:Georges Racinet 
date:Fri May 17 01:56:56 2019 +0200
summary: rust-discovery: core implementation for take_quick_sample()

https://www.mercurial-scm.org/repo/hg/rev/8041a1b45163
changeset:   42738:8041a1b45163
bookmark:@
tag: tip
user:Georges Racinet 
date:Fri May 17 01:56:57 2019 +0200
summary: rust-discovery: takefullsample() core implementation

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


D6729: tests: use `tr -d` and not `tr --delete` since the latter is absent on BSD tr(1)

2019-08-16 Thread durin42 (Augie Fackler)
Closed by commit rHG55f59a25c593: tests: use `tr -d` and not `tr --delete` 
since the latter is absent on BSD tr(1) (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6729?vs=16212&id=16221

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

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

AFFECTED FILES
  tests/test-merge-combination.t

CHANGE DETAILS

diff --git a/tests/test-merge-combination.t b/tests/test-merge-combination.t
--- a/tests/test-merge-combination.t
+++ b/tests/test-merge-combination.t
@@ -57,7 +57,7 @@
   >fi
   >   else expected=a
   >   fi
-  >   got=`hg log -r 3 --template '{files}\n' | tr --delete 'e '`
+  >   got=`hg log -r 3 --template '{files}\n' | tr -d 'e '`
   >   if [ "$got" = "$expected" ]
   >   then echo "$line$conflicts: agree on \"$got\""
   >   else echo "$line$conflicts: hg said \"$got\", expected 
\"$expected\""



To: durin42, #hg-reviewers, av6, pulkit
Cc: 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-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16220.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16218&id=16220

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-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
+  pager.ignore=
+  patch.eol=str

D6730: config: handle default values of type list

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

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6730?vs=16217&id=16219

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

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -792,6 +792,8 @@
 itemdefault = item.default()
 else:
 itemdefault = item.default
+if isinstance(itemdefault, list):
+itemdefault = ' '.join(itemdefault)
 return itemdefault
 
 def hasconfig(self, section, name, untrusted=False):



To: navaneeth.suresh, #hg-reviewers
Cc: 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-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16218.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16216&id=16218

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-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
+  pager.ignore=[]
+  p

D6730: config: handle default values of type list

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch improves the output of the `defaultvalue` keyword.
  For example, `progress.format`.
  Its default value is shown to be `['topic', 'bar', 'number', 'estimate']`
  until now, but it does not match `hg help config.progress.format`
  (it says `default: topic bar number estimate`), and that is also not the
  format that users would need to use for the actual value in `hgrc` or using
  `--config` flag.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -792,6 +792,8 @@
 itemdefault = item.default()
 else:
 itemdefault = item.default
+if itemdefault and isinstance(itemdefault, list):
+itemdefault = ' '.join(itemdefault)
 return itemdefault
 
 def hasconfig(self, section, name, untrusted=False):



To: navaneeth.suresh, #hg-reviewers
Cc: 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-16 Thread av6 (Anton Shestakov)
av6 added a comment.


  It looks fine to me, one thing that could be improved is the output format of 
list values. For example, `progress.format`: its default value is shown to be 
`['topic', 'bar', 'number', 'estimate']`, but it doesn't match `hg help 
config.progress.format` (it says `default: topic bar number estimate`), and 
that is also not the format that users would need to use for the actual value 
in hgrc or using --config flag.

INLINE COMMENTS

> ui.py:825-826
> +for name, item in sorted(data.iteritems()):
> +if (item.default is not configitems.dynamicdefault and
> +not item.generic):
> +if ((section in ['debug', 'devel', 'experimental'] or

Nit: this condition could be made into another `if ...: continue` block just 
like the one below, making things less indented.

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