- Jan 15, 2020
-
-
Matt Harbison authored
Adapted from the Facebook repo[1]. The intent is to distinguish between the connection dying and getting served a corrupt blob. The original message: HTTP makes no provision to tell your client that you failed halfway through producing your response and won't have the answer they're looking for. So, if a LFS server fails while producing a response, then we'll report an OID mismatch. We can do a little better and disambiguate between "the server sent us the wrong blob" (very scary) and "the server crashed" (merely annoying) by looking at the content length of the response we got back. If it's not what was advertised, we can reasonably safely assume the server crashed. [1] https://github.com/facebookexperimental/eden/commit/2a4a6fab4e882ed89b948bfc1e7d56d7c3c99dd2 Differential Revision: https://phab.mercurial-scm.org/D7881
-
- Jan 14, 2020
-
-
Matt Harbison authored
This is the response object, not a request. Differential Revision: https://phab.mercurial-scm.org/D7880
-
Matt Harbison authored
Facebook also passes `util.bytecount()` as a pretty formatter here, but our progress bar doesn't support that. Differential Revision: https://phab.mercurial-scm.org/D7872
-
Matt Harbison authored
The parent in phabricator ends up being the last revision posted, so sorting the user input into ascending order should be enough to preserve the proper relationships. Differential Revision: https://phab.mercurial-scm.org/D7874
-
Gregory Szorc authored
ex.msg is always a str, since pywatchman uses str for exception messages. This commit removes a b'' from a string compare to avoid types mismatch and adds a coercion to bytes before stuffing the exception message on our local exception type, which uses bytes for the message elsewhere in this file. Differential Revision: https://phab.mercurial-scm.org/D7855
-
- Dec 23, 2019
-
-
Matt Harbison authored
This applies the new marker in the lfs handler to show it in action, and adds the test mentioned at the beginning of the series to show that fulltext isn't necessary in the LFS case. The existing `skipread` isn't enough, because it is also set if an error occurs reading the revlog data, or the data is censored. It could probably be cleared, but then it technically violates the interface contract. That wouldn't matter for the existing verify algorithm, but it isn't clear how that will change as alternate storage support is added. The flag is probably pretty revlog specific, given the comments in verify.py. But there's already filelog specific stuff in there and I'm not sure what future storage will bring, so I don't want to over-engineer this. Likewise, I'm not sure that we want the verify method for each storage type to completely drive the bus when it comes to detecting renames, so I don't want to go down the rabbithole of having verifyintegrity() return metadata hints at this point. Differential Revision: https://phab.mercurial-scm.org/D7713
-
Matt Harbison authored
The `skipflags` config was introduced in a2ab9ebcd85b, which specifically calls out downloading and storing all blobs as potentially too expensive. But I don't see any reason to skip blobs that are already available locally. Hashing the blob is the only way to indirectly verify the rawdata content stored in the revlog. (The note in that commit about skipping renamed is still correct, but the reason given about needing fulltext isn't.) Differential Revision: https://phab.mercurial-scm.org/D7712
-
- Dec 20, 2019
-
-
Matt Harbison authored
Trying to validate the fulltext of an external revision causes missing blobs to be downloaded and cached. Since the downloads aren't batch prefetched[1] and aren't compressed, this can be expensive both in terms of time and space. I made this a tri-state instead of a simple bool because there's an existing (undocumented) config to handle this, and it would be weird if `hg verify` were to suddenly start ignoring that config but an `hg recover` initiated verify honors it. Since this uses the same config setting, it too will skip rename verification (which requires fulltext, but not for LFS). [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-April/116118.html Differential Revision: https://phab.mercurial-scm.org/D7708
-
- Jan 13, 2020
-
-
Augie Fackler authored
When in a non-pure build of Mercurial, this will provide protections against SHA1 collision attacks. Differential Revision: https://phab.mercurial-scm.org/D7851
-
- Jan 10, 2020
-
-
Martin von Zweigbergk authored
This seemed to be about checking that the user hasn't updated away when we asked them to resolve merge conflicts. These days we call `cmdutil.checkunfinished()` and refuse to update, so the user shouldn't be able to get into this state. `test-rebase-interruptions.t` actually has some tests where it disables the rebase extension in order to be allowed to do some of these updates. That still passes, but I wouldn't personally haved cared if that failed. Differential Revision: https://phab.mercurial-scm.org/D7825
-
- Jan 11, 2020
-
-
Martin von Zweigbergk authored
This lets us make the in-memory and on-disk code a bit more similar. I'll soon also implement setparents() on the regular workingctx. Differential Revision: https://phab.mercurial-scm.org/D7822
-
Martin von Zweigbergk authored
This matches what the dirstate does (it reuses working copy parent's branch unless told otherwise). By moving the default out of `rebase.commitmemorynode()`, it will let us clean that up better later. Differential Revision: https://phab.mercurial-scm.org/D7821
-
- Dec 28, 2019
-
-
Matt Harbison authored
Flagged by PyCharm. `@`, `:`, `<`, `>`, and `{` aren't special characters. (I'm a bit surprised that it doesn't also want to unescape `}` in schemes.py.) Differential Revision: https://phab.mercurial-scm.org/D7767
-
Matt Harbison authored
Flagged by PyCharm. Most special characters lose their special meaning inside square brackets. The `-` in util.py doesn't need to be escaped because it is the last character in the set. Differential Revision: https://phab.mercurial-scm.org/D7766
-
Matt Harbison authored
Flagged by PyCharm, this form should be more readable. Differential Revision: https://phab.mercurial-scm.org/D7765
-
- Dec 30, 2019
-
-
Matt Harbison authored
This fixes ~70 tests when using an oxidized executable, bringing the current failure count down to 92 (with 110 skips) when templates/ is copied next to the executable. Differential Revision: https://phab.mercurial-scm.org/D7778
-
- Dec 07, 2019
-
-
Matt Harbison authored
This allows filesets to be resolved relative to `repo.root`, the same as other patterns are since f02d3c0eed18. The current example in contrib/ wasn't working from the tests directory because of this. Differential Revision: https://phab.mercurial-scm.org/D7570
-
- Jan 03, 2020
-
-
Kyle Lippincott authored
I attempted this in 94670e124d29 but we didn't actually have any tests for this function it seems, and I mistook "it works now" for it being fixed (when what had actually happened was that my cache had populated enough that I didn't trigger the minimum threshold on my reattempts). Differential Revision: https://phab.mercurial-scm.org/D7785
-
- Dec 27, 2019
-
-
Matt Harbison authored
Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7762
-
Matt Harbison authored
Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7757
-
Matt Harbison authored
Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7756
-
Matt Harbison authored
Flagged by PyCharm. This variable is the index of a `for` loop below. Differential Revision: https://phab.mercurial-scm.org/D7755
-
Matt Harbison authored
Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7752
-
Matt Harbison authored
Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7751
-
Matt Harbison authored
Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7746
-
Matt Harbison authored
Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7741
-
Matt Harbison authored
Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7738
-
Matt Harbison authored
Caught by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D7735
-
Matt Harbison authored
PyCharm flagged this as a PEP 8 violation, for module level imports not being at the top of the file. Differential Revision: https://phab.mercurial-scm.org/D7734
-
- Dec 18, 2019
-
-
Kyle Lippincott authored
Most of this code was conceptually copied from what rebase does, with one small difference: hgext.rebaserev.rebase uses branchmerge=True, while I had to use branchmerge=False, or else it got really confused about updating to the same revision in some situations. I believe that the difference is that rebase is always dealing with *some* form of update - it never gets to mergemod.update if the source and destination are the same, while we can encounter that situation with fix. This may imply that this code has some issues with named branches that should be investigated. Differential Revision: https://phab.mercurial-scm.org/D7703
-
- Dec 23, 2019
-
-
Matt Harbison authored
This conceptually broke in 1541e1a8e87d when the filelog isa revlog relationship was changed to containment of the revlog. It was made more obvious in 62a532045e71 and related API simplification. It's resolved in favor of passing a revlog because the revlog verification code doesn't have a reference to a filelog. Differential Revision: https://phab.mercurial-scm.org/D7711
-
- Dec 18, 2019
-
-
Martin von Zweigbergk authored
As noticed by Yuya, I lost the _() call in 71fee4564410 (rebase: use rewriteutil.precheck() instead of reimplementing it, 2019-12-18). Differential Revision: https://phab.mercurial-scm.org/D7697
-
- Dec 17, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7687
-
Martin von Zweigbergk authored
As you can see from the patch, I disagree with most of the comment saying that `rewriteutil.precheck()` is not worthwhile. Differential Revision: https://phab.mercurial-scm.org/D7686
-
- Dec 18, 2019
-
-
Martin von Zweigbergk authored
After this patch, there's still another place in `rebase.py`, in the `--stop` code path, that reimplements `rewriteutil.precheck()`. I couldn't fix that place because it `rewriteutil.precheck()` checks that there is only one dirstate parent, which fails because we have two parents at that point. I think it's incorrect that rebase leaves the user with two parents during conflicts, but changing that is way out of scope for this series. Differential Revision: https://phab.mercurial-scm.org/D7685
-
- Dec 17, 2019
-
-
Martin von Zweigbergk authored
We have had this nice utility since 490df753894d (rewriteutil: add a precheck function to check if revs can be rewritten, 2017-11-24). We got two callers soon thereafter, in 98f97eb20597 (rewriteutil: use precheck() in uncommit and amend commands, 2017-11-28). It's about time we use it in other places. rewriteutil.precheck() looks unfortunate for i18n (it seems to rely on an English verb for the action making sense in other languages), but hopefully not bad enough that we should avoid using it. Differential Revision: https://phab.mercurial-scm.org/D7684
-
- Dec 13, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7646
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7645
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7644
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7643
-