Commit graph

30536 commits

Author SHA1 Message Date
Joey Hess
5483ea90ec
graft exported tree into git-annex branch
So it will be available later and elsewhere, even after GC.

I first though to use git update-index to do this, but feeding it a line
with a tree object seems to always cause it to generate a git subtree
merge. So, fell back to using the Git.Tree interface to maniupulate the
trees, and not involving the git-annex branch index file at all.

This commit was sponsored by Andreas Karlsson.
2017-08-31 18:06:49 -04:00
Joey Hess
978885247e
implement export.log and resolve export conflicts
Incremental export updates work now too.

This commit was sponsored by Anthony DeRobertis on Patreon.
2017-08-31 15:47:23 -04:00
Joey Hess
bb08b1abd2
make storeExport atomic
This avoids needing to deal with the complexity of partially transferred
files in the export. We'd not be able to resume uploading to such a file
anyway, so just avoid them.

The implementation in Remote.Directory is not completely ideal, because
it could leave the temp file hanging around in the export directory.
This only happens if it's killed with -9, or there's a power failure;
normally viaTmp cleans up after itself, even when interrupted. I could
not see a better way to do it though, since the export directory might
be the root of a filesystem.

Also some design thoughts on resuming, which depend on storeExport being
atomic.

This commit was sponsored by Fernando Jimenez on Partreon.
2017-08-31 14:24:32 -04:00
Joey Hess
7c7af82578
resuming exports
Make a pass over the whole exported tree, and upload anything that has
not yet reached the export. Update location log when exporting.

Note that the synthesized keys for non-annexed files are stored in the
location log too.

Some cases involving files in the tree with the same content are not
handled correctly yet.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2017-08-31 13:33:50 -04:00
Joey Hess
e662aceeac
improve type 2017-08-31 12:47:08 -04:00
Joey Hess
4694e49158
fix error message when content to export is not locally available 2017-08-31 12:39:10 -04:00
Joey Hess
efe3910c04
remove empty parent dirs when removing from export 2017-08-31 12:32:02 -04:00
Joey Hess
943de657b8
Merge branch 'master' into export 2017-08-31 12:16:22 -04:00
Joey Hess
bdec46ac13
a few tweaks to the design 2017-08-30 13:14:05 -04:00
yarikoptic
b14c4776d6 initial bug report 2017-08-30 14:15:45 +00:00
vgp
71682954f8 Added a comment 2017-08-30 12:42:23 +00:00
Joey Hess
474dd3ae6d
Merge branch 'master' of ssh://git-annex.branchable.com 2017-08-29 17:27:37 -04:00
Joey Hess
74aa4c503b
devblog 2017-08-29 17:26:42 -04:00
Joey Hess
9f3630f4e0
initial export command
Very basic operation works, but of course this is only the beginning.

This commit was sponsored by Nick Daly on Patreon.
2017-08-29 15:10:01 -04:00
Joey Hess
cca2764f91
provide file with content to export
Rather than providing the key to export, provide the file.

When exporting a treeish that contains files that are not annexed,
this will let the content of those files also be exported.

There's still a Key in the interface; it will be used by the external
special remote protocol. A SHA1 key can be used when exporting
non-annexed files.

This commit was sponsored by Brock Spratlen on Patreon.
2017-08-29 13:57:42 -04:00
Joey Hess
8f35c6584d
documentation for export
This commit was sponsored by Ole-Morten Duesund on Patreon.
2017-08-29 13:25:48 -04:00
Joey Hess
e55e445a36
add API for exporting
Implemented so far for the directory special remote.

Several remotes don't make sense to export to. Regular Git remotes,
obviously, do not. Bup remotes almost certianly do not, since bup would
need to be used to extract the export; same store for Ddar. Web and
Bittorrent are download-only. GCrypt is always encrypted so exporting to
it would be pointless. There's probably no point complicating the Hook
remotes with exporting at this point. External, S3, Glacier, WebDAV,
Rsync, and possibly Tahoe should be modified to support export.

Thought about trying to reuse the storeKey/retrieveKeyFile/removeKey
interface, rather than adding a new interface. But, it seemed better to
keep it separate, to avoid a complicated interface that sometimes
encrypts/chunks key/value storage and sometimes users non-key/value
storage. Any common parts can be factored out.

