Debian Codegraph @

lib/src/lib.rs

raw
1 // Copyright 2020 The Jujutsu Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 //! Jujutsu version control system.
16
17 #![warn(missing_docs)]
18 #![deny(unused_must_use)]
19 #![forbid(unsafe_code)]
20
21 pub mod absorb;
22 pub mod annotate;
23 pub mod backend;
24 pub mod bisect;
25 pub mod commit;
26 pub mod commit_builder;
27 pub mod config;
28 mod config_resolver;
29 pub use jj_core::conflict_labels;
30 pub mod conflicts;
31 pub use jj_core::content_hash;
32 pub mod converge;
33 pub mod copies;
34 pub use jj_core::dag_walk;
35 pub use jj_core::dag_walk_async;
36 pub mod default_backend_factories;
37 pub mod default_index;
38 pub mod default_submodule_store;
39 pub use jj_core::diff;
40 pub mod diff_presentation;
41 pub mod dsl_util;
42 pub(crate) mod eol;
43 pub mod evolution;
44 pub mod extensions_map;
45 pub use jj_core::file_util;
46 pub mod files;
47 pub mod fileset;
48 mod fileset_parser;
49 pub mod fix;
50 pub mod fmt_util;
51 pub mod fsmonitor;
52 #[cfg(feature = "git")]
53 pub mod git;
54 #[cfg(feature = "git")]
55 pub mod git_backend;
56 #[cfg(feature = "git")]
57 mod git_subprocess;
58 pub mod gitignore;
59 pub mod gpg_signing;
60 pub use jj_core::graph;
61 pub mod graph_dominators;
62 pub use jj_core::hex_util;
63 pub mod id_prefix;
64 pub mod index;
65 pub mod iter_util;
66 pub mod local_working_copy;
67 pub mod lock;
68 pub use jj_core::matchers;
69 pub use jj_core::merge;
70 pub mod merged_tree;
71 pub mod merged_tree_builder;
72 pub use jj_core::object_id;
73 pub mod op_heads_store;
74 pub mod op_store;
75 pub mod op_walk;
76 pub mod operation;
77 #[expect(missing_docs)]
78 pub mod protos;
79 pub use jj_core::ref_name;
80 pub mod refs;
81 pub mod repo;
82 pub use jj_core::repo_path;
83 pub mod revset;
84 mod revset_parser;
85 pub mod rewrite;
86 #[cfg(feature = "testing")]
87 pub mod secret_backend;
88 pub mod secure_config;
89 pub mod settings;
90 pub mod signing;
91 use jj_core::symbol_util;
92 pub mod tree_merge;
93 // TODO: This file is mostly used for testing, whenever we no longer require it
94 // in the lib it should be moved to the examples (e.g
95 // "examples/simple-backend/").
96 pub mod simple_backend;
97 pub mod simple_op_heads_store;
98 pub mod simple_op_store;
99 pub mod ssh_signing;
100 pub mod stacked_table;
101 pub mod store;
102 pub use jj_core::str_util;
103 pub mod submodule_store;
104 #[cfg(feature = "testing")]
105 pub mod test_signing_backend;
106 pub mod time_util;
107 pub mod trailer;
108 pub mod transaction;
109 pub mod tree;
110 pub mod tree_builder;
111 pub mod ui_path;
112 pub mod union_find;
113 pub mod view;
114 pub mod working_copy;
115 pub mod workspace;
116 pub mod workspace_store;
117
118 #[cfg(test)]
119 mod tests {
120 use tempfile::TempDir;
121
122 // Copied from `testutils::TestResult` to remove dependency cycle.
123 pub type TestResult<T = ()> = eyre::Result<T>;
124
125 /// Unlike `testutils::new_temp_dir()`, this function doesn't set up
126 /// hermetic Git environment.
127 pub fn new_temp_dir() -> TempDir {
128 tempfile::Builder::new()
129 .prefix("jj-test-")
130 .tempdir()
131 .unwrap()
132 }
133 }