jj_lib/protos/
working_copy.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct MaterializedConflictData {
4    /// TODO: maybe we should store num_sides here as well
5    #[prost(uint32, tag = "1")]
6    pub conflict_marker_len: u32,
7}
8#[derive(Clone, PartialEq, ::prost::Message)]
9pub struct FileState {
10    #[prost(int64, tag = "1")]
11    pub mtime_millis_since_epoch: i64,
12    #[prost(uint64, tag = "2")]
13    pub size: u64,
14    #[prost(enumeration = "FileType", tag = "3")]
15    pub file_type: i32,
16    /// Set only if file_type is Conflict
17    #[deprecated]
18    #[prost(bytes = "vec", tag = "4")]
19    pub conflict_id: ::prost::alloc::vec::Vec<u8>,
20    #[prost(message, optional, tag = "5")]
21    pub materialized_conflict_data: ::core::option::Option<MaterializedConflictData>,
22}
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct FileStateEntry {
25    #[prost(string, tag = "1")]
26    pub path: ::prost::alloc::string::String,
27    #[prost(message, optional, tag = "2")]
28    pub state: ::core::option::Option<FileState>,
29}
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct SparsePatterns {
32    #[prost(string, repeated, tag = "1")]
33    pub prefixes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
34}
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct TreeState {
37    #[prost(bytes = "vec", tag = "1")]
38    pub legacy_tree_id: ::prost::alloc::vec::Vec<u8>,
39    /// Alternating positive and negative terms if there's a conflict, otherwise a
40    /// single (positive) value
41    #[prost(bytes = "vec", repeated, tag = "5")]
42    pub tree_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
43    #[prost(message, repeated, tag = "2")]
44    pub file_states: ::prost::alloc::vec::Vec<FileStateEntry>,
45    #[prost(bool, tag = "6")]
46    pub is_file_states_sorted: bool,
47    #[prost(message, optional, tag = "3")]
48    pub sparse_patterns: ::core::option::Option<SparsePatterns>,
49    #[prost(message, optional, tag = "4")]
50    pub watchman_clock: ::core::option::Option<WatchmanClock>,
51}
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct WatchmanClock {
54    #[prost(oneof = "watchman_clock::WatchmanClock", tags = "1, 2")]
55    pub watchman_clock: ::core::option::Option<watchman_clock::WatchmanClock>,
56}
57/// Nested message and enum types in `WatchmanClock`.
58pub mod watchman_clock {
59    #[derive(Clone, PartialEq, ::prost::Oneof)]
60    pub enum WatchmanClock {
61        #[prost(string, tag = "1")]
62        StringClock(::prost::alloc::string::String),
63        #[prost(int64, tag = "2")]
64        UnixTimestamp(i64),
65    }
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct Checkout {
69    /// The operation at which the working copy was updated.
70    #[prost(bytes = "vec", tag = "2")]
71    pub operation_id: ::prost::alloc::vec::Vec<u8>,
72    /// An identifier for this workspace. It is used for looking up the current
73    /// working-copy commit in the repo view. Currently a human-readable name.
74    /// TODO: Is it better to make this a UUID and a have map that to a name in
75    /// config? That way users can rename a workspace.
76    #[prost(string, tag = "3")]
77    pub workspace_name: ::prost::alloc::string::String,
78}
79#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
80#[repr(i32)]
81pub enum FileType {
82    Normal = 0,
83    Symlink = 1,
84    Executable = 2,
85    Conflict = 3,
86    GitSubmodule = 4,
87}
88impl FileType {
89    /// String value of the enum field names used in the ProtoBuf definition.
90    ///
91    /// The values are not transformed in any way and thus are considered stable
92    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
93    pub fn as_str_name(&self) -> &'static str {
94        match self {
95            Self::Normal => "Normal",
96            Self::Symlink => "Symlink",
97            Self::Executable => "Executable",
98            Self::Conflict => "Conflict",
99            Self::GitSubmodule => "GitSubmodule",
100        }
101    }
102    /// Creates an enum from field names used in the ProtoBuf definition.
103    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
104        match value {
105            "Normal" => Some(Self::Normal),
106            "Symlink" => Some(Self::Symlink),
107            "Executable" => Some(Self::Executable),
108            "Conflict" => Some(Self::Conflict),
109            "GitSubmodule" => Some(Self::GitSubmodule),
110            _ => None,
111        }
112    }
113}