From f1b678facef7afc2d91701773e195cc87cabd575 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 13 Mar 2023 14:50:28 -0400 Subject: [PATCH] copy --from --to location tracking update copy: When --from and --to are combined and the content is already present on the destination remote, update location tracking as necessary. Sponsored-by: Dartmouth College's DANDI project --- CHANGELOG | 3 +++ Command/Move.hs | 3 +++ .../copy_--from_--to_does_not_adjust_avail_info.mdwn | 2 ++ ...omment_1_d6a1dd2e039dcb6dafcf4675b9244617._comment | 11 +++++++++++ 4 files changed, 19 insertions(+) create mode 100644 doc/bugs/copy_--from_--to_does_not_adjust_avail_info/comment_1_d6a1dd2e039dcb6dafcf4675b9244617._comment diff --git a/CHANGELOG b/CHANGELOG index 649e54f877..d61faa42e1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,9 @@ git-annex (10.20230228) UNRELEASED; urgency=medium build. * importfeed: Display feed title. * init: Support being ran in a repository that has a newline in its path. + * copy: When --from and --to are combined and the content is already + present on the destination remote, update location tracking as + necessary. -- Joey Hess Mon, 27 Feb 2023 12:31:14 -0400 diff --git a/Command/Move.hs b/Command/Move.hs index 528e6ce22c..925b4e45d9 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -399,6 +399,9 @@ fromToPerform src dest removewhen key afile = do Right True -> do showAction $ "from " ++ Remote.name src showAction $ "to " ++ Remote.name dest + -- The log may not indicate dest's copy + -- yet, so make sure it does. + logChange key (Remote.uuid dest) InfoPresent -- Drop from src, checking copies including -- the one already in dest. dropfromsrc id diff --git a/doc/bugs/copy_--from_--to_does_not_adjust_avail_info.mdwn b/doc/bugs/copy_--from_--to_does_not_adjust_avail_info.mdwn index 1d34ec7cef..40f6d995b7 100644 --- a/doc/bugs/copy_--from_--to_does_not_adjust_avail_info.mdwn +++ b/doc/bugs/copy_--from_--to_does_not_adjust_avail_info.mdwn @@ -51,3 +51,5 @@ I would expect `copy` to make a record locally that now the content is also on d [[!meta author=yoh]] [[!tag projects/dandi]] + +> [[fixed|done]] --[[Joey]] diff --git a/doc/bugs/copy_--from_--to_does_not_adjust_avail_info/comment_1_d6a1dd2e039dcb6dafcf4675b9244617._comment b/doc/bugs/copy_--from_--to_does_not_adjust_avail_info/comment_1_d6a1dd2e039dcb6dafcf4675b9244617._comment new file mode 100644 index 0000000000..b5698f0fe1 --- /dev/null +++ b/doc/bugs/copy_--from_--to_does_not_adjust_avail_info/comment_1_d6a1dd2e039dcb6dafcf4675b9244617._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2023-03-13T18:34:36Z" + content=""" +Aah, I see, this is when the content is present on the --to +remote, but git-annex is not locally aware of that yet. + +And `git-annex copy --to remote` does +update location tracking in such a case, so --from --to should also. +"""]] -- 2.30.2