mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
types: rename LooseHistoryEntry and PackHistoryEntry
Summary: `LooseHistoryEntry` and `PackHistoryEntry` aren't the best names for these types, since the latter is what most users should use, whereas the former should only typically used for data transmission. As such, we should rename these to clarify the intent. Differential Revision: D14512749 fbshipit-source-id: 5293df89766825077b2ba07224297b958bf46002
This commit is contained in:
parent
c16311a302
commit
4e019aff10
@ -31,7 +31,7 @@ use uuid::Uuid;
|
||||
|
||||
use mercurial_types::{HgChangesetId, HgFileNodeId, HgManifestId};
|
||||
use metaconfig_types::RepoConfig;
|
||||
use types::LooseHistoryEntry;
|
||||
use types::WireHistoryEntry;
|
||||
|
||||
use mononoke_types::{FileContents, RepositoryId};
|
||||
use reachabilityindex::ReachabilityIndex;
|
||||
@ -186,7 +186,7 @@ impl MononokeRepo {
|
||||
let history =
|
||||
remotefilelog::get_file_history(ctx, self.repo.clone(), filenode, path.clone(), depth)
|
||||
.and_then(move |entry| {
|
||||
let entry = LooseHistoryEntry::from(entry);
|
||||
let entry = WireHistoryEntry::from(entry);
|
||||
Ok(Bytes::from(serde_json::to_vec(&entry)?))
|
||||
})
|
||||
.from_err()
|
||||
|
@ -9,7 +9,7 @@ use std::io::Write;
|
||||
use failure::Result;
|
||||
|
||||
use mononoke_types::MPath;
|
||||
use types::{LooseHistoryEntry, Parents};
|
||||
use types::{Parents, WireHistoryEntry};
|
||||
|
||||
use crate::blobnode::HgParents;
|
||||
use crate::nodehash::{HgChangesetId, HgFileNodeId, NULL_HASH};
|
||||
@ -96,7 +96,7 @@ impl HgFileHistoryEntry {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<HgFileHistoryEntry> for LooseHistoryEntry {
|
||||
impl From<HgFileHistoryEntry> for WireHistoryEntry {
|
||||
/// Convert from a representation of a history entry using Mononoke's types to
|
||||
/// a representation that uses the Mercurial client's types.
|
||||
fn from(entry: HgFileHistoryEntry) -> Self {
|
||||
|
Loading…
Reference in New Issue
Block a user