D7118: rust-dirstatemap: remove additional lookups in traverse

2019-11-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18040.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7118?vs=17200=18040

BRANCH
  default

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

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -915,6 +915,9 @@
 matchalways = match.always()
 matchtdir = match.traversedir
 dmap = self._map
+if rustmod is not None:
+dmap = self._map._rustmap
+
 listdir = util.listdir
 lstat = os.lstat
 dirkind = stat.S_IFDIR



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


BUG?find renamed files

2019-11-12 Thread Uwe Brauer


Hi

The following script works nicely 
hg init
echo "First" > test.org
hg add test.org
hg commit -m "First"
echo "Second" >> test.org
hg commit -m "Second"
echo "Third" >> test.org
hg commit -m "Third"
mv test.org test_2.org
hg addremove
hg commit -m "Moved file name"
hg log -r "adds(test_2.org)" --template "{file_copies"}


But this one not:

hg init
echo "First" > test.org
hg add test.org
hg commit -m "First"
echo "Second" >> test.org
hg commit -m "Second"
echo "Third" >> test.org
hg commit -m "Third"
mv test.org annu-hoja2.tex
hg addremove
hg commit -m "Moved file name"
hg log -r "adds(annu-hoja2.tex)" --template "{file_copies}"


I obtain hg: parse error: adds requires a pattern

Is this a BUG?


I am using ubuntu 16.04 and 
HG:
Mercurial Distributed SCM (version 5.0.1+3-d532292eff22+20190614)

Regards

Uwe Brauer 

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


[PATCH STABLE] py3: avoid iterating over a literal bytes in highlight

2019-11-12 Thread Denis Laxalde
# HG changeset patch
# User Denis Laxalde 
# Date 1573553103 -3600
#  Tue Nov 12 11:05:03 2019 +0100
# Branch stable
# Node ID 430d80ba9271920ca6da8db62b507390f65d20d1
# Parent  e513e87b0476cc9a6eb31abe420448877fa9c902
py3: avoid iterating over a literal bytes in highlight

In Python 3, iterating over a bytes literal yields integers. Since we
use the value in `text.replace()`, this fails on Python 3 with the
following trackback:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgwebdir_mod.py", 
line 378, in run_wsgi
for r in self._runwsgi(req, res):
  File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgweb_mod.py", line 
326, in run_wsgi
for r in self._runwsgi(req, res, repo):
  File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgweb_mod.py", line 
449, in _runwsgi
return getattr(webcommands, cmd)(rctx)
  File "/usr/lib/python3/dist-packages/mercurial/hgweb/webcommands.py", 
line 211, in file
return _filerevision(web, webutil.filectx(web.repo, web.req))
  File "/usr/lib/python3/dist-packages/hgext/highlight/__init__.py", line 
72, in filerevision_highlight
pygmentize(web, b'fileline', fctx, web.tmpl)
  File "/usr/lib/python3/dist-packages/hgext/highlight/__init__.py", line 
58, in pygmentize
field, fctx, style, tmpl, guessfilenameonly=filenameonly
  File "/usr/lib/python3/dist-packages/hgext/highlight/highlight.py", line 
62, in pygmentize
text = text.replace(c, b'')
TypeError: a bytes-like object is required, not 'int'

diff --git a/hgext/highlight/highlight.py b/hgext/highlight/highlight.py
--- a/hgext/highlight/highlight.py
+++ b/hgext/highlight/highlight.py
@@ -57,7 +57,7 @@ def pygmentize(field, fctx, style, tmpl,
 return
 
 # str.splitlines() != unicode.splitlines() because "reasons"
-for c in b"\x0c\x1c\x1d\x1e":
+for c in b"\x0c", b"\x1c", b"\x1d", b"\x1e":
 if c in text:
 text = text.replace(c, b'')
 
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7116: rust-performance: introduce FastHashMap type alias for HashMap

2019-11-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18039.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7116?vs=17198=18039

BRANCH
  default

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

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

AFFECTED FILES
  rust/Cargo.lock
  rust/hg-core/Cargo.toml
  rust/hg-core/src/dirstate.rs
  rust/hg-core/src/dirstate/dirs_multiset.rs
  rust/hg-core/src/dirstate/dirstate_map.rs
  rust/hg-core/src/dirstate/parsers.rs
  rust/hg-core/src/discovery.rs
  rust/hg-core/src/filepatterns.rs
  rust/hg-core/src/lib.rs
  rust/hg-cpython/src/parsers.rs

CHANGE DETAILS

diff --git a/rust/hg-cpython/src/parsers.rs b/rust/hg-cpython/src/parsers.rs
--- a/rust/hg-cpython/src/parsers.rs
+++ b/rust/hg-cpython/src/parsers.rs
@@ -16,9 +16,9 @@
 };
 use hg::{
 pack_dirstate, parse_dirstate, utils::hg_path::HgPathBuf,
-DirstatePackError, DirstateParents, DirstateParseError, PARENT_SIZE,
+DirstatePackError, DirstateParents, DirstateParseError, FastHashMap,
+PARENT_SIZE,
 };
