Summary:
The extra call to encode makes everything a big slower, fortunately python
standard library provides functions that do the right thing.
Reviewed By: xavierd
Differential Revision: D19634034
fbshipit-source-id: 6bb0de26300c41667824422c016e8d4f0aee70d3
Summary: This makes hg pull make more progress.
Reviewed By: mitrandir77
Differential Revision: D19630124
fbshipit-source-id: 6e8d6bd441353ffbf87076addd2774d5e09dd24a
Summary: I think my editor eat the spaces incorrectly. Fix it.
Reviewed By: xavierd
Differential Revision: D19630482
fbshipit-source-id: 3a8b94cdb269b045f678e07d0f21975effbaf7f9
Summary:
S194477 was caused by a config change adding a custom path to
repositories, where the path had the same url as default. This caused all the
remotebookmarks to be associated with the new path instead of default.
This is subtle and undesirable. Let's make it so that the default path takes
precedence.
I also deleted a hggit test because it was causing the entire test to be skipped
when dulwich wasn't available.
Reviewed By: quark-zju
Differential Revision: D19627711
fbshipit-source-id: 55b3ce94f18a26ccb9471c8e96a584d3087dbb82
Summary: The wireprotocol for streaming clones should be explicitly bytes, encoding filenames as UTF-8 when needed. Make it so
Reviewed By: quark-zju, xavierd
Differential Revision: D19616097
fbshipit-source-id: 3513c801035c8d7ba950777aa119e1d1480013a5
Summary: This allows edenapi to be able to fetch trees on Python3.
Reviewed By: quark-zju
Differential Revision: D19629411
fbshipit-source-id: f6abd585d8d672854f7219ef8e3ab86d2f659118
Summary:
Provide an option to run an external script that calculates the rename
destination. This is especially helpful for cases where development happened in
another branch and *directory* and want to merge changes back.
For example, we recently had an experimental `scm3` branch that copies files
from `scm` to `scm3` to try out changes:
o master <-- rebase destination
|
o (changes in scm/)
:
| o (changes that need to backport to scm/) <-- rebase source
| |
| o (changes in scm3/ that got implemented differently in scm/)
| :
| o (copy scm/ to scm3/ for experiments)
|/
o
This allows `--config experimental.rename-cmd='sed "s#scm3/#scm/#"'` to be
used for the above case.
While working on this feature, I noticed a bug that if the "copy" information
is recorded, rebase might lose changes. I added a test to track that bug.
Reviewed By: mitrandir77
Differential Revision: D19609868
fbshipit-source-id: 94462889d3ce9214b48fac793852d16aeacecc77
Summary:
This removes the dependency of `future` (used by `import past`) which is not
available in our Windows tests.
Reviewed By: farnz
Differential Revision: D19626387
fbshipit-source-id: 2b13f08a9dafe77d1e7f6fc1a3cc48b3581681ca
Summary: The hex prefix should be in str, not bytes.
Reviewed By: mitrandir77
Differential Revision: D19627762
fbshipit-source-id: dc9b054198dc61614518fec9bba69f789326ff8b
Summary:
The names are really RepoPath, and thus let's use PyPath as a way to pass these
in.
Reviewed By: quark-zju, sfilipco
Differential Revision: D19625372
fbshipit-source-id: 4802030b91e6a065d3cb1905c770cad8a86da510
Summary:
In Python2, max allows None to be passed in, not in Python3, let's mimic the
Python2 behavior.
Reviewed By: sfilipco
Differential Revision: D19626654
fbshipit-source-id: f4fcaaa0516d898bc747d21735d2c30a4a9b41f4
Summary:
I've inspected how the data flows from struct.unpack through the remotefilelog
and annotated few functions.
In one place I've used encodeutf8 function
Reviewed By: quark-zju
Differential Revision: D19626711
fbshipit-source-id: 77499c567b0cddab17d21b4f11b06f58bf3fcaef
Summary: Let's have a module that defines types ussed commonly in HG
Reviewed By: quark-zju
Differential Revision: D19625872
fbshipit-source-id: 817535d87acee6cb5647bc8ad25df21a95bec09c
Summary:
Fixing up cleanup for hg3.
Seems to have a positive impact on regenerating the artifact after doing a rebase.
Reviewed By: quark-zju
Differential Revision: D19626379
fbshipit-source-id: 11caf0826ecb47440bcc532bfb7495771dc9159c
Summary: the request will be passed with the context, so simply check the context at all three "looping" points to see if the request was cancelled. I split this into its own diff due to its unique test plan.
Reviewed By: chadaustin
Differential Revision: D18647091
fbshipit-source-id: ccb7ac765f8f3b0a60e936779cc27b658b9fd8b9
Summary:
In any case in which our Inode is not materialized and we would like to continue to diff, we can take the hashes of both the Inode and the ScmEntry and start using the source control tree Differ.
Also, this allows us to remove the RemoveDiffEntry since that only looked at the scmEntry, so that work can also be deferred to the source control tree differ easily.
This avoids loading inodes when we don't need to. In the case of a clean checkout with two commits 30000 commits away, we reduced Inodes loaded by 98.6%.
Reviewed By: chadaustin
Differential Revision: D19292528
fbshipit-source-id: 7b5ec161f7bd65962ae30c49fdad6dbc73954c2a
Summary:
In any case in which our Inode is not materialized and we would like to continue to diff, we can take the hashes of both the Inode and the ScmEntry and start using the source control tree Differ.
This reduces the number of inodes loaded by avoiding to load them if we don't need to. In the case of a clean checkout with two commits 30000 commits away, we reduced Inodes loaded by 98.6%.
Reviewed By: chadaustin
Differential Revision: D19292527
fbshipit-source-id: 2dbf6c4130214f581b6cc09e663f7567abab6ef3
Summary:
In any case in which an inode is not materialized and we are computing a diff, we can take the hashes of both the Inode and the ScmEntry and start using the source control tree Differ.
This avoids loading inodes when not necessary. In the case of a clean checkout with two commits 30000 commits away, we reduced Inodes loaded by 98.6%.
Reviewed By: chadaustin
Differential Revision: D18647087
fbshipit-source-id: 74632de777f04e2468d10977cc757b8993d439e9
Summary: Pass a GitIgnoreStack* and isIgnored flag through the diff operation. It is used later in the stack when we go down this code path in the TreeInode diffing code. When context->loadFileContentsFromPath() is null, the gitignore loading code will be ignored, used when we do not want to honor a gitignore file. For example, during `getScmStatusBetweenRevisions()`.
Reviewed By: chadaustin
Differential Revision: D18647089
fbshipit-source-id: 20d2abd2ef61669465e134165da5a0ac5e987cca
Summary:
Python2 and Python3 have different method names for an iterator, let's inherit
from Iterator so Python (both version) tells us what needs to be implemented.
Reviewed By: mitrandir77
Differential Revision: D19624294
fbshipit-source-id: b9c3d5ae796216b4bcd330c8be6f061e369e2614
Summary:
Both the repo name and the url come from the config, and thus Unicode values
are passed in in Python3. The String type handles the Python2/Python3
difference, so let's use it instead of PyBytes.
Reviewed By: DurhamG
Differential Revision: D19623202
fbshipit-source-id: 72c72f8338fbb6a2f3e88395f3587a5b59389711
Summary: In Python3, nodes and bookmarks are str.
Reviewed By: DurhamG
Differential Revision: D19624130
fbshipit-source-id: edbb115c7e6fa1232c92ce76e8ee5aa46b3f23db
Summary:
Python 2 pyc files are incompatible with Python 3. Use a different zip file.
This also makes it possible for Python 2 and 3 setup.py build to co-exist
(discovered by markbt).
Reviewed By: markbt
Differential Revision: D19617513
fbshipit-source-id: 47b2a01e905b0cb1ec68e7a7eec40868f09a2167
Summary:
There are times when status updates the dirstate to mark files as
clean or to resolve lookup files. In doing so it takes the wlock, which triggers
a state-enter event which causes external watchers to then run hg status, which
can then trigger another wlock event from status. This causes an infinite loop.
It's not clear why status is taking the wlock every time. It should be a
one-time thing. So more investigation is needed. For now though, we can prevent
this from happening by disabling hgevent signals while status has the wlock.
Reviewed By: quark-zju
Differential Revision: D19602370
fbshipit-source-id: 609316de1441d40be4f81236b8d00ce7dc30a130
Summary: Fixes some minor issues with unittestify to make it work in python 3.
Reviewed By: quark-zju
Differential Revision: D19613469
fbshipit-source-id: 00ae212d606fbef298eb5467e225341512db1290
Summary:
The builtin interpreter currently only responds to "python" as the
input arg. Let's also support python3.
Reviewed By: farnz
Differential Revision: D19613372
fbshipit-source-id: 5d2eed85c2d9546808c1661f12681b03f1edc40f
Summary:
String literals are unicode in Python3, which is not the intention for
over-the-wire streams. I've also added type-checking to get help from pyre to
do the right thing.
Reviewed By: quark-zju
Differential Revision: D19614060
fbshipit-source-id: 33f2b603012481159593426dbb3c18b1614b19f6
Summary:
The pure implementation has many encoding issues. Since our code does not build
in the pure Python mode, just drop the pure lazymanifest implementation for
simplicity.
Reviewed By: farnz
Differential Revision: D19613691
fbshipit-source-id: f3f95717bc77a75d4aa7b597a33f8eec745df134
Summary: The template language is in unicode.
Reviewed By: markbt
Differential Revision: D19615823
fbshipit-source-id: 30c6b295b4e4c999480c46aba8b4e8ffed5a4d64
Summary: The "function name" is unicode in Python 3. Put unicode as the dict keys.
Reviewed By: farnz
Differential Revision: D19615814
fbshipit-source-id: 3508f59d11e4f8ab6345c80c6bdfaff150a63d76