Note that storeExport is not atomic.
doc/design/exporting_trees_to_special_remotes.mdwn has some things in
the "resuming exports" section that bear on this decision. Basically,
I don't think, at this time, that an atomic storeExport would help with
resuming, because exports are not key/value storage, and we can't be
sure that a partially uploaded file is the same content we're currently
trying to export.

Also, note that ExportLocation will always use unix path separators.
This is important, because users may export from a mix of windows and
unix, and it avoids complicating the API with path conversions,
and ensures that in such a mix, they always use the same locations for
exports.

This commit was sponsored by Bruno BEAUFILS on Patreon.
2017-08-29 13:00:41 -04:00
supernaught
15601f2b66 Added a comment 2017-08-28 22:01:23 +00:00
Joey Hess
6ae9d8fe49
simplify
Key is needed to use in reply
2017-08-28 15:37:34 -04:00
Joey Hess
ed5d8ee9ea
update proposed external special remote protocol 2017-08-28 15:34:26 -04:00
Joey Hess
792e582a60
fix link 2017-08-28 15:07:23 -04:00
Joey Hess
92ec2d13b5
formatting 2017-08-28 15:07:19 -04:00
Joey Hess
8cad03d7ca
typo 2017-08-28 15:04:25 -04:00
Joey Hess
5c99131b7b
comment 2017-08-28 13:49:16 -04:00
Joey Hess
4e5b3062d9
response 2017-08-28 13:41:19 -04:00
Joey Hess
bad02c4360
response 2017-08-28 13:38:26 -04:00
Joey Hess
f27efbe3c6
respond and close 2017-08-28 13:36:08 -04:00
Joey Hess
2011716202
close bug filed about git-annex from 2014 2017-08-28 13:29:36 -04:00
Joey Hess
f313fcc2a3
response 2017-08-28 13:26:30 -04:00
Joey Hess
db2a06b66f
init: Display an additional message when it detects a filesystem that allows writing to files whose write bit is not set. 2017-08-28 13:21:18 -04:00
Joey Hess
291d5bb471
response 2017-08-28 13:21:04 -04:00
Joey Hess
755c4a97b5
comment 2017-08-28 13:16:50 -04:00
Joey Hess
dbe031b6b9
remove links to trees of files, as they confuse users and prevent them reading the instructions before downloading 2017-08-28 13:05:03 -04:00
Joey Hess
eae54bc4f5
comment 2017-08-28 13:03:57 -04:00
Joey Hess
ddc29f5bcd
close 2017-08-28 13:01:56 -04:00
Joey Hess
bfaa78ee35
response 2017-08-28 13:01:05 -04:00
Joey Hess
5f732717d8
toFeed was unused so remove 2017-08-28 12:51:25 -04:00
Joey Hess
ee2f096e3b
Support building with feed-1.0, while still supporting older versions.
This commit was sponsored by Jeff Goeke-Smith on Patreon.
2017-08-28 12:29:28 -04:00
marek@33e8ba4fbc201af14a2badcc0656024401f5c916
86ea64d70e 2017-08-28 10:09:42 +00:00
Alan
9428df794f Added a comment: For stretch on armhf, install from unstable 2017-08-28 09:25:22 +00:00
Alan
078c458ff1 Added a comment: No package for armhf on stretch 2017-08-28 09:00:15 +00:00
hugo
1ae6d0aa6b 2017-08-27 12:52:12 +00:00
hugo
650cabe345 2017-08-27 12:51:36 +00:00
hugo
69530ea4fe 2017-08-27 12:50:35 +00:00
aditya.mmy@be7b2fbd14a6ce2b6b8588f6719672725a11ed35
4dfb045549 Added a comment: Nevermind - I got it working 2017-08-27 10:18:03 +00:00
aditya.mmy@be7b2fbd14a6ce2b6b8588f6719672725a11ed35
1d6617e300 fix 2017-08-27 07:18:28 +00:00
aditya.mmy@be7b2fbd14a6ce2b6b8588f6719672725a11ed35
b22e6c1352 fix formatting 2017-08-27 07:17:23 +00:00
aditya.mmy@be7b2fbd14a6ce2b6b8588f6719672725a11ed35
a2166d67bd Reporting a bug. 2017-08-27 07:14:54 +00:00
michalrus
a95bbe6eb5 Added a comment 2017-08-26 12:20:58 +00:00
michalrus
1c55387f8c 2017-08-26 12:20:23 +00:00