Commit graph

2630 commits

Author SHA1 Message Date
Joey Hess
2f740d14da
hmm 2019-04-16 13:18:59 -04:00
Joey Hess
a474304f1d
Merge branch 'master' of ssh://git-annex.branchable.com 2019-04-15 13:49:16 -04:00
Joey Hess
c0c38e986d
added renameremote command 2019-04-15 13:49:03 -04:00
Joey Hess
de7a510da1
update 2019-04-15 13:00:46 -04:00
Joey Hess
00b1943927
close 2019-04-15 12:59:39 -04:00
Joey Hess
72b01b0faf
todo 2019-04-15 12:55:56 -04:00
Joey Hess
40fe5e8927
todo 2019-04-12 11:49:38 -04:00
Ilya_Shlyakhter
9a7cef06e3 added suggestion for git-annex-get --batch --key 2019-04-11 23:41:17 +00:00
Joey Hess
d3d6a45918
thoughts 2019-04-10 12:01:52 -04:00
Joey Hess
7b6d0da9b8
adb import
As well as adding the necessary methods, a few other changes to the adb
remote:

* Use ".annextmp" extension for temp files, to avoid conflict with other
  temp files.
* Stop using "echo $?" to get exit status of command inside adb.
  There were two problems; first the "echo" just before it meant it was
  always 0! And secondly, it seems kind of random on my phone whether it's
  1 or 0, not dependant on whether the command seems to have succeeded.
2019-04-09 17:52:41 -04:00
Joey Hess
7bf18f23e5
todo 2019-04-09 14:07:47 -04:00
Joey Hess
0a14dfd383
comment 2019-04-09 11:08:18 -04:00
Joey Hess
4af55c1f30
Merge branch 'master' of ssh://git-annex.branchable.com 2019-04-05 11:41:46 -04:00
yarikoptic
7db8eaf512 initial question about possible "globus" special remote 2019-04-05 02:25:12 +00:00
Joey Hess
1f3245ddf5
close as basis of this is wrong 2019-04-04 12:50:55 -04:00
Joey Hess
727ac0451a
comment 2019-04-03 13:14:54 -04:00
Joey Hess
bc302b56ae
test patch 2019-03-28 16:16:28 -04:00
Joey Hess
c68ae14268
further thought 2019-03-28 15:46:14 -04:00
Joey Hess
b09c6e3016
todo item based on behavior yoh showed me 2019-03-28 14:04:20 -04:00
Joey Hess
e035bc5324
minor typos 2019-03-27 11:15:20 -04:00
Ilya_Shlyakhter
1c334f74d6 Added a comment 2019-03-26 18:27:04 +00:00
Ilya_Shlyakhter
9b4e06d8c2 fixed a typo 2019-03-26 17:51:19 +00:00
Ilya_Shlyakhter
38669f0817 Added a comment: simplifying the interface 2019-03-26 17:40:33 +00:00
Ilya_Shlyakhter
72b788dfaf re: documenting git-annex dependencies 2019-03-24 18:47:28 +00:00
Joey Hess
9ada4b38c1
comment 2019-03-22 10:30:22 -04:00
Joey Hess
59c8119b2a
comment 2019-03-22 10:18:07 -04:00
Joey Hess
5fea7efee7
comment and toddo 2019-03-22 09:23:31 -04:00
Ilya_Shlyakhter
438ff50013 Added a comment 2019-03-19 20:40:50 +00:00
Joey Hess
caa5cca47f
Merge branch 'master' of ssh://git-annex.branchable.com 2019-03-19 15:57:19 -04:00
Ilya_Shlyakhter
10291efa55 added suggestion for git-annex-test to do simple sanity checks on external utils before running tests that depend on them 2019-03-19 18:55:59 +00:00
Joey Hess
2118006711
comment 2019-03-19 13:53:32 -04:00
Joey Hess
1c2f6aee11
comment 2019-03-19 13:45:28 -04:00
Joey Hess
738325ffb7
comment 2019-03-19 13:40:46 -04:00
Joey Hess
cce81f9b0c
comment 2019-03-19 13:34:45 -04:00
Joey Hess
059ff44e8b
comment 2019-03-19 13:28:08 -04:00
Ilya_Shlyakhter
56fd24de0d added suggestion for importing files from special remotes without downloading them 2019-03-12 17:18:28 +00:00
Joey Hess
91f0f76252
need to write a tip
deferred because a tip that is limited to the directory special remote
is not very interesting to most
2019-03-11 14:30:05 -04:00
Joey Hess
ffec06aaec
update 2019-03-11 14:13:58 -04:00
Joey Hess
057999f0fc
fix sync --content with remote.name.annex-tracking-branch=master:subdir
It was exporting the whole tree not just the subdir. Now tested fully
working in both directions.
2019-03-11 14:07:52 -04:00
Joey Hess
e1fdc8b374
record only subtree in export db and log after importing a subtree 2019-03-11 13:45:01 -04:00
Joey Hess
e46e40bf05
fix update of export tracking branch when exporting branch:subdir 2019-03-11 13:44:12 -04:00
Joey Hess
2912429640
better indicate when special remotes do not support renameExport
Avoid a warning message when renameExport is not supported, and just
fallback to deleting with a subsequent re-upload. Especially needed for
importtree remotes, where renameExport needs to be disabled.

