Summary:
Change the test to test extras instead of branches so it could still work
once `hg branches` gets removed.
Reviewed By: phillco
Differential Revision: D13934439
fbshipit-source-id: 60860936f60e177e12547345cbbd7591b1161a6f
Summary:
Change the test to test extras instead of branches so it could still work
once `hg branches` gets removed.
Reviewed By: phillco
Differential Revision: D13934445
fbshipit-source-id: e15c5b652481fcf95df851cdda8998764a98660c
Summary:
Not sure why it's unstable. But the fetch stat gets printed sometimes. Add it
as an optional line.
Reviewed By: phillco
Differential Revision: D13934444
fbshipit-source-id: 3c39737fe95b1572ffcf672a7d8d431218202402
Summary:
The test was about warning of "heads". We allow multiple heads and have already
disabled some checkheads code paths (ex. D8148016). With commit cloud multiple
heads are a norm and not something that should be warned.
Reviewed By: phillco, singhsrb
Differential Revision: D13934438
fbshipit-source-id: e2e4971e05c5e0ca3ed4a5160c16d90f4f847e5f
Summary:
The test was testing "fast-forward" merge, like:
b
|
a (working copy, run "hg merge b && hg ci -m merge")
It's a no-op without branches. But if "a" and "b" have different branches, the
merge would do something and create a merge commit.
Without named branches, fast-forward merge would always be a no-op. Therefore
remove the test.
Reviewed By: phillco, singhsrb
Differential Revision: D13910539
fbshipit-source-id: 9f5a7817a3ff012d429810da3d54ab2174371bd0
Summary: Implemented logic for fetching data from the scmmemcache and the server in pack files format. By default `prefetch` will still use loose files, unless the `remotefilelog.fetchpacks` config flag will be set to true.
Differential Revision: D13905733
fbshipit-source-id: cc559f5bc600067199a91efe6cf44b1bde6bf69b
Summary:
In some cases we are mounting ntfs in a linux host using ntfs.3g and we
want to prevent it from writing symlinks that can't be read from Windows.
Some background, ntfs.3g supports symlinks, but it produces IntxLNK which cause
problems when mounted into a real Windows machine. We don't support symlinks on
Windows anyway, so we want to just disable this. Unfortunately it's difficult to
detect if we're on a ntfs.3g fuse mount, so instead we're just going to have the
machine set up the repo with this extension enabled.
Differential Revision: D13964546
fbshipit-source-id: 7545538e51be4c986a50161165d7cc2e64280555
Summary:
The default value is specified in configitems.py. Remove the `default`
argument.
Reviewed By: phillco
Differential Revision: D13909730
fbshipit-source-id: ca45c63be7d48e04e71a6f5b3b682f625a3030f6
Summary:
This reverts the upstream changeset:
changeset: 66ecde8a704d9fa92bd99720923524c4bd3f315b
user: Boris Feld <boris.feld@octobus.net>
date: Wed, 15 Nov 2017 18:52:42 -0800
summary: server: introduce a 'experimental.single-head-per-branch' option
Named branches are going to be removed. Remove experimental dependent feature.
Reviewed By: phillco
Differential Revision: D13909727
fbshipit-source-id: 3baf101e5a038b58bc01506826b631a2a58a7782
Summary: Named branches are going to be removed. Remove directly related tests.
Reviewed By: phillco
Differential Revision: D13909726
fbshipit-source-id: 6f7f39b4129bb5840a90501ef251b3f5971c82fe
Summary:
We're seeing issues where a file show up as "M" while it isn't expected so. When
running "hg status" again, the file disappeared. Existing logs suggest that
watchman does not think anything has changed between the two "status" commands.
Therefore add more logs of the internals to try to get more insights.
Differential Revision: D13954209
fbshipit-source-id: 0b89a6da5e8702e707440ef2e1823eb4968c10be
Summary:
pushrebase has logic that loops through all the files and builds a list
of what has changed. Unfortunately, Mercurial has some optimizations where if
the manifest isn't loaded already, it tries to only load the manifest delta, and
checks if this might be a good idea by first checking if the file is in the
commit metadata file list. The commit metadata is a list, which makes it a O(n)
scan to check containment. Since we do this for every file, it becomes O(n^2).
To avoid this, let's just make sure the actual manifest is loaded.
Once every repo is a tree repo, we can get rid of the manifest delta
optimization and get rid of the need to prefetch here.
Reviewed By: singhsrb
Differential Revision: D13944829
fbshipit-source-id: c0f33ca650b7956a1f39e961c94678a6f7f380b6
Summary:
During pushrebase there is code that says 'for each file, do some work
that involves listing the changed files'. Because we reparse the list each time,
this becomes n^2 behavior. Let's cache the list to avoid this.
Reviewed By: singhsrb
Differential Revision: D13944830
fbshipit-source-id: 4fd0dbf26b6cee9d0c01879cafb9837262f7afa0
Summary: Extend the option to disable `incoming` to also disable `outgoing`.
Reviewed By: markbt
Differential Revision: D13877971
fbshipit-source-id: c4f994d536dda5db7c0e9f14656be48fc757c237
Summary: In repositories which change quickly, the incoming and outgoing commands aren't useful. Add an option to disable these commands.
Reviewed By: markbt
Differential Revision: D13859604
fbshipit-source-id: c4784b7eafbe3c4a6cf03686f1431204089b0155
Summary:
The simplecache test attempts to connect to a memcache instance on localhost.
This means the test fails if a memcache instance is not available.
Remove the use of memcache in the test. We still test local files, and assume
that memcache itself works.
Also corrupt the correct key when testing corruption handling, and document the
config options.
Reviewed By: quark-zju
Differential Revision: D13818471
fbshipit-source-id: 6ca7f575aa813f95773144be5337796f029ffd90
Summary:
Move all Rust bindings to a single python extension, `bindings`. This should
improve compilation time and make things simpler.
Reviewed By: quark-zju
Differential Revision: D13923866
fbshipit-source-id: 560592b5a6c0c4f1b836c755ef123666a1059164
Summary:
We will probably not be supporting secret phase in the future anyway
so lets get rid of it.
Reviewed By: quark-zju
Differential Revision: D13928907
fbshipit-source-id: 7edcd84d2ee3c37124dcf9d3ba92c0610d074157
Summary:
Add an option that let's us specify the date of each commit in a pushrebase.
It should be specified via a config option, which accepts a name of a file in
which json dictionary should be stored. Key of this dictionary is a commit hash, value
is a date.
Reviewed By: ikostia
Differential Revision: D13803174
fbshipit-source-id: 6271c18c61399b89c92dce7a4fe63c8fae8dae7c
Summary:
The rename to edenscm broke the test.
(Note: this ignores all push blocking failures!)
Reviewed By: phillco, ikostia
Differential Revision: D13900989
fbshipit-source-id: ad04fcb6889a273bb39901b2288ae1aef74531a6
Summary:
Original commit changeset: 1cdd43658889
Trying to enable this again.
The details are in the original diff: D13622994
Reviewed By: quark-zju
Differential Revision: D13801916
fbshipit-source-id: a7a1aee6faa0d1db7535dfd3cfab523829c62900
Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.
Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.
Reviewed By: phillco
Differential Revision: D13868981
fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
Summary:
Move top-level Python packages `mercurial`, `hgext` and `hgdemandimport` to
a new top-level package `edenscm`. This allows the Python packages provided by
the upstream Mercurial to be installed side-by-side.
To maintain compatibility, `edenscm/` gets added to `sys.path` in
`mercurial/__init__.py`.
Reviewed By: phillco, ikostia
Differential Revision: D13853115
fbshipit-source-id: b296b0673dc54c61ef6a591ebc687057ff53b22e
Summary:
The tempfile rust crates opens the file with RW permissions for the user only,
but once written out to disk, the permissions needs to be readable by everyone.
Unfortunately, rust doesn't have a portable way of doing this, so we have to
resort to using `if cfg!(unix)` conditions for doing this.
Reviewed By: DurhamG
Differential Revision: D13703406
fbshipit-source-id: 688bc679b5c1a7943ceab723c1f649d555b61a7a
Summary:
Loosefiles are still being fetched from memcache, and thus until we switch
memcache to provide pack files, repack needs to be able to handle loosefiles.
We could either implement the loosefile repack logic in rust, or we could just
let the python code do it. Since we plan on having memcache serve pack files
soon, the second approach is prefered as it result in the least amount of work.
Reviewed By: DurhamG
Differential Revision: D13707886
fbshipit-source-id: 5373b61f9749c158e6dfb026f6b12a7dd2a67802
Summary:
Replace the `-w` option of the commit cloud commands that process workspace
names with general options of the form:
* `-u` or `--user` - to select the workspaces of a particular user.
* `-w` or `--workspace` - to select a particular workspace for that user.
A (hidden) `--raw-workspace` option is provided to allow use a workspace
by its exact name, should that be needed.
The `-w` option still accepts full user workspaces, but shows a warning.
These options apply uniformly to any command that takes a workspace.
Reviewed By: liubov-dmitrieva
Differential Revision: D13730839
fbshipit-source-id: d1b884b100caf909619511db4861eb1b880a0d3e
Summary:
Commit cloud maintains the infinitepush backup state to match what it has
synced to commit cloud. It should only include locally backed-up heads.
When syncing with the server and omitting some heads, don't include the omitted
ones.
Reviewed By: liubov-dmitrieva
Differential Revision: D13719477
fbshipit-source-id: 817c1a73a34af6b5550f6254e2b08d01283760a5
Summary:
We should not be attaching copy headers to lfs metadata blobs since
they store the data separately. All this logic was a little overly complicated.
The file text we receive should be passed through unmodified in all cases except
when storing in the loose file format, which needs to strip the copy metadata
from the blob.
Reviewed By: ikostia
Differential Revision: D13703708
fbshipit-source-id: d7e4eb703599d2355009efe070833013d1fcd4fc
Summary:
Enabling packlocaldata is causing local move data contents to be
corrupted by the copy header being tacked on the front. Let's add a test
demonstrating the failure.
Reviewed By: ikostia
Differential Revision: D13703709
fbshipit-source-id: d891042a5cab639a4533a89a508865115c482ba1
Summary:
In our linux deployments it was relatively straightforward
to import the mercurial runtime from a python process running the
system python executable. Our macOS deployments are a lot more
complex because they do not use the system python and do not install
the mercurial python packages in the python path of the target
python executable.
It is simpler to move the import helper functional into a mercurial
command that we can invoke instead of our own helper program.
This diff moves the script to be a debug command and adjusts its
argument parsing to match the mercurial dispatcher requirements.
There are some stylistic mismatches between this code and the
rest of mercurial; I'm suggesting that we ignore those as the
medium term solution is that this command is replaced by eden
directly consuming the rust config parsing code and by native
rust code to perform the data fetching that we need.
Reviewed By: pkaush
Differential Revision: D13522225
fbshipit-source-id: 28d751c5de4228491924df4df88ab382cfbf146a
Summary:
Directory listing is different in every OS, and due to the current repack
implementation, this directly affect the order in which the packfiles are added
to the new one. Since the resulting packfile name depends on the hash of its
content, the name was influenced by the directory order.
By sorting the files in list_packs, the packfile name will be independent of
the directory listing and thus be the same for all the OSes.
Reviewed By: singhsrb
Differential Revision: D13700935
fbshipit-source-id: 01e055a0c1bcf7fb2dc4faf614dfb20cd4499017
Summary:
This ports the logic from `eden/hg/eden/` to `scm/hg/mercurial/`.
Note this does not delete the logic from `eden/hg/eden` as part of this
change because we may continue to do Eden releases before we roll out a
version of Hg with this code. Only once Hg has been rolled out everywhere
[that is using Eden] can we consider removing
`/usr/local/fb-mercurial/eden/hgext3rd/eden`.
Reviewed By: quark-zju
Differential Revision: D10316761
fbshipit-source-id: cae1dfad831ad6505590628cf969897167e84b30
Summary:
The user, description, and bookmarks must be converted from the local encoding
before they can be included in the JSON object, as JSON can only contain UTF-8
strings.
Note that `crdump` will not work with filenames that are not UTF-8 encoded.
This doesn't fix that.
Reviewed By: HarveyHunt
Differential Revision: D13635999
fbshipit-source-id: 5379656e39b73d7d7f905d06de50851f17c54e8b
Summary: For now, combine all files smaller than 100MB that accumulate to less than 4GB.
Reviewed By: DurhamG
Differential Revision: D13603760
fbshipit-source-id: 3fa74f1ced3d3ccd463af8f187ef5e0254e1820b
Summary:
Update pest to 2.1.0.
This version has a new behaviour for parser error messages: the line feed at
the end of the line is shown in the error output.
Reviewed By: wez
Differential Revision: D13671099
fbshipit-source-id: b8d1142a44a56a0b21b3b72cf027f3f8a30f421e
Summary: In D13363853, a basic rust based repack was implemented, but couldn't be called from Python. For now, this version will be called when the repack.userust config is set, and when requesting a pack-only repack, as the rust version doesn't support loose objects (?).
Reviewed By: DurhamG
Differential Revision: D13555855
fbshipit-source-id: 83d53b33f2d3b6ae3167801d0594cd1490a0a09d
Summary:
D13646642 used the `--date` flag for the `touch` command which
unfortunately does not work on our prod OSX hosts. Therefore, lets switch to
the more compatible `-t` flag.
Reviewed By: DurhamG
Differential Revision: D13673021
fbshipit-source-id: 6f9e0234e7fd3d4c345bedecdd2197949d71c420
Summary:
Generalise the `migrateonpull` mechanism of `treestate` into a generic
`automigrate` step that is invoked at the start of pulling. This will be used
for other migrations in the future.
Reviewed By: liubov-dmitrieva
Differential Revision: D13608718
fbshipit-source-id: d558dc21176a6b8d786836d06414e3fc88a20d47
Summary:
We've observed some users with very large hgcache directories that were filled
with temporary pack files that for some reasons were not removed/renamed on a
previous repack.
These files can appear due to a variety of reasons, such as forcibly killing
hg, or a host power-off, or simply due to a bug in mercurial. It is likely that
the later case is what causes some of the hgcache directories to grow and this
patch doesn't attempt on finding the underlying mercurial issue. Rather, let's
alleviate the issue by simply removing the temporary files older than 24h.
Reviewed By: ikostia
Differential Revision: D13646642
fbshipit-source-id: faa0605e322d440a75187e2517cbbcb13031dae0
Summary: If the there is no changeset left after sparse skip in `--command` mode, show the result and return, as it's done in manual testing mode.
Reviewed By: markbt
Differential Revision: D13650568
fbshipit-source-id: 8e867a38858d84d9a10078b74e2087318c81b01e