Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View

Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

Pulkit Goyal
rhg: propogate error coming from HgError::Abort to CommandError

Differential Revision: https://phab.mercurial-scm.org/D10839
Pulkit Goyal
rhg: split non_repo_config and `--config` loading in different functions

This will help us in better handling of error caused when trying to
load `--config` values.

Differential Revision: https://phab.mercurial-scm.org/D10837
Pulkit Goyal
rhg: add exit code to HgError::Abort()

My previous attempts to have rhg end with correct exit code was more of bug
hunting. I found cases which were failing and fixed them. But as one might
expect, more tests started failing.

Let's add exit code `HgError::Abort()` and make it users explicitly tell what
exit code they want.

Differential Revision: https://phab.mercurial-scm.org/D10838
Pulkit Goyal
rhg: look for repository in ancestors also instead of cwd only

Last patch introduced config reading at startup to parse value of `--repository`
flag. However, that patch only tried to check for current repository at current
working directory and not it's ancestors. This patch fixes that.

Differential Revision: https://phab.mercurial-scm.org/D10767
Pulkit Goyal
rhg: read [paths] for `--repository` value

hg parses `-R` and `--repository` CLI arguments "early" in order to know which
local repository to load config from. (Config can then affect whether or how to
fall back.)

The value of of those arguments can be not only a filesystem path, but also an
alias configured in the `[paths]` section. This part was missing in rhg and
this patch implements that.

The current patch still lacks functionality to read config of current repository
if we are not at root of repo. That will be fixed in upcoming patches.

A new crate `home` is added to get path of home directory.

Differential Revision: https://phab.mercurial-scm.org/D10296
Augie Fackler
merge: with stable
Pierre-Yves David
revlog: store sidedata in their own file

This makes sidedata manipulation simpler and results in more compact data when
traversing either data or sidedata.

Differential Revision: https://phab.mercurial-scm.org/D10787
Pierre-Yves David
revlog: move `revisioninfo` in `revlogutils`

We will need it in other utility module. So lets extract it from `revlog.py`,
the module is too large already anyway.

Differential Revision: https://phab.mercurial-scm.org/D10797
Pierre-Yves David
revlog: move censoring code in a dedicated module

This code is quite specific and we are about to add more of it for revlog-v2
(and other derived version). So we move this code in a dedicated module in
`mercurial/revlogutils/`. This looks like a good fit.

The diff is huge because I used `hg copy` to create the new file so that we keep
the history of the censor code.

Differential Revision: https://phab.mercurial-scm.org/D10789
Pierre-Yves David
revlog: use `self.sidedata` directly in `revlog.clone`

We want to change `revlog._revisiondata` signature, so we need to migrate users

Differential Revision: https://phab.mercurial-scm.org/D10782
Pierre-Yves David
censor: reduce risk of censor test blowing up output limit

The censored file is really big, and we keep using `hg cat` on it, with the
assumption that it is censored. However, when it is not censored, the amount of
extra line output is huge and quickly saturate the backlog of terminal and CI

Differential Revision: https://phab.mercurial-scm.org/D10788
Pierre-Yves David
revlogv2: drop "sidedatacompression" from the list of todos

This was implemented in c4dbb7636a12 and 07641bafa646, but I forgot to drop it
from the todo-list.

Differential Revision: https://phab.mercurial-scm.org/D10779
Pierre-Yves David
revlog: use the `entry` function in bundlerepo

We can use some of the default value again!

Differential Revision: https://phab.mercurial-scm.org/D10796
Pierre-Yves David
revlog: move entry documentation alongside new related constants

Accessing individual index-entry element is usually done using integer directly.
This is presumably for "performance reasons". However as the index entry gain
more and more element it seems useful to get the option to use symbolic constant
to access item, for both clarify and versatility. We will probably keep using
integer for performance critical path, but less critical code may start using
them now that they are declared.

Differential Revision: https://phab.mercurial-scm.org/D10791
Pierre-Yves David
revlog: no longer return sidedata from `_revisiondata`

All users have been migrated.

When they was introduced sidedata where grouped with the actual revision data
and unpacking one came with the other. Sidedata moved be stored "independently"
and it no longer make sense to retrieve both at the same time unconditionnaly.