This changes the external special remote protocol, but in a
backwards-compatible way. A reply of UNSUPPORTED-REQUEST to an older
version of git-annex will cause it to make renameExport return False.
2019-03-11 12:53:24 -04:00
Joey Hess
c755788256
sync: import when annex-tracking-branch is configured
This works, and tested syncing both gets changes from a special remote
and sends changes to it, keeping it fully in sync nicely!

But have not tried it with a subdir configured.
2019-03-09 13:57:49 -04:00
Joey Hess
6149a3b9bd
added progress bars
clean up old todo item I checked earlier, see commit
dec30d2b14
2019-03-08 12:43:03 -04:00
Joey Hess
e412129523
concurrency and status messages when downloading from import 2019-03-08 12:33:44 -04:00
Joey Hess
ee5f1422df
remove debug print 2019-03-07 16:08:58 -04:00
Joey Hess
7e35c81ada
locking problem 2019-03-07 15:22:23 -04:00
Joey Hess
9a72785307
fixes to export db lookup when accessing importtree=yes
Now in a fresh clone with a importtree=yes remote enabled,
git annex fsck --from the remote works.
2019-03-07 14:10:56 -04:00
Joey Hess
93025dd59f
add missing locking of ContentIdentifier database when writing
This is not super efficient; it would be better to lock the database
once and build up a queue of changes and flush once.

But, storeExportWithContentIdentifier is likely going to be the really
expensive part, so let's do the simple thing and only optimise later if
needed.
2019-03-07 13:32:33 -04:00
Joey Hess
3f449f845e
update 2019-03-07 13:28:18 -04:00
Joey Hess
68d1661251
cross-repo import now working correctly 2019-03-07 12:31:35 -04:00
Joey Hess
ee251b2e2e
implement updating the ContentIdentifier db with info from the git-annex branch
untested

This won't be super slow, but it does need to diff two likely large
trees, and since the git-annex branch rarely sits still, it will most
likely be run at the beginning of every import.

A possible speed improvement would be to only run this when the database
did not contain a ContentIdentifier. But that would only speed up
imports when there is no new version of a file on the special remote,
at most renames of existing files being imported.

A better speed improvement would be to record something in the git-annex
branch that indicates when an import has been run, and only do the diff
if the git-annex branch has record of a newer import than we've seen
before. Then, it would only run when there is in fact new
ContentIdentifier information available from a remote. Certianly doable,
but didn't want to complicate things yet.
2019-03-06 18:04:30 -04:00
Joey Hess
dec30d2b14
updates
Note that I tried an evil remote that lists ImportLocations with
../../../ in them and indeed this resulted in git blowing up and the
import failing, and not writing outside the repo.
2019-03-06 17:07:36 -04:00
Joey Hess
8e9713b769
add export+import test case 2019-03-06 16:49:33 -04:00
Joey Hess
b3d30e7d70
remove unncessary locking of ContentIdentifier db
Remote.Helper.ExportImport only reads from it, and locking is only
needed when writing.
2019-03-06 14:36:57 -04:00
Joey Hess
f957f64278
add todo 2019-03-06 11:24:06 -04:00
Joey Hess
0db393d82f
add bug 2019-03-05 17:19:26 -04:00
Joey Hess
5767b1b00d
avoid updating tracking branch when transfer to export throws exception 2019-03-05 16:51:13 -04:00
Joey Hess
dc278c059c
fix STM crash
git-annex: thread blocked indefinitely in an STM transaction
failed

git-annex: sqlite query crashed
CallStack (from HasCallStack):
  error, called at ./Database/Handle.hs:98:42 in main:Database.Handle
failed

