From bbd14b6a45bd477725c61424928aee741c85a72c Mon Sep 17 00:00:00 2001 From: Christian Schilling Date: Thu, 4 Jan 2024 11:44:48 +0000 Subject: [PATCH] Support cross workspace amend Change: ws-amend --- Cargo.lock | 8 +- Cargo.toml | 2 +- docs/src/reference/cli.md | 2 +- josh-core/src/cache.rs | 2 +- josh-core/src/history.rs | 17 +- josh-core/src/lib.rs | 2 +- josh-proxy/src/bin/josh-proxy.rs | 4 +- josh-proxy/src/lib.rs | 52 +++- tests/proxy/amend_patchset.t | 2 +- tests/proxy/authentication.t | 2 +- tests/proxy/caching.t | 4 +- tests/proxy/clone_absent_head.t | 2 +- tests/proxy/clone_all.t | 2 +- tests/proxy/clone_blocked.t | 2 +- tests/proxy/clone_invalid_url.t | 2 +- tests/proxy/clone_locked_refs.t | 2 +- tests/proxy/clone_prefix.t | 2 +- tests/proxy/clone_sha.t | 2 +- tests/proxy/clone_subsubtree.t | 2 +- tests/proxy/clone_subtree.t | 2 +- tests/proxy/clone_subtree_no_master.t | 2 +- tests/proxy/clone_subtree_tags.t | 2 +- tests/proxy/clone_with_meta.t | 2 +- tests/proxy/empty_commit.t | 2 +- tests/proxy/get_version.t | 2 +- tests/proxy/import_export.t | 2 +- tests/proxy/join_with_merge.t | 2 +- tests/proxy/markers.t | 2 +- tests/proxy/no_proxy.t | 2 +- tests/proxy/no_proxy_lfs.t | 2 +- tests/proxy/push_gerrit_amend.t | 222 ++++++++++++++++++ tests/proxy/push_graphql.t | 2 +- tests/proxy/push_new_branch.t | 2 +- tests/proxy/push_prefix.t | 2 +- tests/proxy/push_review.t | 2 +- tests/proxy/push_review_already_in.t | 2 +- tests/proxy/push_review_nop_behind.t | 2 +- tests/proxy/push_review_old.t | 2 +- tests/proxy/push_review_topic.t | 2 +- tests/proxy/push_stacked.t | 2 +- tests/proxy/push_stacked_gerrit.t | 2 +- tests/proxy/push_stacked_split.t | 2 +- tests/proxy/push_stacked_sub.t | 2 +- tests/proxy/push_subdir_prefix.t | 2 +- tests/proxy/push_subtree.t | 2 +- tests/proxy/push_subtree_two_repos.t | 2 +- tests/proxy/unrelated_leak.t | 2 +- tests/proxy/workspace.t | 2 +- tests/proxy/workspace_create.t | 2 +- tests/proxy/workspace_discover.t | 2 +- tests/proxy/workspace_edit_commit.t | 2 +- tests/proxy/workspace_in_workspace.t | 2 +- .../proxy/workspace_invalid_trailing_slash.t | 2 +- tests/proxy/workspace_modify.t | 2 +- tests/proxy/workspace_modify_chain.t | 2 +- .../workspace_modify_chain_prefix_subtree.t | 2 +- tests/proxy/workspace_pre_history.t | 2 +- tests/proxy/workspace_publish.t | 2 +- tests/proxy/workspace_tags.t | 2 +- 59 files changed, 344 insertions(+), 69 deletions(-) create mode 100644 tests/proxy/push_gerrit_amend.t diff --git a/Cargo.lock b/Cargo.lock index fac248210..9ec279e32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -763,9 +763,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.19.0" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" dependencies = [ "bitflags 2.4.2", "libc", @@ -1777,9 +1777,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" -version = "0.17.0+1.8.1" +version = "0.16.2+1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 90cde8f58..49a93b33d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ tempfile = "3.10.1" [workspace.dependencies.git2] default-features = false -version = "0.19" +version = "0.18.3" [workspace.dependencies.juniper] version = "0.15.11" diff --git a/docs/src/reference/cli.md b/docs/src/reference/cli.md index 730505f6b..a3a646b67 100644 --- a/docs/src/reference/cli.md +++ b/docs/src/reference/cli.md @@ -9,7 +9,7 @@ history, taking a filter specification as argument. It can be installed with the following Cargo command, assuming Rust is installed: ```shell -cargo install josh-filter --git https://github.com/josh-project/josh.git +cargo install josh --git https://github.com/josh-project/josh.git ``` git-sync diff --git a/josh-core/src/cache.rs b/josh-core/src/cache.rs index 5b4556722..5081758db 100644 --- a/josh-core/src/cache.rs +++ b/josh-core/src/cache.rs @@ -1,7 +1,7 @@ use super::*; use std::collections::HashMap; -const CACHE_VERSION: u64 = 20; +const CACHE_VERSION: u64 = 19; lazy_static! { static ref DB: std::sync::Mutex> = std::sync::Mutex::new(None); diff --git a/josh-core/src/history.rs b/josh-core/src/history.rs index 4fc771444..1d45db332 100644 --- a/josh-core/src/history.rs +++ b/josh-core/src/history.rs @@ -441,7 +441,22 @@ pub fn unapply_filter( let tree = module_commit.tree()?; let commit_message = module_commit.summary().unwrap_or("NO COMMIT MESSAGE"); - let new_trees: JoshResult> = { + let mut nt = None; + if let Some(change_ids) = change_ids { + for c in change_ids.iter() { + let cid = get_change_id(&module_commit, ret); + + if c.id == cid.id { + let x = transaction.repo().find_commit(c.commit)?; + nt = Some(filter::unapply(transaction, filter, tree.clone(), x.tree()?)?.id()); + break; + } + } + } + + let new_trees: JoshResult> = if let Some(nt) = nt { + Ok(vec![nt]) + } else { let span = tracing::span!( tracing::Level::TRACE, "unapply filter", diff --git a/josh-core/src/lib.rs b/josh-core/src/lib.rs index e79bd504a..efd6ee8c0 100644 --- a/josh-core/src/lib.rs +++ b/josh-core/src/lib.rs @@ -38,7 +38,7 @@ pub struct Change { } impl Change { - fn new(commit: git2::Oid) -> Self { + pub fn new(commit: git2::Oid) -> Self { Self { author: Default::default(), id: Default::default(), diff --git a/josh-proxy/src/bin/josh-proxy.rs b/josh-proxy/src/bin/josh-proxy.rs index 2a9532c8c..15d10ef26 100644 --- a/josh-proxy/src/bin/josh-proxy.rs +++ b/josh-proxy/src/bin/josh-proxy.rs @@ -1185,9 +1185,7 @@ async fn call_service( while path.contains("//") { path = path.replace("//", "/"); } - percent_encoding::percent_decode_str(&path) - .decode_utf8_lossy() - .to_string() + path }; if let Some(resource_path) = path.strip_prefix("/~/ui") { diff --git a/josh-proxy/src/lib.rs b/josh-proxy/src/lib.rs index 6e34e29ba..e403a302a 100644 --- a/josh-proxy/src/lib.rs +++ b/josh-proxy/src/lib.rs @@ -259,6 +259,14 @@ pub fn process_repo_update(repo_update: RepoUpdate) -> josh::JoshResult None }; + if changes.is_some() && push_mode == PushMode::Review { + changes = Some(refs_to_changes( + &transaction_mirror, + &baseref.replacen("refs/heads/", "", 1), + &author, + )); + } + let filter = josh::filter::parse(&repo_update.filter_spec)?; let new_oid = git2::Oid::from_str(new)?; let backward_new_oid = { @@ -868,6 +876,38 @@ impl Drop for TmpGitNamespace { } } +fn refs_to_changes( + transaction: &josh::cache::Transaction, + baseref: &str, + change_author: &str, +) -> Vec { + let mut changes = vec![]; + let glob = transaction.refname(&format!( + "refs/heads/@changes/{}/{}/*", + baseref, change_author + )); + + for r in transaction.repo().references_glob(&glob).unwrap() { + let r = r.unwrap(); + let mut change = josh::Change::new(r.target().unwrap()); + change.author = change_author.to_string(); + + let id = r.name().unwrap().replacen( + &transaction.refname(&format!( + "refs/heads/@changes/{}/{}/", + baseref, change_author + )), + "", + 1, + ); + change.id = Some(id); + + changes.push(change); + } + + return changes; +} + fn changes_to_refs( baseref: &str, change_author: &str, @@ -887,12 +927,12 @@ fn changes_to_refs( if id.contains('@') { return Err(josh::josh_error("Change id must not contain '@'")); } - if seen.contains(&id) { - return Err(josh::josh_error(&format!( - "rejecting to push {:?} with duplicate label", - change.commit - ))); - } + //if seen.contains(&id) { + // return Err(josh::josh_error(&format!( + // "rejecting to push {:?} with duplicate label", + // change.commit + // ))); + //} seen.push(id); } else { return Err(josh::josh_error(&format!( diff --git a/tests/proxy/amend_patchset.t b/tests/proxy/amend_patchset.t index 89ee6e2a5..e60bd6825 100644 --- a/tests/proxy/amend_patchset.t +++ b/tests/proxy/amend_patchset.t @@ -124,7 +124,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/authentication.t b/tests/proxy/authentication.t index e0a8282cc..0d887992c 100644 --- a/tests/proxy/authentication.t +++ b/tests/proxy/authentication.t @@ -124,7 +124,7 @@ "real_repo.git" = ["::sub1/"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/caching.t b/tests/proxy/caching.t index 9b726eaa9..6fe2e6f79 100644 --- a/tests/proxy/caching.t +++ b/tests/proxy/caching.t @@ -51,7 +51,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf @@ -162,7 +162,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_absent_head.t b/tests/proxy/clone_absent_head.t index 6a70318fb..762b8cf3d 100644 --- a/tests/proxy/clone_absent_head.t +++ b/tests/proxy/clone_absent_head.t @@ -85,7 +85,7 @@ $ bash ${TESTDIR}/destroy_test_env.sh . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_all.t b/tests/proxy/clone_all.t index 2bdd77aaa..dfe84ea99 100644 --- a/tests/proxy/clone_all.t +++ b/tests/proxy/clone_all.t @@ -53,7 +53,7 @@ "real_repo.git" = ["::sub1/"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_blocked.t b/tests/proxy/clone_blocked.t index 5956ff7f0..c3556d004 100644 --- a/tests/proxy/clone_blocked.t +++ b/tests/proxy/clone_blocked.t @@ -9,7 +9,7 @@ $ bash ${TESTDIR}/destroy_test_env.sh . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_invalid_url.t b/tests/proxy/clone_invalid_url.t index 7494d9d6c..5638ff505 100644 --- a/tests/proxy/clone_invalid_url.t +++ b/tests/proxy/clone_invalid_url.t @@ -32,7 +32,7 @@ $ bash ${TESTDIR}/destroy_test_env.sh . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_locked_refs.t b/tests/proxy/clone_locked_refs.t index 4b4aa12b4..6103ae643 100644 --- a/tests/proxy/clone_locked_refs.t +++ b/tests/proxy/clone_locked_refs.t @@ -111,7 +111,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_prefix.t b/tests/proxy/clone_prefix.t index 8210afb59..a928e56c6 100644 --- a/tests/proxy/clone_prefix.t +++ b/tests/proxy/clone_prefix.t @@ -74,7 +74,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_sha.t b/tests/proxy/clone_sha.t index 95cff4309..3060741b7 100644 --- a/tests/proxy/clone_sha.t +++ b/tests/proxy/clone_sha.t @@ -93,7 +93,7 @@ Check (2) and (3) but with a branch ref "real_repo.git" = ["::sub1/"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_subsubtree.t b/tests/proxy/clone_subsubtree.t index 215494c5d..eea2ae17c 100644 --- a/tests/proxy/clone_subsubtree.t +++ b/tests/proxy/clone_subsubtree.t @@ -87,7 +87,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_subtree.t b/tests/proxy/clone_subtree.t index 237a9e411..8f5bba9a6 100644 --- a/tests/proxy/clone_subtree.t +++ b/tests/proxy/clone_subtree.t @@ -85,7 +85,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_subtree_no_master.t b/tests/proxy/clone_subtree_no_master.t index 1658539c0..e1195d49f 100644 --- a/tests/proxy/clone_subtree_no_master.t +++ b/tests/proxy/clone_subtree_no_master.t @@ -78,7 +78,7 @@ "real_repo.git" = [":/sub1"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_subtree_tags.t b/tests/proxy/clone_subtree_tags.t index 3e7840042..1fbe4bc74 100644 --- a/tests/proxy/clone_subtree_tags.t +++ b/tests/proxy/clone_subtree_tags.t @@ -115,7 +115,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/clone_with_meta.t b/tests/proxy/clone_with_meta.t index d6006d084..c35b2bb79 100644 --- a/tests/proxy/clone_with_meta.t +++ b/tests/proxy/clone_with_meta.t @@ -129,7 +129,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/empty_commit.t b/tests/proxy/empty_commit.t index dab491c3b..126423fda 100644 --- a/tests/proxy/empty_commit.t +++ b/tests/proxy/empty_commit.t @@ -83,7 +83,7 @@ should still be included. "real_repo.git" = ["::sub1/"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/get_version.t b/tests/proxy/get_version.t index 18a61d264..4680a00a6 100644 --- a/tests/proxy/get_version.t +++ b/tests/proxy/get_version.t @@ -7,7 +7,7 @@ $ bash ${TESTDIR}/destroy_test_env.sh . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/import_export.t b/tests/proxy/import_export.t index 1917dea78..0543b3ac3 100644 --- a/tests/proxy/import_export.t +++ b/tests/proxy/import_export.t @@ -301,7 +301,7 @@ Flushed credential cache "repo2.git" = [":prefix=repo2"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/join_with_merge.t b/tests/proxy/join_with_merge.t index ff292b4c2..88a98c374 100644 --- a/tests/proxy/join_with_merge.t +++ b/tests/proxy/join_with_merge.t @@ -59,7 +59,7 @@ "real_repo.git" = [":prefix=sub1"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/markers.t b/tests/proxy/markers.t index febea0dd7..5e2b4c73b 100644 --- a/tests/proxy/markers.t +++ b/tests/proxy/markers.t @@ -340,7 +340,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/no_proxy.t b/tests/proxy/no_proxy.t index 9b741dbf0..59efe06f4 100644 --- a/tests/proxy/no_proxy.t +++ b/tests/proxy/no_proxy.t @@ -35,7 +35,7 @@ $ bash ${TESTDIR}/destroy_test_env.sh . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/no_proxy_lfs.t b/tests/proxy/no_proxy_lfs.t index 0a23a8615..3ce7e01d9 100644 --- a/tests/proxy/no_proxy_lfs.t +++ b/tests/proxy/no_proxy_lfs.t @@ -50,7 +50,7 @@ $ bash ${TESTDIR}/destroy_test_env.sh . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_gerrit_amend.t b/tests/proxy/push_gerrit_amend.t new file mode 100644 index 000000000..9b2c7d1ce --- /dev/null +++ b/tests/proxy/push_gerrit_amend.t @@ -0,0 +1,222 @@ + $ . ${TESTDIR}/setup_test_env.sh + $ cd ${TESTTMP} + + $ git clone -q http://localhost:8001/real_repo.git 1> /dev/null + warning: You appear to have cloned an empty repository. + $ cd real_repo + + $ mkdir sub1 + $ mkdir sub2 + $ echo contents1 > sub1/file1 + $ echo contents2 > sub2/file2 + $ git add . + $ git commit -m "add files" 1> /dev/null + $ git push 1> /dev/null + To http://localhost:8001/real_repo.git + * [new branch] master -> master + + $ cd ${TESTTMP} + + $ git clone -q http://localhost:8002/real_repo.git:/sub1.git sub1 + $ cd sub1 + + $ echo contents1_new > file1 + $ git add file1 + $ git commit -m "Change-Id: 1234" 1> /dev/null + $ git log --decorate --graph --pretty="%s %d" + * Change-Id: 1234 (HEAD -> master) + * add files (origin/master, origin/HEAD) + $ git push -o author=josh@example.com origin master:refs/for/master + remote: josh-proxy + remote: response from upstream: + remote: To http://localhost:8001/real_repo.git + remote: * [new branch] 1234 -> @changes/master/josh@example.com/1234 + remote: To http://localhost:8001/real_repo.git + remote: * [new reference] JOSH_PUSH -> refs/for/master + remote: To http://localhost:8001/real_repo.git + remote: * [new branch] master -> @heads/master/josh@example.com + remote: + remote: + To http://localhost:8002/real_repo.git:/sub1.git + * [new reference] master -> refs/for/master + + $ cd ${TESTTMP}/real_repo + $ git fetch origin + From http://localhost:8001/real_repo + * [new branch] @changes/master/josh@example.com/1234 -> origin/@changes/master/josh@example.com/1234 + * [new branch] @heads/master/josh@example.com -> origin/@heads/master/josh@example.com + $ git diff origin/@changes/master/josh@example.com/1234~1..origin/@changes/master/josh@example.com/1234 + diff --git a/sub1/file1 b/sub1/file1 + index a024003..70a938d 100644 + --- a/sub1/file1 + +++ b/sub1/file1 + @@ -1 +1 @@ + -contents1 + +contents1_new + + $ cd ${TESTTMP} + $ git clone -q http://localhost:8002/real_repo.git:/sub2.git sub2 + $ cd sub2 + $ git log --decorate --graph --pretty="%s %d" + * add files (HEAD -> master, origin/master, origin/HEAD, origin/@heads/master/josh@example.com, origin/@changes/master/josh@example.com/1234) + + $ echo contents2_new > file2 + $ git add file2 + $ git commit -m "Change-Id: 1234" 1> /dev/null + $ git push http://localhost:8001/real_repo.git :refs/for/master + To http://localhost:8001/real_repo.git + - [deleted] refs/for/master + $ git push -o author=josh@example.com origin master:refs/for/master + remote: josh-proxy + remote: response from upstream: + remote: Everything up-to-date + remote: To http://localhost:8001/real_repo.git + remote: + 9b69fe2...920a7be 1234 -> @changes/master/josh@example.com/1234 (forced update) + remote: To http://localhost:8001/real_repo.git + remote: * [new reference] JOSH_PUSH -> refs/for/master + remote: To http://localhost:8001/real_repo.git + remote: + 9b69fe2...920a7be master -> @heads/master/josh@example.com (forced update) + remote: + remote: + To http://localhost:8002/real_repo.git:/sub2.git + * [new reference] master -> refs/for/master + + $ cd ${TESTTMP}/real_repo + $ git fetch origin + From http://localhost:8001/real_repo + + 9b69fe2...920a7be @changes/master/josh@example.com/1234 -> origin/@changes/master/josh@example.com/1234 (forced update) + + 9b69fe2...920a7be @heads/master/josh@example.com -> origin/@heads/master/josh@example.com (forced update) + $ git diff origin/@changes/master/josh@example.com/1234~1..origin/@changes/master/josh@example.com/1234 + diff --git a/sub1/file1 b/sub1/file1 + index a024003..70a938d 100644 + --- a/sub1/file1 + +++ b/sub1/file1 + @@ -1 +1 @@ + -contents1 + +contents1_new + diff --git a/sub2/file2 b/sub2/file2 + index 6b46faa..72e4684 100644 + --- a/sub2/file2 + +++ b/sub2/file2 + @@ -1 +1 @@ + -contents2 + +contents2_new + + $ curl -s http://localhost:8002/flush + Flushed credential cache + $ git fetch origin + +Make sure all temporary namespace got removed + $ tree ${TESTTMP}/remote/scratch/real_repo.git/refs/ | grep request_ + [1] + + $ bash ${TESTDIR}/destroy_test_env.sh + "real_repo.git" = [ + ":/sub1", + ":/sub2", + "::sub1/", + "::sub2/", + ] + . + |-- josh + | `-- 18 + | `-- sled + | |-- blobs + | |-- conf + | `-- db + |-- mirror + | |-- FETCH_HEAD + | |-- HEAD + | |-- config + | |-- description + | |-- info + | | `-- exclude + | |-- objects + | | |-- 3d + | | | `-- 77ff51363c9825cc2a221fc0ba5a883a1a2c72 + | | |-- 63 + | | | `-- 7d3debfcb3bdadc2ebd92e6451bcb34aebcec1 + | | |-- 6b + | | | `-- 46faacade805991bcaea19382c9d941828ce80 + | | |-- 70 + | | | `-- a938dff577e016189da58f38b71cf0ab3d4cbb + | | |-- 95 + | | | `-- 3f19a771cbc2937546fec3b0b155fd2ffe26be + | | |-- 9b + | | | |-- 13ff5c153ca4bc05cb337ad4dfcfe4ffe7af46 + | | | `-- 69fe244c5e0cbc08d2aba426f1ce639ab4e017 + | | |-- a0 + | | | `-- 24003ee1acc6bf70318a46e7b6df651b9dc246 + | | |-- ae + | | | `-- a557394ce29f000108607abd97f19fed4d1b7c + | | |-- ca + | | | `-- 77fb80b683ebe1fd4d4d6c2dee5d247f9befee + | | |-- info + | | `-- pack + | `-- refs + | |-- heads + | |-- josh + | | `-- upstream + | | `-- real_repo.git + | | |-- HEAD + | | `-- refs + | | `-- heads + | | |-- @changes + | | | `-- master + | | | `-- josh@example.com + | | | `-- 1234 + | | |-- @heads + | | | `-- master + | | | `-- josh@example.com + | | `-- master + | `-- tags + `-- overlay + |-- HEAD + |-- config + |-- description + |-- info + | `-- exclude + |-- objects + | |-- 19 + | | `-- 4865382d22d1f0b6bc65029c74833d4509d6cd + | |-- 25 + | | `-- f54a31709f8520b0798c743ee1efcbe47069ce + | |-- 29 + | | `-- 7ce4243f24c3ce36b47ed90b1e6b788937c633 + | |-- 31 + | | `-- 8ff73ef0235d761f6aee1194a6bdaaeb1d0923 + | |-- 52 + | | `-- be19f48566b18ccf49846b221d84f0b75cae66 + | |-- 63 + | | `-- 7d3debfcb3bdadc2ebd92e6451bcb34aebcec1 + | |-- 6c + | | `-- 94de87e1c04cbb8292abe90fc419c51113cfc2 + | |-- 70 + | | `-- a938dff577e016189da58f38b71cf0ab3d4cbb + | |-- 72 + | | `-- e468401514da24f311bbc90908bff97b3f503a + | |-- 78 + | | `-- 94b7b9ac2a655147a5c0935002ea977b99d83d + | |-- 92 + | | `-- 0a7beb2c682ae84bdb9cd786a1bdd38891bced + | |-- 9b + | | |-- 13ff5c153ca4bc05cb337ad4dfcfe4ffe7af46 + | | `-- 69fe244c5e0cbc08d2aba426f1ce639ab4e017 + | |-- a7 + | | `-- 8fae76b871ddf5473364d136f384d9613df3e7 + | |-- b6 + | | `-- 44f072c8707dc0a051ae120591d312973787dc + | |-- c8 + | | `-- 2fc150c43f13cc56c0e9caeba01b58ec612022 + | |-- info + | `-- pack + `-- refs + |-- heads + |-- namespaces + `-- tags + + 56 directories, 41 files + +$ cat ${TESTTMP}/josh-proxy.out +$ cat ${TESTTMP}/josh-proxy.out | grep REPO_UPDATE +$ cat ${TESTTMP}/josh-proxy.out | grep "===" diff --git a/tests/proxy/push_graphql.t b/tests/proxy/push_graphql.t index e9a3e09e4..9e11441cd 100644 --- a/tests/proxy/push_graphql.t +++ b/tests/proxy/push_graphql.t @@ -69,7 +69,7 @@ "real_repo.git" = ["::sub1/"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_new_branch.t b/tests/proxy/push_new_branch.t index c79109814..03f3205e5 100644 --- a/tests/proxy/push_new_branch.t +++ b/tests/proxy/push_new_branch.t @@ -114,7 +114,7 @@ Check the branch again ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_prefix.t b/tests/proxy/push_prefix.t index 76243a05a..f6498c5b5 100644 --- a/tests/proxy/push_prefix.t +++ b/tests/proxy/push_prefix.t @@ -56,7 +56,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_review.t b/tests/proxy/push_review.t index 7ad98b787..89e5795bc 100644 --- a/tests/proxy/push_review.t +++ b/tests/proxy/push_review.t @@ -87,7 +87,7 @@ Make sure all temporary namespace got removed ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_review_already_in.t b/tests/proxy/push_review_already_in.t index 13ddca0e8..d6dd0f8b9 100644 --- a/tests/proxy/push_review_already_in.t +++ b/tests/proxy/push_review_already_in.t @@ -48,7 +48,7 @@ test for that. "real_repo.git" = [] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_review_nop_behind.t b/tests/proxy/push_review_nop_behind.t index 3428f2376..ec7e73c31 100644 --- a/tests/proxy/push_review_nop_behind.t +++ b/tests/proxy/push_review_nop_behind.t @@ -55,7 +55,7 @@ This is a regression test for that problem. "real_repo.git" = [] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_review_old.t b/tests/proxy/push_review_old.t index 3f4bf16af..2532f8af6 100644 --- a/tests/proxy/push_review_old.t +++ b/tests/proxy/push_review_old.t @@ -85,7 +85,7 @@ Flushed credential cache ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_review_topic.t b/tests/proxy/push_review_topic.t index 81c89636f..719856a8c 100644 --- a/tests/proxy/push_review_topic.t +++ b/tests/proxy/push_review_topic.t @@ -42,7 +42,7 @@ Make sure all temporary namespace got removed ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_stacked.t b/tests/proxy/push_stacked.t index 95e194c84..1ee3c9d81 100644 --- a/tests/proxy/push_stacked.t +++ b/tests/proxy/push_stacked.t @@ -151,7 +151,7 @@ Make sure all temporary namespace got removed ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_stacked_gerrit.t b/tests/proxy/push_stacked_gerrit.t index 82cfaa049..ace09e144 100644 --- a/tests/proxy/push_stacked_gerrit.t +++ b/tests/proxy/push_stacked_gerrit.t @@ -134,7 +134,7 @@ Make sure all temporary namespace got removed "real_repo.git" = ["::sub1/"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_stacked_split.t b/tests/proxy/push_stacked_split.t index 2c666541d..b0398820f 100644 --- a/tests/proxy/push_stacked_split.t +++ b/tests/proxy/push_stacked_split.t @@ -76,7 +76,7 @@ Make sure all temporary namespace got removed "real_repo.git" = ["::sub1/"] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_stacked_sub.t b/tests/proxy/push_stacked_sub.t index d6dc50e55..b07890d7e 100644 --- a/tests/proxy/push_stacked_sub.t +++ b/tests/proxy/push_stacked_sub.t @@ -132,7 +132,7 @@ Make sure all temporary namespace got removed ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_subdir_prefix.t b/tests/proxy/push_subdir_prefix.t index 32058ca69..9bd1b98eb 100644 --- a/tests/proxy/push_subdir_prefix.t +++ b/tests/proxy/push_subdir_prefix.t @@ -48,7 +48,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_subtree.t b/tests/proxy/push_subtree.t index 746f6ca48..10f2758ce 100644 --- a/tests/proxy/push_subtree.t +++ b/tests/proxy/push_subtree.t @@ -90,7 +90,7 @@ Make sure all temporary namespace got removed ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/push_subtree_two_repos.t b/tests/proxy/push_subtree_two_repos.t index 533d0d6d3..db48d4d9e 100644 --- a/tests/proxy/push_subtree_two_repos.t +++ b/tests/proxy/push_subtree_two_repos.t @@ -118,7 +118,7 @@ Put a double slash in the URL to see that it also works ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/unrelated_leak.t b/tests/proxy/unrelated_leak.t index 2d94c816c..cc03a84c9 100644 --- a/tests/proxy/unrelated_leak.t +++ b/tests/proxy/unrelated_leak.t @@ -133,7 +133,7 @@ Flushed credential cache ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace.t b/tests/proxy/workspace.t index eb4ad57c9..ac74070ec 100644 --- a/tests/proxy/workspace.t +++ b/tests/proxy/workspace.t @@ -225,7 +225,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_create.t b/tests/proxy/workspace_create.t index e904bc1a8..21c8cbb74 100644 --- a/tests/proxy/workspace_create.t +++ b/tests/proxy/workspace_create.t @@ -442,7 +442,7 @@ Note that ws/d/ is now present in the ws ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_discover.t b/tests/proxy/workspace_discover.t index e9aea3f9e..51df2b341 100644 --- a/tests/proxy/workspace_discover.t +++ b/tests/proxy/workspace_discover.t @@ -102,7 +102,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_edit_commit.t b/tests/proxy/workspace_edit_commit.t index 4eba79b00..5b1fe40c9 100644 --- a/tests/proxy/workspace_edit_commit.t +++ b/tests/proxy/workspace_edit_commit.t @@ -181,7 +181,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_in_workspace.t b/tests/proxy/workspace_in_workspace.t index a950511c4..c85aad10f 100644 --- a/tests/proxy/workspace_in_workspace.t +++ b/tests/proxy/workspace_in_workspace.t @@ -245,7 +245,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_invalid_trailing_slash.t b/tests/proxy/workspace_invalid_trailing_slash.t index fbba5c5f7..53c12dbfa 100644 --- a/tests/proxy/workspace_invalid_trailing_slash.t +++ b/tests/proxy/workspace_invalid_trailing_slash.t @@ -184,7 +184,7 @@ Flushed credential cache ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_modify.t b/tests/proxy/workspace_modify.t index f467df3f5..15bbd077a 100644 --- a/tests/proxy/workspace_modify.t +++ b/tests/proxy/workspace_modify.t @@ -441,7 +441,7 @@ Note that ws/d/ is now present in the ws ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_modify_chain.t b/tests/proxy/workspace_modify_chain.t index 1a3e508d9..81017c4d4 100644 --- a/tests/proxy/workspace_modify_chain.t +++ b/tests/proxy/workspace_modify_chain.t @@ -249,7 +249,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_modify_chain_prefix_subtree.t b/tests/proxy/workspace_modify_chain_prefix_subtree.t index 129aecb98..5c784fd17 100644 --- a/tests/proxy/workspace_modify_chain_prefix_subtree.t +++ b/tests/proxy/workspace_modify_chain_prefix_subtree.t @@ -304,7 +304,7 @@ Note that ws/d/ is now present in the ws ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_pre_history.t b/tests/proxy/workspace_pre_history.t index 867bc0162..f04e43971 100644 --- a/tests/proxy/workspace_pre_history.t +++ b/tests/proxy/workspace_pre_history.t @@ -88,7 +88,7 @@ file was created ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_publish.t b/tests/proxy/workspace_publish.t index 3b05b4347..f70f4f946 100644 --- a/tests/proxy/workspace_publish.t +++ b/tests/proxy/workspace_publish.t @@ -125,7 +125,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf diff --git a/tests/proxy/workspace_tags.t b/tests/proxy/workspace_tags.t index 868010435..5d388fef2 100644 --- a/tests/proxy/workspace_tags.t +++ b/tests/proxy/workspace_tags.t @@ -231,7 +231,7 @@ ] . |-- josh - | `-- 20 + | `-- 19 | `-- sled | |-- blobs | |-- conf