-use std::collections::HashMap;
 use std::convert::TryInto;
 
 use crate::dirstate::{extract_dirstate, make_dirstate_tuple};
@@ -30,8 +30,8 @@
 copymap: PyDict,
 st: PyBytes,
 ) -> PyResult {
-let mut dirstate_map = HashMap::new();
-let mut copies = HashMap::new();
+let mut dirstate_map = FastHashMap::default();
+let mut copies = FastHashMap::default();
 
 match parse_dirstate( dirstate_map,  copies, st.data(py)) {
 Ok(parents) => {
@@ -86,7 +86,7 @@
 
 let mut dirstate_map = extract_dirstate(py, )?;
 
-let copies: Result, PyErr> = copymap
+let copies: Result, PyErr> = copymap
 .items(py)
 .iter()
 .map(|(key, value)| {
diff --git a/rust/hg-core/src/lib.rs b/rust/hg-core/src/lib.rs
--- a/rust/hg-core/src/lib.rs
+++ b/rust/hg-core/src/lib.rs
@@ -24,6 +24,8 @@
 pub use filepatterns::{
 build_single_regex, read_pattern_file, PatternSyntax, PatternTuple,
 };
+use std::collections::HashMap;
+use twox_hash::RandomXxHashBuilder64;
 
 /// Mercurial revision numbers
 ///
@@ -53,6 +55,11 @@
 
 pub type LineNumber = usize;
 
+/// Rust's default hasher is too slow because it tries to prevent collision
+/// attacks. We are not concerned about those: if an ill-minded person has
+/// write access to your repository, you have other issues.
+pub type FastHashMap = HashMap;
+
 #[derive(Clone, Debug, PartialEq)]
 pub enum GraphError {
 ParentOutOfRange(Revision),
diff --git a/rust/hg-core/src/filepatterns.rs b/rust/hg-core/src/filepatterns.rs
--- a/rust/hg-core/src/filepatterns.rs
+++ b/rust/hg-core/src/filepatterns.rs
@@ -7,10 +7,11 @@
 
 //! Handling of Mercurial-specific patterns.
 
-use crate::{utils::SliceExt, LineNumber, PatternError, PatternFileError};
+use crate::{
+utils::SliceExt, FastHashMap, LineNumber, PatternError, PatternFileError,
+};
 use lazy_static::lazy_static;
 use regex::bytes::{NoExpand, Regex};
-use std::collections::HashMap;
 use std::fs::File;
 use std::io::Read;
 use std::path::{Path, PathBuf};
@@ -214,8 +215,8 @@
 }
 
 lazy_static! {
-static ref SYNTAXES: HashMap<&'static [u8], &'static [u8]> = {
-let mut m = HashMap::new();
+static ref SYNTAXES: FastHashMap<&'static [u8], &'static [u8]> = {
+let mut m = FastHashMap::default();
 
 m.insert(b"re".as_ref(), b"relre:".as_ref());
 m.insert(b"regexp".as_ref(), b"relre:".as_ref());
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
@@ -11,12 +11,11 @@
 //! `mercurial.setdiscovery`
 
 use super::{Graph, GraphError, Revision, NULL_REVISION};
-use crate::ancestors::MissingAncestors;
-use crate::dagops;
+use crate::{ancestors::MissingAncestors, dagops, FastHashMap};
 use rand::seq::SliceRandom;
 use rand::{thread_rng, RngCore, SeedableRng};
 use std::cmp::{max, min};
-use std::collections::{HashMap, HashSet, VecDeque};
+use std::collections::{HashSet, VecDeque};
 
 type Rng = rand_pcg::Pcg32;
 
@@ -25,7 +24,7 @@
 graph: G, // plays the role of self._repo
 common: MissingAncestors,
 undecided: Option>,
-children_cache: Option>>,
+children_cache: Option>>,
 missing: HashSet,
 rng: Rng,
 respect_size: bool,
@@ -61,7 +60,7 @@
 where
 I: Iterator,
 {
-let mut distances: HashMap = HashMap::new();
+let mut distances: FastHashMap = FastHashMap::default();
 let mut visit: VecDeque = heads.into_iter().collect();
 let mut factor: u32 = 1;
 let mut seen: HashSet = HashSet::new();
@@ -328,7 +327,8 @@
 }
 self.ensure_undecided()?;
 
-let mut children: HashMap> = HashMap::new();
+let mut children: FastHashMap> =
+FastHashMap::default();
 for  in self.undecided.as_ref().unwrap() {
 for p in ParentsIterator::graph_parents(, rev)? {
 

D7119: rust-dirstatemap: remove additional lookup in dirstate.matches

2019-11-12 Thread Raphaël Gomès
Alphare updated this revision to Diff 18041.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7119?vs=17201=18041

BRANCH
  default

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

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1242,6 +1242,9 @@
 return files in the dirstate (in whatever state) filtered by match
 '''
 dmap = self._map
+if rustmod is not None:
+dmap = self._map._rustmap
+
 if match.always():
 return dmap.keys()
 files = match.files()



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


D7147: diff: use unfiltered repo if we're diffing the working copy

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz edited the summary of this revision.
martinvonz updated this revision to Diff 18045.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7147?vs=17368=18045

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -173,6 +173,9 @@
 if commandname == b'status':
 if not kwargs.get(b'rev') and not kwargs.get(b'change'):
 use_unfiltered = True
+elif commandname == b'diff':
+if not kwargs.get(b'rev') and not kwargs.get(b'change'):
+use_unfiltered = True
 
 return repo.unfiltered() if use_unfiltered else repo
 
@@ -2491,6 +2494,8 @@
 stat = opts.get(b'stat')
 reverse = opts.get(b'reverse')
 
+repo = _maybeunfilteredrepo(repo, b'diff', pats, opts)
+
 if revs and change:
 msg = _(b'cannot specify --rev and --change at the same time')
 raise error.Abort(msg)



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


D7150: dirstate: respect request to not list unknown/ignored/clean files (API)

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment.


  Ping on this. It seems like a simple and harmless patch.

REPOSITORY
  rHG Mercurial

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

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

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


D7149: export: use unfiltered repo if we're exporting the working copy parent

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz edited the summary of this revision.
martinvonz updated this revision to Diff 18047.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7149?vs=17370=18047

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -179,6 +179,9 @@
 elif commandname == b'annotate':
 if not kwargs.get(b'rev'):
 use_unfiltered = True
+elif commandname == b'export':
+if not kwargs.get(b'bookmark') and not args:
+use_unfiltered = True
 
 return repo.unfiltered() if use_unfiltered else repo
 
@@ -2641,6 +2644,8 @@
 if bookmark and changesets:
 raise error.Abort(_(b"-r and -B are mutually exclusive"))
 
+repo =_maybeunfilteredrepo(repo, b'export', changesets, opts)
+
 if bookmark:
 if bookmark not in repo._bookmarks:
 raise error.Abort(_(b"bookmark '%s' not found") % bookmark)



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


mercurial@43617: 12 new changesets

2019-11-12 Thread Mercurial Commits
12 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/14ce03e13508
changeset:   43606:14ce03e13508
user:Gregory Szorc 
date:Wed Oct 23 13:00:14 2019 -0700
summary: packaging: install .rc files to hgrc.d

https://www.mercurial-scm.org/repo/hg/rev/a2f28a8746bf
changeset:   43607:a2f28a8746bf
user:Gregory Szorc 
date:Wed Oct 23 13:21:35 2019 -0700
summary: packaging: remove hg-ssh.8.html from Inno installer

https://www.mercurial-scm.org/repo/hg/rev/2574330dd0f6
changeset:   43608:2574330dd0f6
user:Gregory Szorc 
date:Wed Oct 23 13:25:01 2019 -0700
summary: packaging: stop installing Contributors.txt

https://www.mercurial-scm.org/repo/hg/rev/8aa6aa9b7843
changeset:   43609:8aa6aa9b7843
user:Gregory Szorc 
date:Wed Oct 23 18:42:19 2019 -0700
summary: packaging: write out editor.rc in Python

https://www.mercurial-scm.org/repo/hg/rev/11db74349b24
changeset:   43610:11db74349b24
user:Gregory Szorc 
date:Wed Oct 23 13:55:12 2019 -0700
summary: packaging: use lower case for RC files

https://www.mercurial-scm.org/repo/hg/rev/27c25c0dc967
changeset:   43611:27c25c0dc967
user:Raphaël Gomès 
date:Wed Nov 06 16:24:24 2019 +0100
summary: rust-matchers: remove default implementations for `Matcher` trait

https://www.mercurial-scm.org/repo/hg/rev/dc9c570a3818
changeset:   43612:dc9c570a3818
user:Augie Fackler 
date:Mon Nov 11 16:14:35 2019 -0500
summary: dirstate: re-blacken file

https://www.mercurial-scm.org/repo/hg/rev/dbc39f028c9f
changeset:   43613:dbc39f028c9f
user:Augie Fackler 
date:Mon Nov 11 14:48:30 2019 -0500
summary: fuzz: migrate bdiff fuzzer to use FuzzedDataProvider

https://www.mercurial-scm.org/repo/hg/rev/78df32a8b6f4
changeset:   43614:78df32a8b6f4
user:Augie Fackler 
date:Mon Nov 11 16:37:18 2019 -0500
summary: fuzz: migrate xdiff fuzzer to use FuzzedDataProvider

https://www.mercurial-scm.org/repo/hg/rev/6f5c352f41b6
changeset:   43615:6f5c352f41b6
user:Augie Fackler 
date:Mon Nov 11 16:45:22 2019 -0500
summary: fuzz: clean out most of fuzzutil

https://www.mercurial-scm.org/repo/hg/rev/92bb5bacd807
changeset:   43616:92bb5bacd807
user:Gregory Szorc 
date:Wed Oct 23 12:31:15 2019 -0700
summary: packaging: install contrib/mq.el on WiX

https://www.mercurial-scm.org/repo/hg/rev/697c2e32c490
changeset:   43617:697c2e32c490
bookmark:@
tag: tip
user:Gregory Szorc 
date:Mon Nov 11 18:51:55 2019 -0800
summary: packaging: ship all help .txt files on WiX

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


D7148: annotate: use unfiltered repo if we're annotating the working copy

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz edited the summary of this revision.
martinvonz updated this revision to Diff 18046.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7148?vs=17369=18046

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -176,6 +176,9 @@
 elif commandname == b'diff':
 if not kwargs.get(b'rev') and not kwargs.get(b'change'):
 use_unfiltered = True
+elif commandname == b'annotate':
+if not kwargs.get(b'rev'):
+use_unfiltered = True
 
 return repo.unfiltered() if use_unfiltered else repo
 
@@ -455,6 +458,8 @@
 raise error.Abort(_(b'at least one of -n/-c is required for -l'))
 
 rev = opts.get(b'rev')
+repo =_maybeunfilteredrepo(repo, b'annotate', pats, opts)
+
 if rev:
 repo = scmutil.unhidehashlikerevs(repo, [rev], b'nowarn')
 ctx = scmutil.revsingle(repo, rev)



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


D7144: status: use unfiltered repo if we're getting status of working copy

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz edited the summary of this revision.
martinvonz updated this revision to Diff 18044.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7144?vs=17367=18044

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -163,6 +163,20 @@
 subrepoopts = cmdutil.subrepoopts
 debugrevlogopts = cmdutil.debugrevlogopts
 
+
+def _maybeunfilteredrepo(repo, commandname, args, kwargs):
+"""decides if we can optimize by using an unfiltered repo
+
+Extracted to a function so extensions can override it.
+"""
+use_unfiltered = False
+if commandname == b'status':
+if not kwargs.get(b'rev') and not kwargs.get(b'change'):
+use_unfiltered = True
+
+return repo.unfiltered() if use_unfiltered else repo
+
+
 # Commands start here, listed alphabetically
 
 
@@ -6790,6 +6804,8 @@
 else:
 terse = ui.config(b'commands', b'status.terse')
 
+repo = _maybeunfilteredrepo(repo, b'status', pats, opts)
+
 if revs and change:
 msg = _(b'cannot specify --rev and --change at the same time')
 raise error.Abort(msg)



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


Re: [PATCH STABLE] py3: avoid iterating over a literal bytes in highlight

2019-11-12 Thread Yuya Nishihara
On Tue, 12 Nov 2019 11:21:51 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde 
> # Date 1573553103 -3600
> #  Tue Nov 12 11:05:03 2019 +0100
> # Branch stable
> # Node ID 430d80ba9271920ca6da8db62b507390f65d20d1
> # Parent  e513e87b0476cc9a6eb31abe420448877fa9c902
> py3: avoid iterating over a literal bytes in highlight

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


D7166: packaging: ship all help .txt files on WiX

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment.


  In D7166#108360 , @durin42 wrote:
  
  > I re-landed this and tests passed on my workstation when I did so. Let's 
not drop this again without some additional coordination?
  
  Agreed. I think it was I who pushed it last time and I must have done that 
before running tests, and then I dropped it after running tests. I'm sorry.

REPOSITORY
  rHG Mercurial

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

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

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


D7166: packaging: ship all help .txt files on WiX

2019-11-12 Thread durin42 (Augie Fackler)
durin42 added a comment.


  No worries, I'm not sure what went sideways there.

REPOSITORY
  rHG Mercurial

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

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

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


mercurial@43601: 4 new changesets

2019-11-12 Thread Mercurial Commits
4 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/2a8cd7edf409
changeset:   43598:2a8cd7edf409
parent:  43596:0ad5d6c4bfad
user:Yuya Nishihara 
date:Sat Nov 09 12:09:50 2019 +0900
summary: bookmarks: fix handling of multiple bookmarks with one to be 
deactivated

https://www.mercurial-scm.org/repo/hg/rev/1c91576b88bb
changeset:   43599:1c91576b88bb
user:Yuya Nishihara 
date:Sat Nov 09 12:32:20 2019 +0900
summary: bookmarks: resolve target revision out of the bookmarks loop

https://www.mercurial-scm.org/repo/hg/rev/fe2e0d100187
changeset:   43600:fe2e0d100187
user:Yuya Nishihara 
date:Sat Nov 09 12:44:00 2019 +0900
summary: bookmarks: use changectx instead of remembering hex of hidden 
revision

https://www.mercurial-scm.org/repo/hg/rev/a80d5ddecc2d
changeset:   43601:a80d5ddecc2d
bookmark:@
tag: tip
user:Yuya Nishihara 
date:Sat Nov 09 12:55:56 2019 +0900
summary: bookmarks: accept explicit -r 'wdir()' when adding new bookmarks 
(issue6218)

-- 
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@43605: 4 new changesets

2019-11-12 Thread Mercurial Commits
4 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/889ac87e8bfd
changeset:   43602:889ac87e8bfd
user:Raphaël Gomès 
date:Wed Nov 06 13:43:18 2019 +0100
summary: rust-status: improve status performance

https://www.mercurial-scm.org/repo/hg/rev/75fe6e71ddb8
changeset:   43603:75fe6e71ddb8
user:Raphaël Gomès 
date:Thu Nov 07 10:23:42 2019 +0100
summary: rust-status: return a ParallelIterator instead of a Vec from 
stat_dmap_entries

https://www.mercurial-scm.org/repo/hg/rev/51cd86735608
changeset:   43604:51cd86735608
user:Raphaël Gomès 
date:Thu Nov 07 10:32:26 2019 +0100
summary: rust-status: refactor dispatch case for normal files

https://www.mercurial-scm.org/repo/hg/rev/8210c3f46912
changeset:   43605:8210c3f46912
bookmark:@
tag: tip
user:Raphaël Gomès 
date:Thu Nov 07 11:13:31 2019 +0100
summary: rust: introduce SIZE_FROM_OTHER_PARENT constant

-- 
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@43588: 2 new changesets (2 on stable)

2019-11-12 Thread Mercurial Commits
2 new changesets (2 on stable) in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/bf87f5ff2ebf
changeset:   43587:bf87f5ff2ebf
branch:  stable
parent:  43580:e513e87b0476
user:Martin von Zweigbergk 
date:Fri Nov 08 10:13:05 2019 -0800
summary: py3: avoid `b'%s' % type(...)` in a ProgrammingError

https://www.mercurial-scm.org/repo/hg/rev/a825ba8eb0a1
changeset:   43588:a825ba8eb0a1
branch:  stable
tag: tip
user:Martin von Zweigbergk 
date:Tue Nov 05 13:31:40 2019 -0800
summary: relnotes: copy "next" to "5.2" and clear "next"

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


Re: BUG?find renamed files

2019-11-12 Thread Uwe Brauer
>>> "M" == Marcus   writes:

   > On 12/11/2019 14.20, Uwe Brauer wrote:
   >> hg log -r "adds(test_2.org)" --template "{file_copies"}

   > Surely there is a typo at the end of the line?!

Right.

hg log -r "adds(test_2.org)" --template "{file_copies}"

Is the correct syntax

   >> hg log -r "adds(annu-hoja2.tex)" --template "{file_copies}"
   >> 
   >> I obtain hg: parse error: adds requires a pattern
   >> Is this a BUG?

   > I don't think so, but I'll leave that decision to the experts.
   > However, the logic behind detecting literals could perhaps be
   > documented in more detail. The file name should be quoted. Same with
   > literals containing space characters in some constructs, such as
   > ‘date()’.

I confirm that 


hg log -r "adds('annu-hoja2.tex')" --template "{file_copies}"

Works but I am wondering why 


hg log -r "adds(test_2.org)" --template "{file_copies}"

Without the ' '  works

Uwe 


smime.p7s
Description: S/MIME cryptographic signature
___
Mercurial mailing list
Mercurial@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial


renamed files in a nice list, templates for hg log

2019-11-12 Thread Uwe Brauer

Hi

Another template issue.

hg log -r "removes('**')" --template "{rev}:\n{file_dels % '{file}\n'}\n"

Works nicely and gives me a list of deleted files, but 

hg log -r "adds('**')" --template "{rev}:\n{file_copies % '{file}\n'}\n"

Does not.

What do I miss

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


D7166: packaging: ship all help .txt files on WiX

2019-11-12 Thread durin42 (Augie Fackler)
durin42 added a comment.


  In D7166#108320 , @indygreg 
wrote:
  
  > This got dropped on committed but Phabricator is confused about its 
closedstate. Please re-review and land @martinvonz or @durin42.
  
  Per Martin's comment, it looks like you had test failures?
  
  (Phabricator only ever closes things - it never reopens them.)

REPOSITORY
  rHG Mercurial

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

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

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


Re: BUG?find renamed files

2019-11-12 Thread Marcus

On 12/11/2019 14.20, Uwe Brauer wrote:

hg log -r "adds(test_2.org)" --template "{file_copies"}


Surely there is a typo at the end of the line?!


hg log -r "adds(annu-hoja2.tex)" --template "{file_copies}"


I obtain hg: parse error: adds requires a pattern

Is this a BUG?


I don't think so, but I'll leave that decision to the experts. However, 
the logic behind detecting literals could perhaps be documented in more 
detail. The file name should be quoted. Same with literals containing 
space characters in some constructs, such as ‘date()’.


Cheers,
Marcus

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


D7166: packaging: ship all help .txt files on WiX

2019-11-12 Thread durin42 (Augie Fackler)
durin42 added a comment.


  I re-landed this and tests passed on my workstation when I did so. Let's not 
drop this again without some additional coordination?

REPOSITORY
  rHG Mercurial

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

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

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


mercurial@43597: 9 new changesets (1 on stable)

2019-11-12 Thread Mercurial Commits
9 new changesets (1 on stable) in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/7f4d58c21aec
changeset:   43589:7f4d58c21aec
parent:  43586:d77e8800790b
user:Martin von Zweigbergk 
date:Sat Oct 19 00:15:41 2019 -0700
summary: largefiles: avoid dynamically subclassing context instances

https://www.mercurial-scm.org/repo/hg/rev/95d0532ad171
changeset:   43590:95d0532ad171
user:Martin von Zweigbergk 
date:Fri Oct 18 23:18:47 2019 -0700
summary: status: move initialization closer together

https://www.mercurial-scm.org/repo/hg/rev/b56c6647f65e
changeset:   43591:b56c6647f65e
user:Kyle Lippincott 
date:Wed Nov 06 18:28:11 2019 -0800
summary: rebase: check for unfinished ops even when inmemory (issue6214)

https://www.mercurial-scm.org/repo/hg/rev/61d7bca16dff
changeset:   43592:61d7bca16dff
user:Martin von Zweigbergk 
date:Wed Oct 30 00:00:21 2019 -0700
summary: revset: simplify checkstatus() by using any()

https://www.mercurial-scm.org/repo/hg/rev/ae91e4e4c9b0
changeset:   43593:ae91e4e4c9b0
user:Gregory Szorc 
date:Wed Oct 16 21:25:08 2019 -0700
summary: tests: rename stopped and started variables to reflect times

https://www.mercurial-scm.org/repo/hg/rev/ac140b85aae9
changeset:   43594:ac140b85aae9
user:Gregory Szorc 
date:Wed Oct 16 21:31:40 2019 -0700
summary: tests: use time.time() for relative start and stop times

https://www.mercurial-scm.org/repo/hg/rev/ecd11c4d3834
changeset:   43595:ecd11c4d3834
user:Martin von Zweigbergk 
date:Tue Oct 29 23:33:34 2019 -0700
summary: match: drop support for passing '.' for root dir to visit*() 
methods

https://www.mercurial-scm.org/repo/hg/rev/0ad5d6c4bfad
changeset:   43596:0ad5d6c4bfad
bookmark:@
user:Yuya Nishihara 
date:Mon Nov 11 22:10:26 2019 +0900
summary: import-checker: allow 'from typing import ...'

https://www.mercurial-scm.org/repo/hg/rev/856cce0c255c
changeset:   43597:856cce0c255c
branch:  stable
tag: tip
parent:  43588:a825ba8eb0a1
user:Denis Laxalde 
date:Tue Nov 12 11:05:03 2019 +0100
summary: py3: avoid iterating over a literal bytes in highlight

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


D7144: status: use unfiltered repo if we're getting status of working copy

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment.
martinvonz marked an inline comment as done.


  I've extracted a function for deciding whether to use an unfiltered repo, so 
hopefully this can get queued now.

REPOSITORY
  rHG Mercurial

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

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

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


D7257: [RFC] repoview: add a "filter" that just disallows walking to heads

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 18048.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7257?vs=17625=18048

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/repoview.py

CHANGE DETAILS

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -169,6 +169,7 @@
 # Otherwise your filter will have to recompute all its branches cache
 # from scratch (very slow).
 filtertable = {
+b'notreally': lambda repo, visibilityexceptions=None: frozenset(),
 b'visible': computehidden,
 b'visible-hidden': computehidden,
 b'served.hidden': computesecret,
@@ -336,6 +337,24 @@
 return super(filteredchangelogmixin, self).flags(rev)
 
 
+def poisonwalktoheads(unfichangelog):
+cl = copy.copy(unfichangelog)
+
+def poison(*args, **kwargs):
+raise error.ProgrammingError('called method on changelog that requries 
'
+  'filtering, but filtering was not 
requested')
+
+class filteredchangelog(cl.__class__):
+tiprev = poison
+headrevs = poison
+__iter__ = poison
+children = poison
+
+cl.__class__ = filteredchangelog
+
+return cl
+
+
 class repoview(object):
 """Provide a read/write view of a repo through a filtered changelog
 
@@ -404,8 +423,13 @@
 cl = None
 # could have been made None by the previous if
 if cl is None:
-# Only filter if there's something to filter
-cl = wrapchangelog(unfichangelog, revs) if revs else unfichangelog
+if self.filtername == b'notreally':
+cl = poisonwalktoheads(unfichangelog)
+elif revs:
+# Only filter if there's something to filter
+cl = wrapchangelog(unfichangelog, revs)
+else:
+cl = unfichangelog
 object.__setattr__(self, '_clcache', cl)
 object.__setattr__(self, '_clcachekey', newkey)
 return cl
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -174,7 +174,7 @@
 if not kwargs.get(b'rev') and not kwargs.get(b'change'):
 use_unfiltered = True
 
-return repo.unfiltered() if use_unfiltered else repo
+return repo.filtered(b'notreally') if use_unfiltered else repo
 
 
 # Commands start here, listed alphabetically



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


D7257: [RFC] repoview: add a "filter" that just disallows walking to heads

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment.


  In D7257#108377 , @marmoute 
wrote:
  
  > Can you elaborate on what this changeset is about ? the description is a 
bit… short;-)
  
  Done.

REPOSITORY
  rHG Mercurial

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

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

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


D7150: dirstate: respect request to not list unknown/ignored/clean files (API)

2019-11-12 Thread martinvonz (Martin von Zweigbergk)
martinvonz updated this revision to Diff 18049.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7150?vs=17371=18049

BRANCH
  default

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

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1149,16 +1149,19 @@
 )
 return (lookup, status)
 
+def noop(f):
+pass
+
 dcontains = dmap.__contains__
 dget = dmap.__getitem__
 ladd = lookup.append  # aka "unsure"
 madd = modified.append
 aadd = added.append
-uadd = unknown.append
-iadd = ignored.append
+uadd = unknown.append if listunknown else noop
+iadd = ignored.append if listignored else noop
 radd = removed.append
 dadd = deleted.append
-cadd = clean.append
+cadd = clean.append if listclean else noop
 mexact = match.exact
 dirignore = self._dirignore
 checkexec = self._checkexec



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


D7372: remotefilelog: handle **kwargs correctly when overriding changelog.add()

2019-11-12 Thread dploch (Daniel Ploch)
dploch 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/D7372

AFFECTED FILES
  hgext/remotefilelog/__init__.py

CHANGE DETAILS

diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -719,9 +719,9 @@
 remotefilelog.remotefilelog, b'addrawrevision', addrawrevision
 )
 
-def changelogadd(orig, self, *args):
+def changelogadd(orig, self, *args, **kwargs):
 oldlen = len(self)
-node = orig(self, *args)
+node = orig(self, *args, **kwargs)
 newlen = len(self)
 if oldlen != newlen:
 for oldargs in pendingfilecommits:



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


D7257: [RFC] repoview: add a "filter" that just disallows walking to heads

2019-11-12 Thread marmoute (Pierre-Yves David)
marmoute added a comment.


  Can you elaborate on what this changeset is about ? the description is a bit… 
short;-)

REPOSITORY
  rHG Mercurial

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

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

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


Re: renamed files in a nice list, templates for hg log

2019-11-12 Thread Matt Harbison

On Tue, 12 Nov 2019 08:51:02 -0500, Uwe Brauer  wrote:



Hi

Another template issue.

hg log -r "removes('**')" --template "{rev}:\n{file_dels % '{file}\n'}\n"

Works nicely and gives me a list of deleted files, but

hg log -r "adds('**')" --template "{rev}:\n{file_copies % '{file}\n'}\n"

Does not.

What do I miss


What are your expectations?  Did you mean to use {file_copies} when  
logging revisions with added files?


Additionally, the {} values I see in the tests in {file_copies % 'XXX'}  
are {file_copy}, {name}, and {source}, not {file}.

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


D7173: packaging: stage files and dynamically generate WiX installer

2019-11-12 Thread indygreg (Gregory Szorc)
indygreg added a comment.


  This has been rebased and all dependent commits have landed. Please take 
another look, @durin42.

REPOSITORY
  rHG Mercurial

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

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

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