Differential Revision: https://phab.mercurial-scm.org/D10783
Pierre-Yves David
censor: drop size limitation on the tombstone

This limitation seems to date back from a previous implementation of censors,
were the revision were censored" in place. For a long while the implementation
actually involved rewriting the revlog before replacing the original data. So it looks like we can safely remove this limitation.

The tests suite agrees.

Differential Revision: https://phab.mercurial-scm.org/D10790
Pierre-Yves David
revlog: move `offset_type` to `revlogutils`

This multiple module are using this so it make sense to move it at the utility

Differential Revision: https://phab.mercurial-scm.org/D10792
Pierre-Yves David
revlog: add a ways to blacklist some revision when searching for a delta

This will be useful to recompute appropriate deltas one the fly during
censor/strip operation with revlog-v2.

Differential Revision: https://phab.mercurial-scm.org/D10799
Pierre-Yves David
revlog: add a function to build index entry tuple

Keeping index entry as tuple make sense for performance reason, however it does
not means we need to manually build that tuple for all piece of python code that
are not performance critical.

So we add a nice function responsible to build the tuple using argument using
explicit keyword argument.

Differential Revision: https://phab.mercurial-scm.org/D10793
Pierre-Yves David
revlog: add docket method to request new content files

If we want to write content into new files, we need to be able to ask for them.
Pierre-Yves David
revlog: allow to pass an existing docket to `_loadindex()`

This will be when switching undelying files, for examples during censors and strip operation with rvlog-v2.

Differential Revision: https://phab.mercurial-scm.org/D10800
Pierre-Yves David
revlog: add a way to keep track of older uids in the docket

When the revlog content is rewritten, we will use new files, to avoid truncating
the previous ones. We need some way to keep track of the older files before we
clean them up.
Pierre-Yves David
revlog: simplify "partial read" error message

We are about to reuse this message in more places and the current handling is
pretty hard to read. So we eat two pie with one stone and clean up this.

Differential Revision: https://phab.mercurial-scm.org/D10784
Pierre-Yves David
censor: implement censoring for revlogv2

It is a bit verbose and rough, but it works.
Pierre-Yves David
revlog: use dedicated code for reading sidedata

We are about to introduce a new, dedicated, file to store sidedata. Before doing so, we make sidedata reading go through different code as reading data chunk. This will simplify some of the complexity of the next changesets.

The reading is very simple right now and will need some improvement later to
reuse some of the caching strategy we use for the data file.

Differential Revision: https://phab.mercurial-scm.org/D10785
Pierre-Yves David
util: add `nb_bytes` argument to `copyfile` to partially copy a file

When set, this allow to copy only the first `nb_bytes` of a file. This will be
useful for censor/strip operation with revlogv2.

Differential Revision: https://phab.mercurial-scm.org/D10798
Pierre-Yves David
revlog: use the new `entry` function in revlog.py

This just make the construction of the tuple clearer.

Differential Revision: https://phab.mercurial-scm.org/D10794
Pierre-Yves David
revlog: use `self.sidedata` directly to construct changelogrevision

We want to change `revlog._revisiondata` signature, so we need to migrate users

Differential Revision: https://phab.mercurial-scm.org/D10781
Pierre-Yves David
revlog: use entry in revlogv0.py

This make things clearer and we can reply on some of the default value directly.

Differential Revision: https://phab.mercurial-scm.org/D10795
Pierre-Yves David
revlog: fix docket.date_filepath docstring

This was copy-pasted too quickly.

Differential Revision: https://phab.mercurial-scm.org/D10786
Pierre-Yves David
revlog: implement sidedata without using _revisiondata

When they was introduced sidedata where grouped with the actual revision data
and unpacking one came with the other. Sidedata moved be stored "independently"
and it no longer make sense to retrieve both at the same time unconditionnaly.
We start with changeset the implementation of the `revlog.sidedata` command to
no longer use `self._revisiondata`. More users need to be migrated to direct
usage of this `revlog.sidedata` method. This will be done in the coming

Differential Revision: https://phab.mercurial-scm.org/D10780
Georges Racinet
cext: fix memory leak in phases computation

