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:
Arun Kulshreshtha 2019-03-18 19:46:26 -07:00 committed by Facebook Github Bot
parent c16311a302
commit 4e019aff10
2 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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 {