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:
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:
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:
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: 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:
`@@ -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: 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:
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:
We need a configuration option for specifying the starting revision
beyond which we will consider the global revisions associated with the commit
valid for the following reasons:
- It lets us have the flexibility to support `globalrevs` from a commit of our
choice.
- We need this configuration to decide when we should fallback to looking at
the `svnrev` instead of the `globalrev`.
Reviewed By: quark-zju
Differential Revision: D12888966
fbshipit-source-id: 46d6314886ed5074edb537ba340d5606ec354619
Summary:
It turns out data packs contain the exact mercurial file blob,
including the rename metadata header. This is different from how loose files work, which
contain the non-headered text and instead store the rename in the history at the
end of the file.
Ideally we'd change datapacks to not store the metadata version of the file, but
unfortunately this is how it has always been, so instead we must change the
commit-straight-to-pack code to write the headered blob.
Differential Revision: D12936247
fbshipit-source-id: 3f909d2964d7f7200ac0e31e47bd195b0c9b03e5
Summary: Not all of the repos are remotefilellog, so I moved some invocagions of the content store to shallowrepo and added requirements check where the transaction is processsed in localrepo
Reviewed By: quark-zju
Differential Revision: D12881916
fbshipit-source-id: 1119debd1e3d42cdf9513a6cae4bad4c000cc046
Summary:
Based on discussions about the best approach for solving the amend message
problem, back out the template previously added. We will use a different
approach.
Reviewed By: mitrandir77, liubov-dmitrieva
Differential Revision: D12921753
fbshipit-source-id: ca760ffe14bfe473b7526a1b84a8cfc6b0257bf2
Summary:
It turns out tracking ignored files does have an impact on status performance.
Filtering out the ignored directories is not that fast, and ignored files can
be scattered everywhere (like ".pyc", ".iml" files) that makes them harder to
be filtered out efficiently.
Add code paths to migrate between "ignored tracked" and "ignore untracked".
Store the metadata in treestate.
Reviewed By: phillco
Differential Revision: D12916021
fbshipit-source-id: e02d0c6f3b1a036f70703c11f35381c594e2f8e5
Summary: This is to replace `debugstate -v`. The latter does ont list untracked files.
Reviewed By: DurhamG
Differential Revision: D12906649
fbshipit-source-id: b84f41dfadff4932c0ddd48480a4aa03db88cab0
Summary: We'd like to identify which of the three underlying conditions cases this exception.
Reviewed By: quark-zju
Differential Revision: D12870572
fbshipit-source-id: 45724ad6bb3582c04a6ea3c0b7a748bf72219b93
Summary:
This test is broken after D12849852 because the grep outputs the files
in different order during multiple test runs. Let's fix it by sorting the
output from the command.
Reviewed By: phillco
Differential Revision: D12869810
fbshipit-source-id: 49073e83e926e94db5f0bd290d74845ebfde0bb6
Summary: This is nicer for the user and makes the test not be flakey.
Reviewed By: quark-zju
Differential Revision: D12860852
fbshipit-source-id: 6ccb0ca679dc25a80730e83a26a39dd3becb5c8f
Summary: This fixes the "hg prev" targetting the first commit in the repo. The problem was the rev `0` which casted to false in all the checks.
Reviewed By: phillco
Differential Revision: D12840237
fbshipit-source-id: 594a2725fa125ee713f347379c875ec54b80a53d
Summary:
This brings the config closer to what we use and uncovers some problems with
disallowemptyupdate itself.
Reviewed By: phillco
Differential Revision: D12840239
fbshipit-source-id: 77740b79114c7d901b0181e0e425aea4e9c7c570
Summary:
a couple of problems:
* The recent move from tweakdefaults also broke `bin` symbol, rendering
this feature completely broken for non svn backed repos
* The `bgr` tool knows about fewer corpuses than we do, so go directly
to the underlying C++ client binary
* Add configuration options for that binary
Reviewed By: phillco, farnz
Differential Revision: D12849852
fbshipit-source-id: 154d4822d097602505349d3f67b45f19c17a7bf8
Summary:
The recent changes to the progress engine to work around locking bugs removed
the `clear` step of `progress.suspend`. This leads to garbled output when
a progress bar is ongoing. Restore it by adding a new lock method to the
engine.
Also add a `--with-output` option to `hg debugprogress` to test this.
Reviewed By: mitrandir77
Differential Revision: D12838415
fbshipit-source-id: 83ed516b528d0b0bbe37945141d50b50da00ac8e
Summary:
We need a way for mergedrivers to be able to read ancestor data (to properly detect a backwards merge, such as during `hg backout`).
Passing it directly is tricky since passing a new kwarg to functions without `**args` raises a `TypeError`. We'd have to update the hook framework to catch this `TypeError` and re-run the hook without the kwarg, which would be hard to do cleanly.
Rather, we can just add this as a transient property on `mergestate`, which seems like an appropriate place for it. Any callers trying to read this when it hasn't been set will get an exception. But there aren't any other users of this field since it hasn't existed before.
Reviewed By: quark-zju
Differential Revision: D12827614
fbshipit-source-id: 48dc84f1e60232625c8f2a73e81b5bc223c22bb3
Summary:
The "fsmonitor returned" file list was made short by D9997658. Do the same
thing for notefiles.
Reviewed By: phillco
Differential Revision: D10865333
fbshipit-source-id: ff31cde04210363e6af04e5578543f1b16310b11
Summary:
If a "normal" file is clean, drop the "NEED_CHECK" bit.
Not very sure how NEED_CHECK can be set for the entire working copy while
`_poststatusfixup` does get executed. But it happened. Fix it by explicitly
removing NEED_CHECK from clean files.
Reviewed By: markbt
Differential Revision: D10865256
fbshipit-source-id: aafd3195a8acf39178bbc2d5f919345a7320f2b7
Summary:
If the NEED_CHECK bit was set accidentally (reason yet to know), there is no
way to recover automatically by running "hg status" without touching the files.
Add a test to show that.
Reviewed By: markbt
Differential Revision: D10865255
fbshipit-source-id: 60b6914a9cd778e60815f83ba98c29c9c5f88b34
Summary:
This test still fails on OSX because the messages with prefix
`remote:` are missing. It doesn't seem like we need those messages for the
actual testing. Therefore, adding the `-q` option to the affected commands to
remove the `remote:` messages for all the platforms.
Reviewed By: quark-zju
Differential Revision: D12829679
fbshipit-source-id: e53dca96b5511049ef240ed671705987cdd9eab1
Summary:
When syncing a commit cloud repo, if the user has put a bookmark on a public
commit that we don't have locally, also pull that public commit into the repo
so that we can put the bookmark on it.
Reviewed By: quark-zju
Differential Revision: D12815471
fbshipit-source-id: 080038e4e239170cad994ff4ab9326d787d1c0fa
Summary:
If you put a bookmarks on a public commit that one of your other synced
repos doesn't have, it will delete the bookmark when it syncs. This deletion
is then propagated to all your other synced repos. This appears to the user
like the bookmark just vanishing.
Reviewed By: quark-zju
Differential Revision: D12815470
fbshipit-source-id: 802f85433b9ad15db3fb9e82e1222224eff4ca88
Summary:
Introduce a new template config option `amend.messagetemplate`, which, when
set, is applied to the commit message when amend is run with the `-m` option.
The template is provided with the old message, as `oldmessage` as well as the
message provided on the amend command line, as `message`. This can be
configured so that the amend message only overrides part of the old message.
Reviewed By: quark-zju
Differential Revision: D10857454
fbshipit-source-id: 6eb6f33624fae32fc7a344769e39f5c7a78a3604
Summary:
The `truncate` tool isn't availble on OSX, so include our own in the test
suite.
Reviewed By: DurhamG
Differential Revision: D12815613
fbshipit-source-id: 510b2936f07c5193671baaeaec6620872c3ec982
Summary:
Add label annotations to the blame template indicating how old the line is
(bucketed into various ranges). Define colors for these labels so that recent
lines are white, and older lines fade through yellow to black.
Reviewed By: phillco
Differential Revision: D10869068
fbshipit-source-id: 2b99c84c115c3f9e408468f52b5754ff820fcec5
Summary:
Make the space for Phabricator diff numbers larger, and right-justify the
output. This makes it look better.
Reviewed By: phillco
Differential Revision: D10868646
fbshipit-source-id: 7cf50677560a15ef77cc3681063e902d8d9e7a18
Summary:
This makes tests closer to production setup and removes a bunch of "saved
backup bundle to ..." messages.
With D9236657, this should not hurt server-side performance.
Unfortunately a lot tests cannot be migrated easily, mostly because revision
numbers are used. They are left with a TODO.
Reviewed By: DurhamG
Differential Revision: D9237694
fbshipit-source-id: c993fce18f07aba09f6d70964e248af8d501575a
Summary:
The test infra does not handle "skip" state gracefully and treats skips as
"failure". That generated scary reports like hundreds of tests are failing.
Stop reporting skips to fix it.
An enivronment variable is added to get the old behavior.
Reviewed By: singhsrb
Differential Revision: D12808196
fbshipit-source-id: 2356a1d6fdfe1d2991d28368787c7d2b7b525b6b
Summary:
With the obsmarker copying feature, rebasing revs containing obsolete
relationship would result in the markers being copied correctly.
Reviewed By: phillco
Differential Revision: D7121486
fbshipit-source-id: a666ad65c2eccbfd26db813d4f792c66489ead8c