Without this a buffer whose size in bytes is the number of
changesets in the repository is leaked each time the repository is
opened and changeset phases are computed.

Impact: the current code in hgwebdir creates a new `localrepository`
instance for each HTTP request. Since any pull or push is made of several
requests, a team of 100 people can easily produce thousands of such
requests per day.

Being a low-level malloc, this leak can't be seen with the gc module and
tools relying on that, but was spotted by valgrind immediately.


  for i in range(cl_args.iterations):
      repo = hg.repository(baseui, repo_path)
      rev = repo.revs(rev).first()
      ctx = repo[rev]

  del ctx
  del repo
  # avoid any pollution by other type of leak
  # (that should be fixed in 5.8)



Resident Set Size (RSS), taken on a clone of
mozilla-central for performance analysis (440 000

  5.8+hg19.5ac0f2a8ba72  1000 iterations: 1606MB
  5.8+hg19.5ac0f2a8ba72 10000 iterations: 5723MB
  5.8+hg20.e2084d39e145  1000 iterations:  555MB
  5.8+hg20.e2084d39e145 10000 iterations:  555MB
        (double checked, not a copy/paste error)

(e2084d39e14 is the present changeset, before amendment
of the message to add the measurements)
Simon Sapin
rust: Use a maintained crate for SHA-1 hashing

https://crates.io/crates/rust-crypto hasn’t been updated in 5 years.
This doesn’t neccesarily mean there’s anything wrong with it, but if
something comes up it’s preferable to rely on libraries that have active

Use https://crates.io/crates/sha-1 from https://github.com/RustCrypto instead

Differential Revision: https://phab.mercurial-scm.org/D10835
Raphaël Gomès
convert-bazaar: use breezy package instead of old bzr one

Breezy is the most recent of the two, and works on Python 3 while being
compatible with the (old) Bazaar file format.

This patch contains a variety of unicode <-> bytes changes, API breakage fixing,
restoring failing imports and changing the executable from `bzr` to `brz`.

I recommend using the debian packages for `brz` and `python3-breezy` (3.1+),
because the pip package seems to be haunted by radioactive dragons.

Differential Revision: https://phab.mercurial-scm.org/D10513
Simon Sapin
rust: Parse "subinclude"d files along the way, not later

When parsing a `.hgignore` file and encountering an `include:` line,
the included file is parsed recursively right then in a depth-first fashion.

With `subinclude:` however included files were parsed (recursively) much later.
This changes it to be expanded during parsing, like `.hgignore`.

The motivation for this is an upcoming changeset that needs to detect changes
in which files are ignored or not. The plan is to hash all ignore files while
they are being read, and store that hash in the dirstate (in v2 format).
In order to allow a potential alternative implementations to read that format,
the algorithm to compute that hash must be documented. Having a well-defined
depth-first ordering for the tree of (sub-)included files makes that easier.

Differential Revision: https://phab.mercurial-scm.org/D10834
Simon Sapin
rust: Make some file path parameters less generic

These are not widely used APIs that benefit from being maximally flexible,
taking an explicit `&Path` borrow is fine and simplifies their internals.

Differential Revision: https://phab.mercurial-scm.org/D10833
Martin von Zweigbergk
rewriteutil: add pointer to help text when rewrite would cause divergence

The evolve extension's version of the hint has this pointer. I missed
it when I moved it to core. This is pretty much the same as
D10723. Turns out I missed two places :(

Differential Revision: https://phab.mercurial-scm.org/D10832
Simon Sapin
rhg: Add support for dirstate-v2

Differential Revision: https://phab.mercurial-scm.org/D10804
Raphaël Gomès
bzr: only support bzr conversion on Python3

Python 2 support will be dropped from Mercurial before anyone needs to do a
bzr -> hg conversion on Python 2 again. Bazaar tests were broken with the new
lib anyway, which we'll get into in the next patches.

Differential Revision: https://phab.mercurial-scm.org/D10512
Simon Sapin
rhg: Remove some intermediate Vecs in `rhg files`

Instead of calling `parse_dirstate` which then calls `parse_dirstate_entries`,
call the latter directly in order to skip some intermediate steps.

Differential Revision: https://phab.mercurial-scm.org/D10803