This needs further investigation.
2019-03-05 16:37:40 -04:00
Joey Hess
46d33e804a
added checkPresentExportWithContentIdentifier
Ugh, don't like needing to add this, but I can't see a way around it.
2019-03-05 16:03:03 -04:00
Joey Hess
fd2a1aaa17
avoid using renameExport on import remotes 2019-03-05 14:57:48 -04:00
Joey Hess
9df9a3f82b
more todo 2019-03-05 14:55:22 -04:00
Joey Hess
8c54604e67
import+export from directory special remote fully working
Had to add two more API calls to override export APIs that are not safe
for use in combination with import.

It's unfortunate that removeExportDirectory is documented to be allowed
to remove non-empty directories. I'm not entirely sure why it's that
way, my best guess is it was intended to make it easy to implement with
just rm -rf.
2019-03-05 14:20:14 -04:00
Joey Hess
554b7b7f3e
fix todo 2019-03-04 18:20:12 -04:00
Joey Hess
cd3a2b023a
initial try at using storeExportWithContentIdentifier
Untested, and I'm not sure about the locking of the ContentIdentifier db.
2019-03-04 17:50:41 -04:00
Joey Hess
aaacf431d8
handle importtree=yes config
For now, it's only allowed when exporttree=yes is also set.
That simplified the implementation, but could later be changed if
there's a remote that makes sense to be an import but not an export.
However, it may work just as well to make a remote be readonly to
prevent export to it while still allowing import.
2019-03-04 16:07:35 -04:00
Joey Hess
3cd19fb4d0
use InodeCache to avoid races in import from directory special remote
This does not avoid all possible races, but it does avoid all likely
ones, and is demonstratably better than git's own handling of races
where files get modified at the same time as it's updating the working
tree.

The main thing this won't detect are not unlikely races where part
of a file gets changed while it's being copied and then the file is
restored to its original condition before the modification check.
No, it's more likely that the limitations of checking inode, size,
and mtime won't detect certian modifications, involving eg mmapped
files.
2019-03-04 13:57:23 -04:00
Joey Hess
51fc969b66
notes 2019-03-01 16:44:34 -04:00
Joey Hess
18d7a1dbbb
make export and sync update special remote tracking branch
The branch is only updated once the export is 100% complete. This way,
if an export is started but interrupted and so the remote does not yet
contain some of the files, an import will make a commit on the old
branch, and so won't delete the missing files.
2019-03-01 16:35:48 -04:00
Joey Hess
d28b0a8bd0
use disconnected history for import tracking branch
This avoids the first merge from it deleting all files in the current
branch, which was very surpring and unwanted behavior.
2019-03-01 14:33:29 -04:00
Joey Hess
740f957cef
new problem 2019-03-01 13:49:26 -04:00
Joey Hess
1c8793691a
import: update location log for removed files 2019-03-01 13:26:59 -04:00
Joey Hess
5402c39882
plan for item 2019-03-01 12:56:20 -04:00
Joey Hess
a3f6e07fec
todo 2019-02-27 15:56:32 -04:00
Joey Hess
b1f10fbb4d
update location log during import 2019-02-27 13:58:03 -04:00
Joey Hess
e2e57f8556
initial export support for directory special remote
This does not guard against race condition yet, it's only for testing
purposes.
2019-02-27 13:42:34 -04:00
Joey Hess
45aacd888b
import downloader complete (untested)
Made some api changes.

listImportableContents needs to provide the size
of the data, so the downloader can check disk free space.

retrieveExportWithContentIdentifier is passed the filepath to write to

Use temporary "CID" key during download of a ContentIdentifier from a
remote, so withTmp can be used and then move the content to the real key
once it's known.
2019-02-27 13:15:02 -04:00
Joey Hess
f4b773e9a1
incomplete action to download files from import 2019-02-26 15:25:28 -04:00
Joey Hess
e4e464da65
import command is updating tracking branch 2019-02-26 13:15:48 -04:00
Joey Hess
7072f7a071
note 2019-02-23 15:57:18 -04:00
Joey Hess
4e0d08b66b
Merge branch 'master' into importtree 2019-02-22 21:18:13 -04:00
Joey Hess
8c836623b7
design work 2019-02-22 16:18:09 -04:00
Joey Hess
8fdea8f444
WIP
Added graftTree but it's buggy.

Should use graftTree in Annex.Branch.graftTreeish; it will be faster
than the current implementation there.

