git-annex/Command
Joey Hess f5f799f17e
fully working move --from --to (not release quality)
When the destination already has a copy, it behaves the same as
drop --from really, but display it as a move and implement it
reusing the factored out code from fromPerform.

(Note that willDropMakeItWorse never returns DropAllowed in that
situation, because it's told that dest has a copy. So numcopies is
always checked.)

And when only the source and not the local repo or destination have a
copy, do the full copy from source to local, then copy from local to
dest, then drop from local, then drop from source dance.

This is complicated by fromPerform being hardcoded to assume there is a
local copy, but the local copy has already been dropped. That's why
it uses cleanupfromsrc RemoveNever to avoid the code that makes that
assumption, and finishes with a call to dropfromsrc.

And, since the location log has not yet been updated, checking numcopies
was not working, until I added UnVerifiedRemote dest to the list of
things to check.

This is not yet quite mergeable though. There are two things in the
comment above fromToPerform that are not implemented yet: Checking the
location log before dropping the local copy, and locking the temporary
local copy for drop.

Sponsored-by: Dartmouth College's DANDI project
2023-01-23 16:12:33 -04:00
..
Add.hs remove whenAnnexed and ifAnnexed 2022-10-26 14:06:32 -04:00
AddUnused.hs get rid of racy addLink 2022-06-14 14:47:15 -04:00
AddUrl.hs convert renameFile to moveFile to support cross-device moves 2022-12-20 15:17:50 -04:00
Adjust.hs rename to --unlock-present and better reverse adjusting 2020-11-13 14:56:43 -04:00
Assistant.hs avoid redundant prompt for http password in git-annex get that does autoinit 2022-09-09 14:43:43 -04:00
Benchmark.hs improve benchmark --databases 2019-11-21 17:25:20 -04:00
CalcKey.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
CheckPresentKey.hs --batch-keys 2021-08-25 14:21:12 -04:00
Config.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
ConfigList.hs don't frontload reconcileStaged in git-annex init 2022-11-18 13:58:47 -04:00
ContentLocation.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Copy.hs move/copy: option parsing for --from with --to 2023-01-18 14:42:39 -04:00
Dead.hs improve usage 2022-10-03 13:49:42 -04:00
Describe.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
DiffDriver.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Direct.hs Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
Drop.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
DropKey.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
DropUnused.hs move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
EnableRemote.hs enableremote: Better handling of the unusual case where multiple special remotes have been initialized with the same name 2022-01-05 15:12:11 -04:00
EnableTor.hs Make git-annex enable-tor work when using the linux standalone build 2022-10-26 15:45:08 -04:00
ExamineKey.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Expire.hs Future proof activity log parsing 2021-06-14 14:18:19 -04:00
Export.hs export: fix multi-file delete bug 2022-11-09 16:24:37 -04:00
FilterBranch.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
FilterProcess.hs smudge: Warn when encountering a pointer file that has other content appended to it 2022-02-23 15:17:08 -04:00
Find.hs findkeys: New command, very similar to git-annex find but operating on keys 2023-01-17 14:51:57 -04:00
FindKeys.hs findkeys: New command, very similar to git-annex find but operating on keys 2023-01-17 14:51:57 -04:00
FindRef.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Fix.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Forget.hs move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
FromKey.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Fsck.hs fix reversion on skipping dead keys in --all/bare 2022-09-13 14:38:13 -04:00
FuzzTest.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
GCryptSetup.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Get.hs push location log updating up to callers of download 2023-01-23 13:47:41 -04:00
Group.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
GroupWanted.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Help.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Import.hs add --dry-run: New option 2022-08-03 11:16:04 -04:00
ImportFeed.hs remove whenAnnexed and ifAnnexed 2022-10-26 14:06:32 -04:00
InAnnex.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Indirect.hs Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
Info.hs remove whenAnnexed and ifAnnexed 2022-10-26 14:06:32 -04:00
Init.hs don't frontload reconcileStaged in git-annex init 2022-11-18 13:58:47 -04:00
InitRemote.hs renameremote: Better handling of case where there are multiple special remotes with a name 2022-01-05 15:24:02 -04:00
Inprogress.hs more RawFilePath conversion 2020-11-02 16:31:28 -04:00
List.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Lock.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Log.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
LookupKey.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Map.hs move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
MatchExpression.hs split ProvidedInfo and UserProvidedInfo 2020-09-28 12:12:38 -04:00
Merge.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
MetaData.hs use lookupKeyStaged in --batch code paths 2022-10-26 14:43:06 -04:00
Migrate.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
MinCopies.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
Mirror.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Move.hs fully working move --from --to (not release quality) 2023-01-23 16:12:33 -04:00
Multicast.hs avoid unix-compat's rename 2022-07-12 14:55:02 -04:00
NotifyChanges.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
NumCopies.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
P2P.hs complete the magic wormhole pairin appid transition 2021-12-30 12:16:22 -04:00
P2PStdIO.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
PostReceive.hs remove direct mode remnant of merging unrelated histories 2021-07-19 11:41:26 -04:00
PreCommit.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Proxy.hs Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
ReadPresentKey.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
RecvKey.hs avoid flushing keys db queue after each Annex action 2022-10-12 14:12:23 -04:00
RegisterUrl.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Reinit.hs don't frontload reconcileStaged in git-annex init 2022-11-18 13:58:47 -04:00
Reinject.hs remove whenAnnexed and ifAnnexed 2022-10-26 14:06:32 -04:00
ReKey.hs remove whenAnnexed and ifAnnexed 2022-10-26 14:06:32 -04:00
RemoteDaemon.hs assistant: Fix a crash on startup by avoiding using forkProcess 2021-05-12 15:08:03 -04:00
RenameRemote.hs renameremote: Better handling of case where there are multiple special remotes with a name 2022-01-05 15:24:02 -04:00
Repair.hs move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
Required.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
ResolveMerge.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Restage.hs restage: New git-annex command, handles restaging unlocked files 2022-09-23 16:29:59 -04:00
RmUrl.hs use lookupKeyStaged in --batch code paths 2022-10-26 14:43:06 -04:00
Schedule.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Semitrust.hs improve usage 2022-10-03 13:49:42 -04:00
SendKey.hs remove git-annex-shell compat code 2021-10-11 15:36:51 -04:00
SetKey.hs use RawFilePath version of rename 2022-06-22 16:47:34 -04:00
SetPresentKey.hs reject batch options combined with non-batch options 2022-01-26 13:00:19 -04:00
Smudge.hs smudge: Warn when encountering a pointer file that has other content appended to it 2022-02-23 15:17:08 -04:00
Status.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Sync.hs remove whenAnnexed and ifAnnexed 2022-10-26 14:06:32 -04:00
Test.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
TestRemote.hs move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
TransferKey.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
TransferKeys.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Transferrer.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Trust.hs improve usage 2022-10-03 13:49:42 -04:00
Unannex.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Undo.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
Ungroup.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Uninit.hs remove whenAnnexed and ifAnnexed 2022-10-26 14:06:32 -04:00
Unlock.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
UnregisterUrl.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Untrust.hs improve usage 2022-10-03 13:49:42 -04:00
Unused.hs move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
Upgrade.hs don't frontload reconcileStaged in git-annex init 2022-11-18 13:58:47 -04:00
VAdd.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
VCycle.hs restage: New git-annex command, handles restaging unlocked files 2022-09-23 16:29:59 -04:00
Version.hs fix spelling of upgradeable 2022-01-19 12:14:50 -04:00
VFilter.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Vicfg.hs vicfg: Include mincopies configuration 2022-09-15 15:11:59 -04:00
View.hs more RawFilePath conversion 2020-10-30 15:55:59 -04:00
VPop.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Wanted.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Watch.hs remotedaemon: Don't list --stop in help since it's not supported. 2019-09-30 14:40:46 -04:00
WebApp.hs Make git-annex enable-tor work when using the linux standalone build 2022-10-26 15:45:08 -04:00
Whereis.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
WhereUsed.hs remove --backend from global options 2022-06-29 13:33:25 -04:00