just playing with tangled
at globpattern 133 lines 3.4 kB view 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// Needed so that proc macros can be used inside jj_lib and by external crates 22// that depend on it. 23// See: 24// - https://github.com/rust-lang/rust/issues/54647#issuecomment-432015102 25// - https://github.com/rust-lang/rust/issues/54363 26extern crate self as jj_lib; 27 28#[macro_use] 29pub mod content_hash; 30 31pub mod absorb; 32pub mod annotate; 33pub mod backend; 34pub mod commit; 35pub mod commit_builder; 36pub mod config; 37mod config_resolver; 38pub mod conflicts; 39pub mod copies; 40pub mod dag_walk; 41pub mod default_index; 42pub mod default_submodule_store; 43pub mod diff; 44pub mod dsl_util; 45pub mod extensions_map; 46pub mod file_util; 47pub mod files; 48pub mod fileset; 49mod fileset_parser; 50pub mod fix; 51pub mod fmt_util; 52pub mod fsmonitor; 53#[cfg(feature = "git")] 54pub mod git; 55#[cfg(not(feature = "git"))] 56/// A stub module that provides a no-op implementation of some of the functions 57/// in the `git` module. 58pub mod git { 59 /// Determine, by its name, if a remote refers to the special local-only 60 /// "git" remote that is used in the Git backend. 61 /// 62 /// This function always returns false if the "git" feature is not enabled. 63 pub fn is_special_git_remote(_remote: &str) -> bool { 64 false 65 } 66} 67#[cfg(feature = "git")] 68pub mod git_backend; 69#[cfg(feature = "git")] 70mod git_subprocess; 71pub mod gitignore; 72pub mod gpg_signing; 73pub mod graph; 74pub mod hex_util; 75pub mod id_prefix; 76pub mod index; 77pub mod local_working_copy; 78pub mod lock; 79pub mod matchers; 80pub mod merge; 81pub mod merged_tree; 82pub mod object_id; 83pub mod op_heads_store; 84pub mod op_store; 85pub mod op_walk; 86pub mod operation; 87#[expect(missing_docs)] 88pub mod protos; 89pub mod refs; 90pub mod repo; 91pub mod repo_path; 92pub mod revset; 93mod revset_parser; 94pub mod rewrite; 95#[cfg(feature = "testing")] 96pub mod secret_backend; 97pub mod settings; 98pub mod signing; 99// TODO: This file is mostly used for testing, whenever we no longer require it 100// in the lib it should be moved to the examples (e.g 101// "examples/simple-backend/"). 102pub mod simple_backend; 103pub mod simple_op_heads_store; 104pub mod simple_op_store; 105pub mod ssh_signing; 106pub mod stacked_table; 107pub mod store; 108pub mod str_util; 109pub mod submodule_store; 110#[cfg(feature = "testing")] 111pub mod test_signing_backend; 112pub mod time_util; 113pub mod transaction; 114pub mod tree; 115pub mod tree_builder; 116pub mod union_find; 117pub mod view; 118pub mod working_copy; 119pub mod workspace; 120 121#[cfg(test)] 122mod tests { 123 use tempfile::TempDir; 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}