Summary: Reading/writing to files is done via bytes, not strings.
Reviewed By: quark-zju
Differential Revision: D19656321
fbshipit-source-id: 9a9b13b27fc9dd8db6fe757dcd53e4730179832d
Summary:
Importing directly from collection is deprecated, we should import from
collections.abc in Python3.
Reviewed By: DurhamG
Differential Revision: D19650852
fbshipit-source-id: b2e470e5fde3fe915944ae68a4274e47ed91071a
Summary:
remotenames are stored as unicode in memory and bytes on disk. We need
to convert before we write in this case.
Reviewed By: quark-zju
Differential Revision: D19648032
fbshipit-source-id: 4b96cf05eefd66ca031436d9979b94da8e28b8dd
Summary:
cl.__contains__ does a "0 < rev <= len(repo)" check, so passing nodes
will always fail. In python 3 this causes a type error, so let's fix this.
Reviewed By: quark-zju
Differential Revision: D19634880
fbshipit-source-id: 011ab2f0c07a16fa45734d360ac952273c4fefc2
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: In Python3, nodes and bookmarks are str.
Reviewed By: DurhamG
Differential Revision: D19624130
fbshipit-source-id: edbb115c7e6fa1232c92ce76e8ee5aa46b3f23db
Summary: The later is deprecated since python 2.6, and the former works in python3
Reviewed By: simpkins
Differential Revision: D19608560
fbshipit-source-id: c9e45bbc51f0e20416c2640dfc25e4cac4934152
Summary:
This is inteneded to solve multiple problems:
- Mitigate issues where our CI system does not enable remotenames in some
random code paths, which leads to missing or stale `remote/master`.
This further mitigates bad cases with narrow-heads' phase calculation
where a stale `remote/master` can cause many commits to become draft
incorrectly.
- Mitigate issues in `remotenames` where race condition can happen for
pushrebase (remotenames does a "listnames" after the push operation).
See D18601035 for a hacky workaround.
Reviewed By: DurhamG
Differential Revision: D19380940
fbshipit-source-id: 4481ff114d35be37c331c72ac561c2a0894206cb
Summary:
I encountered a 19s `hg sl` run where 13s were spent on
`remotenames.updateaccessedbookmarks` (8 times).
{F225347899}
The filesystem is unusually slow since the it's nearly full. However, the
updates are not really necessary since I'm not accessing more remote names.
Accessing one bookmark via smartlog rewrites the entire accessed file, which is
O(N^2) and undesirable.
Improve it by skipping writing if nothing has changed. In the future we might
want to optimize it further by:
- Only update (and do ui.log) "accessedbookmarks" at most once per command.
- Potentially drop the "accessedbookmarks" tracking by using "remotenames"
directly - everything in "remotenames" is accessed.
Reviewed By: markbt
Differential Revision: D19191528
fbshipit-source-id: 46635d4e5c9d0034ace9cdafc1f42a4512aa8774
Summary:
For now pushrebase updates working parent, bookmarks. This diff makes it also
update remote bookmarks.
This resolves a race condtion in remotenames where the pulled remote bookmarks
have unknown nodes and cause update to silently fail.
Reviewed By: sfilipco
Differential Revision: D18601035
fbshipit-source-id: 6f2c318cbf6b29a6427eeac6d374c1fb13e6155c
Summary:
The Mercurial codebase contains over 500 errors, let's ignore them for now, we
can go back to them later to fix them.
Besides the manual change to .pyre_configuration.local, the changes were
generated with:
pyre --output=json check | pyre-upgrade fixme
Reviewed By: singhsrb
Differential Revision: D18803908
fbshipit-source-id: 724db7bd864c0de47a97ef2092bdee9f2cda531f
Summary:
The line causes pyre to enter an infinite loop, for now, let's simply ignore it
when type checking is enabled.
Reviewed By: singhsrb
Differential Revision: D18803909
fbshipit-source-id: d89b4cd0311a4a5416dd31197a8c69f4a6b65944
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.