Skip to content
Snippets Groups Projects
user avatar
Pulkit Goyal authored
Before this patch, if you try to widen a narrow clone without ellipsis enabled,
it will be broken and the exchange.pull() done by tracked command to widen the
clone will be no-op because no custom logic exists for this and server sees that
we have all csets and it says `no changes found`.

The widening with ellipsis send KILL for existing changegroups and send new
changegroups because of the change in ellipsis hash, but we can prevent that in
non-ellipsis cases.

This patch adds server side logic to send the changegroups for the changesets
which are on the client again with filelogs and manifests for the new includes.
This is a very starting implementation and we send changegroups and manifests
too while we can prevent them.

Following things can definitely be improved in the logic this patch adds:

  1) Send just the filelogs and treemanifests
  2) Send the filelogs only for the additions in the include

I tried 1) here but the code is coupled tightly and the way I was able to do
that was hacking into the changegroup generation code in a very dirty way, like
adding conditionals and preventing the yield.

This patch also adds a 'widen' kwarg to prevent other commands except widening
to go through that codepath.

The test changes demonstrate that the new implementation is correct and fixes
things.

Differential Revision: https://phab.mercurial-scm.org/D4383
c8e4eae8
History
Name Last commit Last update
contrib
doc
hgdemandimport
hgext
hgext3rd
i18n
mercurial
rust
tests
.arcconfig
.clang-format
.editorconfig
.hgignore
.hgsigs
.hgtags
.jshintrc
CONTRIBUTING
CONTRIBUTORS
COPYING
Makefile
README.rst
hg
hgeditor
hgweb.cgi
setup.py

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

$ make # see install targets
$ make install # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg # see help

Running without installing::

$ make local # build for inplace usage
$ ./hg --version # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.