Summary: Would be nice to be able to return future that references a boxed Entry
Reviewed By: jsgf
Differential Revision: D5688859
fbshipit-source-id: acb7bcc461f886bca08b84f31dbebe4f692187f1
Summary:
Core mercurial takes "data/" and "meta/" prefixes into account when does
fsencode.
It doesn't make a difference now, but it will make a difference when we'll add
hashencode to the fsencode() function.
Reviewed By: jsgf
Differential Revision: D5670748
fbshipit-source-id: 661974c25e00979eedffb30b432518135f0dc631
Summary: Main part is `get_stream_of_manifest_entries` that creates a stream of all tree manifest entries by recursively going through all of them.
Reviewed By: jsgf
Differential Revision: D5622490
fbshipit-source-id: 4a8b2707df0300a37931c465bafb1ed54d6d4d25
Summary:
Previously `fsencode()` worked incorrectly if Path was a directory. We didn't notice it before because we've never used Path to store directories, but we will use it for TreeManifest.
I considered two options when implementing it.
1) Put some kind of flag `isDir` inside Path struct. But that would create complications with `join()` method. For example, you can't join anything to the file - what should we do in this case? panic? return result?
2) and another `fsencode_dir()` method. Clients need to know what kind of Path they have. I choose this option because it requires less changes and brings less complications compared to the option 1
Reviewed By: sid0
Differential Revision: D5574847
fbshipit-source-id: c4c476a7fc3b884de847c431a56ff5f313c1389f
Summary:
Adds method similar to https://doc.rust-lang.org/std/path/struct.Path.html#method.join.
Will be used in the next diff to prepend path prefix to the tree manifest entries
Reviewed By: jsgf
Differential Revision: D5563808
fbshipit-source-id: 3637275093c301bf159083cb9bfedaa0e490a75e
Summary:
Instead of storing `Vec<u8>`, let's store `Vec<PathComponent>`, where PathComponent is Vec<u8> without b'\'.
To make sure len() is still `O(1)` let's store it too.
Reviewed By: sid0
Differential Revision: D5573721
fbshipit-source-id: 91967809284d79bf0fcdcabcae9fd787a37c318b
Summary: Method that returns content of the manifest entry in json format.
Reviewed By: sid0
Differential Revision: D5527659
fbshipit-source-id: 1832b645f69da40cbd620a6bff318e25594c5148
Summary: Will be used by eden server in the next diff
Reviewed By: jsgf
Differential Revision: D5553955
fbshipit-source-id: 196e2da597d0456b4337a6d9ada8fe188075e87e
Summary: We're going to use this code in another context very soon.
Reviewed By: StanislavGlebik
Differential Revision: D5581807
fbshipit-source-id: 6d43eb114b3d82fd97a9b9cce775f1f398853e84
Summary: I'm going to make significant changes to this crate in upcoming diffs.
Reviewed By: StanislavGlebik
Differential Revision: D5581790
fbshipit-source-id: 2a3a4b183b554ca46c3bc611452e55eb17238f20
Summary:
Mercurial treats copying as its first class operation, not renaming.
Using 'renamed' instead of 'copied' is pretty confusing.
Reviewed By: StanislavGlebik
Differential Revision: D5579408
fbshipit-source-id: 4494aa4bf56bd2c00f4331da9edd88d756525dd2
Summary: These comments make it a bit clearer to me what's going on.
Reviewed By: StanislavGlebik
Differential Revision: D5579411
fbshipit-source-id: 84cbd650208f200a04462cb6dda5d05a9d8e6196
Summary: Add helpers to allow an implementation of a Repo object to be boxed up into a type-erased trait object.
Reviewed By: sid0
Differential Revision: D5540673
fbshipit-source-id: c16332f6a548d053125dd3376e7e06d0ddffadf9
Summary: Add a `get_bookmarks()` method to the Repo trait and implement it for RevlogRepo and BlobRepo.
Reviewed By: sid0
Differential Revision: D5540667
fbshipit-source-id: 710849e50b1d358be1c4f95a1cbd61efb7c2cf6b