Started Annex.Import, but untested and it doesn't yet handle tree
grafting.
2019-02-21 17:32:59 -04:00
Joey Hess
7392304f1c
notes 2019-02-20 17:06:36 -04:00
Joey Hess
d128c8c3ec
add design document for import tree 2019-02-20 12:12:32 -04:00
Joey Hess
2f67c4ac87
minor tweaks to transition plan 2019-02-20 11:28:00 -04:00
Joey Hess
02c1542886
Merge branch 'master' of ssh://git-annex.branchable.com 2019-02-13 16:29:28 -04:00
Joey Hess
94d8bfb158
finally an API happy with 2019-02-13 16:28:02 -04:00
Ilya_Shlyakhter
3caae7ea81 alternate way to support batch operations by remotes 2019-02-13 16:55:34 +00:00
Ilya_Shlyakhter
1b279ec738 added suggestion for batch-mode operations for remotes 2019-02-13 16:52:09 +00:00
Ilya_Shlyakhter
23ef159352 Added a comment 2019-02-13 16:48:08 +00:00
Ilya_Shlyakhter
9d192e1cbb Added a comment 2019-02-13 16:46:26 +00:00
Grothausmann.Roman@343b033fef650d362015d5593ec935121340e082
a716b2cff9 Added a comment: Up-vote for sftp special remote 2019-02-13 12:11:05 +00:00
Grothausmann.Roman@343b033fef650d362015d5593ec935121340e082
bd06bcaebe 2019-02-13 11:21:10 +00:00
Joey Hess
2514c26ed8
update 2019-02-12 22:02:02 -04:00
Ilya_Shlyakhter
7e8016f104 added suggestion for creating simpler-to-use trusted export remotes 2019-02-12 21:09:22 +00:00
Ilya_Shlyakhter
024120065e universal batch mode -- clarified difference from current batch modes 2019-02-12 00:38:14 +00:00
Ilya_Shlyakhter
ea00337468 universal batch mode 2019-02-12 00:35:16 +00:00
Joey Hess
87987c78cf
starting api design 2019-02-11 15:47:18 -04:00
Joey Hess
b7991248db
simplify 2019-02-11 15:16:35 -04:00
Joey Hess
5a36f85c16
thoughts 2019-02-11 14:14:44 -04:00
Joey Hess
2f117ec7b7
thought 2019-02-09 14:03:59 -04:00
Joey Hess
b6df092f56
close 2019-02-07 16:12:07 -04:00
Joey Hess
d5c435d3dc
add 2019-02-07 12:16:23 -04:00
Ilya_Shlyakhter
c33793f983 Added a comment 2019-02-05 20:55:59 +00:00
Joey Hess
c3f47ba389
make .noannex file prevent repo fixups
Avoid performing repository fixups for submodules and git-worktrees
when there's a .noannex file that will prevent git-annex from being
used in the repository.

This change is ok as long as the .noannex file is really going to prevent
git-annex from being used. But, init --force could override the file.
Which would result in the repo being initialized without the fixups
having run.

To avoid that situation decided to change init, to not let --force be used
to override a .noannex file. Instead the user can just delete the file.
2019-02-05 14:43:23 -04:00
Joey Hess
b080699a95
fromkey --json
* fromkey: Added --json.
* fromkey --batch output changed to support using it with --json.
  The old output was not parseable for any useful information, so
  this is not expected to break anything.
2019-02-05 14:03:29 -04:00
Joey Hess
7b46b43c48
fromkey: Made idempotent
If the worktree file already exists, and is annexed and uses the same
key, avoid failing, nothing needs to be done.

Had to add lookupFileNotHidden to handle the case where an adjust --hide-missing
is in use, and the worktree file was hidden due to the object content
being missing. lookupFile would return the key of the hidden file,
but it makes sense that after fromkey succeeds, the worktree must
contain the file it was supposed to set up.
2019-02-05 13:13:13 -04:00
Ilya_Shlyakhter
1b3c4d9a56 git-annex-fromkey behavior when target file exists 2019-02-02 23:13:55 +00:00
Ilya_Shlyakhter
f0dea0ba06 reporting the status of each operation in a batch; completing doable ops even if others fail. 2019-01-30 22:20:10 +00:00
kyle
64ae689f21 2019-01-29 16:26:06 +00:00
yarikoptic
76652f0907 Added a comment 2019-01-26 00:46:04 +00:00
Ilya_Shlyakhter
973034eb6d Added a comment 2019-01-25 21:34:15 +00:00
yarikoptic
fd5bf09cd5 initial plea for publicurl for all special remotes 2019-01-25 03:08:39 +00:00
yarikoptic
55376d0a28 initial whining about absent way to get supported configuration options for a special remote 2019-01-25 02:58:52 +00:00
Joey Hess
ee1cbe98e3
thoughts 2019-01-22 13:25:54 -04:00
Joey Hess
fe424fd76c
comment 2019-01-22 11:56:25 -04:00
Joey Hess
e0b3ba3819
comment 2019-01-22 11:44:02 -04:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
cc3a70e7aa Added a comment 2019-01-21 11:57:07 +00:00
lykos@d125a37d89b1cfac20829f12911656c40cb70018
8961e9fd79 Added a comment 2019-01-21 11:40:07 +00:00
yarikoptic
aa8dbb3436 Added a comment: May be it is time? 2019-01-20 15:32:39 +00:00
Ilya_Shlyakhter
62a6dc6148 Added a comment 2019-01-18 20:57:36 +00:00
Joey Hess
d5f2463702
misctmp cleanup
* Switch to using .git/annex/othertmp for tmp files other than partial
  downloads, and make stale files left in that directory when git-annex
  is interrupted be cleaned up promptly by subsequent git-annex processes.
