Summary:
hgsubversion has some logic that tries to read the list of files in a
given directory. In a tree-only world, it turns the entire tree into a text
file, then splits it by line and bisects over it.
Let's instead use the walk function, which is optimized for this kind of thing
on trees.
Reviewed By: quark-zju
Differential Revision: D12969497
fbshipit-source-id: ef3af9e0022978d6a4922cbb464bfd14248f5501
Summary: For the sake of incremental builds and `make local`.
Reviewed By: quark-zju
Differential Revision: D13058780
fbshipit-source-id: f59dc235e75232b475ca0c2504b47ff0d4a64c8a
Summary:
Add "--dry-run" for fix-code.py and use it in test-check.
This avoids license header and version = "*" issues.
Reviewed By: ikostia
Differential Revision: D10213070
fbshipit-source-id: 9fdd49ead3dfcecf292d5f42c028f20e5dde65d3
Summary:
This is done by running `fix-code.py`. Note that those strings are
semvers so they do not pin down the exact version. An API-compatiable upgrade
is still possible.
Reviewed By: ikostia
Differential Revision: D10213073
fbshipit-source-id: 82f90766fb7e02cdeb6615ae3cb7212d928ed48d
Summary:
`version = "*"` is not a good pattern. This script reads Cargo.lock and writes
down the version explicitly. This helps the OSS build.
Reviewed By: ikostia
Differential Revision: D10213074
fbshipit-source-id: 39720d895a5788b68d3e9d183d5e8941abc8c048
Summary:
This is a shorter, rewritten version of "WritingExtensions".
"WritingExtensions" is too verbose and some code examples are outdated.
Reviewed By: markbt
Differential Revision: D10287050
fbshipit-source-id: f989172c4a683142983e17d3fa9dbddfd8252586
Summary:
Add a new config option: `commitcloud.max_sync_age`. When set, commit cloud
will not pull in any commits that are older than this when it is joining or
syncing. The commits are still nominally in the cloud workspace, we just
save join or sync time by not including the commits.
Reviewed By: liubov-dmitrieva
Differential Revision: D13062470
fbshipit-source-id: 17a4bdb4095766a83a4bf6d4151ae86b39edf59c
Summary: This commit reverts an earlier change in D12950765 that removed options from 'hg smartlog'
Reviewed By: kulshrax
Differential Revision: D13029915
fbshipit-source-id: f514dca841cf9a48a46255c4eb0b376d8f0d2761
Summary: Log the uploading time spend and the downloading size when hg is using lfs
Reviewed By: ikostia
Differential Revision: D12993962
fbshipit-source-id: c53b189a12c60eece47dbbab0852fcfea9471363
Summary:
tweakdefaults used to do this if configured.
After dicussion with the team, we decided that returning 1 was not a helpful design decision, so we're going to fold this in here and everywhere.
Reviewed By: singhsrb
Differential Revision: D13050548
fbshipit-source-id: 66e834ea503e4b1339e369495a9729b951024a6d
Summary:
These commands should be able to use the full workspace name as well
Also the fix for commit cloud test file is included
Reviewed By: markbt
Differential Revision: D13042297
fbshipit-source-id: ac8c907292e2d15b72f56ef1cc831add5523b990
Summary:
debugcommand for receiving several lfs objects from server
Analog to the funtion `debuglfsreceive`, but for several objects
Will be used in replay traffic for Mononoke LFS.
Requires URL and an iterable with oids and sizes.
Format required:
url, (oid1, size1, oid2, size2, ... )
Write all files to the console.
Reviewed By: quark-zju
Differential Revision: D12956274
fbshipit-source-id: f83dd0636b2ad197cace9633222d0f1ed8191dab
Summary:
This allows us to expose `arc pull`'s functionality directly from hg.
There are three parts:
- Create a revset that runs a program, reads the stdout and looks up that commit if it exists
- Auto-pulling if the commit doesn't exist
- Supporting an optional argument (target) that's passed to the script
Reviewed By: DurhamG
Differential Revision: D10524541
fbshipit-source-id: 7493c5592e272f9e8a87f109cec1426d44935ecc
Summary:
We need to record updated onto rev instead of guessing it in pushrebase replayer.
I will not land this diff until mononoke db schema is update D12923144, D12997125
Reviewed By: quark-zju
Differential Revision: D12922833
fbshipit-source-id: 11c6411c392ca9092be53ffba8baa074faf3a996
Summary:
Previously, if we were writing local data to pack files we weren't able
to read that data until the pack file had been flushed. Let's add those mutable
packs to the union store so we can see there data.
This is important for unblocking use of hggit and hgsubversion since they may
import many dependent commits in a single transaction.
Reviewed By: quark-zju
Differential Revision: D12959497
fbshipit-source-id: 405c0c5c1e8fc84bc8ffef827a84e91d57eb95d8
Summary:
The config to write local packs has an issue with reading data from
currently pending mutable packs. Let's add a test demonstrating this, and in the
next diff we'll fix it.
Reviewed By: quark-zju
Differential Revision: D12959501
fbshipit-source-id: 5bcb278ccb977cea83e8cd594a404816d4f8f1fa
Summary:
Previously these were stored on the remotefilelogcontentstore, which is
a weird place since it's generally responsible for loose files. Now that we have
the fileslog abstraction let's move the mutable packs on to it.
This mirrors the manifestlog pattern.
Reviewed By: quark-zju
Differential Revision: D12959496
fbshipit-source-id: 25649570a44b50e9baa558b85ba00605883fd403
Summary:
A future diff will use the same mutable*store pattern to allow pending
file mutable packs to be read from the store. The mutablemanifeststore is
generic and can be reused, so let's move it and rename it.
Reviewed By: quark-zju
Differential Revision: D12959493
fbshipit-source-id: 82710b4d157eb3194440ea630dd458b382896a39
Summary:
Now that all the file store creation logic is inside the fileslog
abstraction, let's also move the storage of all the stores onto this instance,
instead of having them hanging off the repo object.
This matches the manifestlog pattern and gives us better control over the
lifetime of all the filelog stores.
Reviewed By: quark-zju
Differential Revision: D12959500
fbshipit-source-id: f07f8b52bb83a7837e6dc02664bec6111df7a421
Summary:
As part of unifying file storage into fileslog, let's move the store
creation logic into fileslog. It still puts the stores on the repo directly, but
a future diff will come back and fix that so the stores are kept on the fileslog
object.
Reviewed By: quark-zju
Differential Revision: D12959498
fbshipit-source-id: f3defc88b34c74c95bf1604f194b1b5883bad24d
Summary:
We had remotefilelog specific logic in core mercurial code. Now that
we have the fileslog abstraction we can hide remotefilelog specific invalidation
in a remotefilelog specific fileslog implementation.
Reviewed By: quark-zju
Differential Revision: D12959495
fbshipit-source-id: ccf224bf9799eb1af74f0dff6021fcbc2eb20d68
Summary:
In upcoming diffs I want to introduce lifetime management for
structures receiving writes for file content. We need to be able commit these at
the end of a transaction, and roll them back in the event of an abort.
We already have this, but it's adhoc and inconsistent. Let's introduce the
concept of a fileslog on the repository that is responsible for all filelog read
writes. At the moment it doesn't manage reads, and only governs remotefilelog
writes, but we can extend this later.
This pattern of a top level repo.*log property that manages the reading/writing
of a type of object is already used in the manifestlog and has proven to be
relatively clean.
Reviewed By: quark-zju
Differential Revision: D12959494
fbshipit-source-id: 676aa86c313cb7e48512091a9c19b9452e8f114a
Summary:
Previously, remotefilelog tried to hide which store should receive
writes behind the union store abstraction. This is starting to make things a
little complicated though. For instance, it means that right now both local data
and local history are written via one api on the remotefilelogcontentstore, even
though the remotefilelogcontentstore should only be about data. It also means
that remotefilelogcontentstore had to become aware of pack files, which it can't
read, so it no longer upholds the guarantee that anything written to it can be
immediately read. Overall it's just confusing.
This diff rips out the writestore concept, and instead has the store setup logic
store the writable stores directly on the repo, and changes the write path to
write to those stores directly. Thus removing the notion of pack files from
remotefilelogcontentstore.
A future diff will clean this up even further, and fix the bug where you can't
read data that was just written to a local pack.
Reviewed By: quark-zju
Differential Revision: D12959502
fbshipit-source-id: 85c39c0696febd0972a21f22f3640fd6954901c1
Summary:
The "misc" benchmark requires the base16 module to be public. It was made
private in a previous change. Let's make it public again so the benchmark can
run.
Reviewed By: singhsrb
Differential Revision: D13015031
fbshipit-source-id: 0dc1542803aae290de26651e367898eebfc95e83
Summary:
This will help us in identifying commonly conflicted files/artifacts.
Alas, I think SVN only includes one path in the error message. But better than nothing.
Reviewed By: quark-zju
Differential Revision: D13009975
fbshipit-source-id: 220bcaa679222718c58e42174f28fd0bbeb618d2
Summary:
The Rust condition implemenation seems working okay. Therefore drop the support
to switch to buggy `threading.Condition`.
Reviewed By: phillco
Differential Revision: D12875128
fbshipit-source-id: 15f41bdc3fceeaa7de7d8cdbd76ee6d70951c107
Summary: This is the final step to make CAT authentification work
Reviewed By: markbt
Differential Revision: D12975214
fbshipit-source-id: e445ca502f8abaac914140f3f30476d50b3c2fbc
Summary:
To solve friction with OAuth tokens we will support CAT tokens as well in Scm Daemon.
Icebreaker support has been done in D12942971
CATs tokens can be generated on dev servers without user (via the tool based on TLS certs).
So we are going to use them in the next diff.
This will allow us to enable token-less cloud sync for everyone, scm daemon will use CATs.
Reviewed By: markbt
Differential Revision: D12962342
fbshipit-source-id: 173301387ee446622bf77b2d6bed6934b5ced2c3
Summary:
Basically if Unauthorized it will try to access the token again and restart all the subscriptions
rather than trying to reconnect with the same token in infinite loop.
We know OAuth tokens have potential to be invalidated.
CAT token (that we are going to support as well) will always be valid for some time - like 1 day, so we need a smooth way to recover from Unauthorized and issue a fresh token.
Reviewed By: markbt
Differential Revision: D12960843
fbshipit-source-id: 630c446c490b0724df38c61507ee555dc7ed7241
Summary: Jellyfish uses `hg debugcrdump` to get commit data, including binary files. Now we want in jf to be able avoid dumping binary files, so I added `--nobinary` option to crdump
Reviewed By: quark-zju
Differential Revision: D12981968
fbshipit-source-id: 669ef4cf8f6225b911f5085c1a47fb7242f259bf
Summary: This is a backport of my upstream patch https://phab.mercurial-scm.org/D4147
Differential Revision: D12970974
fbshipit-source-id: ed9d8db2e32818e6e5ab3f23f5a0097bfa2cc14e
Summary:
`@@ -1,1 +-1,0 @@` is not a valid patch hunk header.
Change it to `@@ -1,1 +0,0 @@`.
This is a backport of my upstream patch https://phab.mercurial-scm.org/D3737
Reviewed By: singhsrb
Differential Revision: D12970975
fbshipit-source-id: eb769e93076efc932a8c4be7387ba21933aae331
Summary: This has been broken after D12832280.
Reviewed By: quark-zju
Differential Revision: D12981581
fbshipit-source-id: 3f411260e24e623abb6f18814fa5b0bf87b416cd
Summary:
The way I wrote this, `if e.errno != errno.EEXIST or e.errno != errno.EACCES`
this condition never succeeds. So we're re-raising always, rather than falling
back to a `delete/rename` strategy.
Differential Revision: D12974035
fbshipit-source-id: 0b500d009315ba0094019a82576d5a3698b624b2
Summary: Updated the global help summaries that are displayed for each command when you run 'hg help' and fixed corresponding tests
Reviewed By: markbt, kulshrax
Differential Revision: D12832280
fbshipit-source-id: 950dad1c805feab573d7d0182da523ae12299d3b
Summary:
Our `rename` is not atomic:
```
def rename(src, dst):
"""Rename file src to dst, replacing dst if it exists"""
try:
os.rename(src, dst)
except OSError as e:
if e.errno != errno.EEXIST:
raise
unlink(dst)
# What if the process is interrupted here?
os.rename(src, dst)
```
However, the `MoveFileEx` Windows API provides a way to to
replace the existing file, thus eliminating the need to do `unlink`.
Unfortunately, it only works for files, not for dirs, therefore
we're introducing a new file-specific rename function.
Differential Revision: D12940555
fbshipit-source-id: a6749a9b16a285788de0f5c06d51a15c919166ce
Summary:
If the commits being pushrebased don't actually need to be rebased, pushrebase
will accept them like a normal push. In this case we shouldn't prevent them
from be changed to public commits on the client.
Track this by detecting whether we receive a changegroup part from the server.
If we do, only the commits that are marked as replaced with obsmarkers (if
enabled) can be marked as public.
Reviewed By: quark-zju
Differential Revision: D12944851
fbshipit-source-id: 44f8fc17b36397d949cba5d3e787fad813bab4ea
Summary:
When pushrebase is enabled, pushing a commit that doesn't result in any
rebasing action acts like a normal push (the commit is not modifed and a new
hash is not returned), however the phase update doesn't apply, so the commit
remains draft.
Reviewed By: quark-zju
Differential Revision: D12944850
fbshipit-source-id: 2145d9b7eebc27bfdff34544e73802c13f30dbd2
Summary:
The vendored crates were changed by D12811597. Bump `zstd-sys` in `Cargo.toml` to be compatible.
As we're here, also bump rust compiler to 1.30.0 so it's consistent with buck build.
Reviewed By: kulshrax
Differential Revision: D12952552
fbshipit-source-id: 6274bf829b98b16aeb6795209d12aba8b475b46d
Summary:
D12888964 added the capability for `svnrev` revsets to be
interoperable with the `globalrev` revsets. This commit adds the tests for it.
Reviewed By: quark-zju
Differential Revision: D12888960
fbshipit-source-id: 07b12632d534a329c32179e978b058b1e427e688
Summary:
The capturing UI is not required as we can use the much cleaner
`ui.pushbuffer`/`ui.popbuffer` for the intended purpose.
Reviewed By: quark-zju
Differential Revision: D12906912
fbshipit-source-id: ae93e6417135ca23b28a11af63745464344fa3cf
Summary:
This method always prints the graph for the commits in the repository.
This commit adds supports for specifying any revset as input for the log and
also, makes printing the graph optional.
Reviewed By: quark-zju
Differential Revision: D12888965
fbshipit-source-id: 794606fa17f9836fd73675d36d11220b11994f41
Summary: The `svnrev` is more useful than the `rev` in this context.
Reviewed By: quark-zju
Differential Revision: D12888963
fbshipit-source-id: a902c57ecc3bc3eca9da77ab6e14ef58512d5ad8
Summary:
This is required for testing `globalrevs` integration with
`hgsubversion`. In particular, we will test out whether we can resolve
`r<svnrev>/r<globalrev>` correctly later. Seems like this configuration should
be on during all the tests because it is the configuration we use in
production. Therefore, this commit in resolves revset string with prefix `r`
for all the `hgsubversion` tests.
Reviewed By: quark-zju
Differential Revision: D12888961
fbshipit-source-id: af9b2e1aea9771f42fe1fb2d3f9a759a926b1ce3
Summary:
This commit adds support for the `globalrev` and `svnrev` based
revsets to be interoperable. In particular, we want the commands
```
hg log -r "svnrev(<svnrev>/<globalrev>)"
hg log -r "globalrev(<svnrev>/<globalrev>)"
hg log -r "r<svnrev>/r<globalrev>"
hg log -r "m<svnrev>/m<globalrev>"
```
to resolve to a commit with <svnrev> as the corresponding svn revision number
and <globalrev> as the corresponding strictly increasing global revision
number.
Reviewed By: quark-zju
Differential Revision: D12888964
fbshipit-source-id: 1c4e6e2cf3febb5a1d8a476554ad62cc630dc96e