* The .git/annex/misctmp directory is no longer used and git-annex will
  delete anything lingering in there after it's 1 week old.

Also, in Annex.Ingest, made the filename it uses in the tmp dir be
prefixed with "ingest-" to avoid potentially using a filename used by
some other code.
2019-01-17 16:02:22 -04:00
Joey Hess
8555169e71
testremote: Support testing readonly remotes with the --test-readonly option
This commit was sponsored by Ilya Shlyakhter on Patreon.
2019-01-17 12:44:52 -04:00
Joey Hess
8230b62e06
add todo 2019-01-17 11:49:56 -04:00
Ilya_Shlyakhter
8c0a2a1155 added comments about testing addurl-related functions in testremote 2019-01-15 21:24:29 +00:00
Ilya_Shlyakhter
a1be80635f git-annex-testremote for read-only external special remotes 2019-01-15 16:00:45 +00:00
Joey Hess
745ecccd0e
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-14 19:00:56 -04:00
Joey Hess
918868915c
rename page 2019-01-14 15:57:04 -04:00
Ilya_Shlyakhter
9953e3d353 Added a comment 2019-01-14 16:11:39 +00:00
andrew
f605156e42 2019-01-13 18:11:07 +00:00
Ilya_Shlyakhter
15dd1a17a1 Added a comment 2019-01-11 22:23:06 +00:00
Joey Hess
c1c976d1fa
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-11 17:25:56 -04:00
Joey Hess
d12f4db54d
comment 2019-01-11 16:54:07 -04:00
git-annex.branchable.com@1c3a8a83c15a19620a0a1a2e653d7c662fc8fe50
c30045bf75 Added a comment: get dry-run-ish option 2019-01-11 16:18:13 +00:00
Ilya_Shlyakhter
15fddad749 added suggestion to support MD5E keys that omit file size, and/or support attaching checksums to URL/WORM keys in metadata 2019-01-08 20:12:38 +00:00
Ilya_Shlyakhter
6835cd3957 asked about per-branch git-annex branches 2019-01-02 21:12:13 +00:00
andrew
d849ee579f Added a comment 2019-01-01 20:02:58 +00:00
michael@ff03af62c7fd492c75066bda2fbf02370f5431f4
25cc890be1 Added a comment: Import --clean-duplicates 2018-12-31 10:40:04 +00:00
andrew
68a07151ef Added a comment 2018-12-30 23:29:16 +00:00
travis.a.everett@3055951666d9c7bb74d8826294a71629368f5b92
81cd3c7d2a 2018-12-27 19:22:45 +00:00
spwhitton
556c555aa9 Added a comment 2018-12-21 12:27:14 +00:00
Joey Hess
365286279f
unused: Update suggested git log message to see where data was previously used so it will also work with v7 unlocked pointer files. 2018-12-19 13:53:49 -04:00
Joey Hess
c53a168717
followup 2018-12-19 13:45:37 -04:00
spwhitton
68da029629 Added a comment 2018-12-18 21:56:24 +00:00
Joey Hess
e6886eb316
Merge branch 'master' of ssh://git-annex.branchable.com 2018-12-18 16:31:49 -04:00
Joey Hess
70ba925abc
followup 2018-12-18 16:30:41 -04:00
spwhitton
c5a7221b21 update bug report in light of attempt to reproduce 2018-12-18 18:37:21 +00:00
anarcat
636dea401b trivial documentation change... 2018-12-14 15:15:28 +00:00
spwhitton
a1df27a102 file test suite failure bug 2018-12-13 17:48:50 +00:00