Commit graph

2010 commits

Author SHA1 Message Date
Joey Hess
bf0e860617 changelog for https://github.com/joeyh/git-annex/pull/41 2015-04-20 14:53:14 -04:00
Joey Hess
b7be1680a7 prep release 2015-04-20 14:44:15 -04:00
Joey Hess
5948c148fb Make repo init more robust.
The setDifferences that got added to initialize turns out to make a git
commit, and before ensureCommit has been used. Thus, repo init can fail
when the system has a broken hostname etc.

Move the ensureCommit to the very first thing to avoid this kind of breakage.
2015-04-20 14:01:41 -04:00
Joey Hess
fdf0d708d2 reorder 2015-04-20 13:35:09 -04:00
Joey Hess
2665be44d5 update some windows libraries for newer version of cygwin 2015-04-20 11:08:32 -04:00
Joey Hess
5f73bc3a12 Removed dependency on haskell SHA library, instead using cryptohash >= 0.11.0. 2015-04-19 11:05:32 -04:00
Joey Hess
ef2202fd94 required: New command, like wanted, but for required content.
Also refactored some code to reduce duplication.
2015-04-18 16:04:35 -04:00
Joey Hess
8d685768d3 fsck --from remote: Avoid downloading a key if it would go over the annex.diskreserve limit. 2015-04-18 14:23:42 -04:00
Joey Hess
8489057e8d fsck --from remote: When bad content is found in the remote, and the local repo does not have a copy of the content, preserve the bad content in .git/annex/bad/ to avoid further data loss. 2015-04-18 14:13:07 -04:00
Joey Hess
0def1f0b53 Fix fsck --from a git remote in a local directory, and from a directory special remote. This was a reversion caused by the relative path changes in 5.20150113.
The directory special remote was not affected in its normal configuration,
since annex-directory is an absolute path normally. But it could fail
when a relative path was used.

The git remote was affected even when an absolute path to it was used in
.git/config, since git-annex now converts all such paths to relative.
2015-04-18 13:36:12 -04:00
Joey Hess
3a078ab357 When a key's size is unknown, still check the annex.diskreserve, and avoid getting content if the disk is too full.
We can't check if there's enough disk space to download the content,
but we *can* check if there's certainly not enough!
2015-04-17 21:29:15 -04:00
Joey Hess
86a2f9dc4d Merge branch 'master' into concurrentprogress
Conflicts:
	debian/changelog
2015-04-14 15:35:15 -04:00
Joey Hess
f84ccaa4e8 fix relPathDirToFileAbs on windows with different drive letters
Since we started using this for git repos, when a remote was on another
drive, it resulted in a bogus relative path to it being used by git-annex,
which didn't work.
2015-04-14 14:16:44 -04:00
Joey Hess
efd6a8e3aa bittorrent: Fix handling of magnet links. 2015-04-14 12:57:01 -04:00
Joey Hess
4b6dec6a12 Windows: Renamed start menu file to avoid loop in some versions of Windows where the menu file is treated as a git-annex program. 2015-04-13 14:24:07 -04:00
Joey Hess
2be4834822 info: Added --bytes option. 2015-04-12 14:08:40 -04:00
Joey Hess
b14ec45aa8 info dir: Added information about repositories that contain files in the specified directory.
This is a nearly free feature; it piggybacks on the location log lookups
done for the numcopies stats. So, the only extra overhead is updating
the map of repository sizes.

However, I had to switch to Data.Map.Strict, which needs containers 0.5.
If backporting to wheezy, will probably need to revert this commit.
2015-04-12 12:54:41 -04:00
Joey Hess
8077ccbd54 get, move, copy, mirror: Concurrent downloads and uploads are now supported!
This works, and seems fairly robust. Clean get of 20 files at -J3. At -J10,
there are some messages about ssh multiplexing, probably due to a race
spinning up the ssh connection cacher. But, it manages to get all the files
ok regardless.

The progress bars are a scrambled mess though, due to bugs in
ascii-progress, which I've already filed. Particularly this one:
https://github.com/yamadapc/haskell-ascii-progress/issues/8
2015-04-10 17:08:07 -04:00
Joey Hess
2879adc551 fix union merge to call diff-index with -- after the ref
Otherwise, if there's a file in the repo with a name matching the ref,
git could get confused and the merge not work.
2015-04-09 21:13:28 -04:00
Joey Hess
06211738c1 Fix activity log parsing.
I had some cargo culting in there that used the wrong type, so it failed
to parse old logs, and overwrote them with the new log.
2015-04-09 21:02:38 -04:00
Joey Hess
ce0a82f493 contentlocationn: New plumbing command. 2015-04-09 15:34:47 -04:00
Joey Hess
b22aacab44 prep release 2015-04-09 15:06:46 -04:00
Joey Hess
2736c59204 fix webapp reversion caused by relative path changes
webapp: When adding another local repository, and combining it with the
current repository, the new repository's remote path was set to "." rather
than the path to the current repository. This was a reversion caused by the
relative path changes in 5.20150113.
2015-04-09 14:59:08 -04:00
Joey Hess
0f740fd198 This fixes a bug in the assistant introduced by the literal pathspec changes in version 5.20150406.
git-checkignore refuses to work if any pathspec options are set. Urgh.

I audited the rest of git, and no other commands used by git-annex have
such limitations. Indeed, AFAICS, *all* other commands support
--literal-pathspecs. So, worked around this where git-checkignore is
called.
2015-04-09 13:37:06 -04:00
Joey Hess
3695094454 importfeed: Error out when passed a non-url. 2015-04-09 13:09:06 -04:00
Joey Hess
aa31af5594 importfeed: Fix feed download when curl is used.
This bug used to only afflict file:/// urls, but became more exposed
by b8f0b7309f.
2015-04-09 13:02:57 -04:00
Joey Hess
84dc5629c6 info: Display repository mode: bare when in a bare (non-direct mode) repo. 2015-04-09 12:28:26 -04:00
Joey Hess
d5a25bd567 proxy: Made it work when run in a new repository before initial commit. 2015-04-09 12:24:42 -04:00
Joey Hess
4da371af1e add: If annex.largefiles is set and does not match a file that's being added, the file will be checked into git rather than being added to the annex. Previously, git annex add skipped over such files; this new behavior is more useful in direct mode. 2015-04-08 16:14:23 -04:00
Joey Hess
279fa44cd0 fromkey, registerurl: When reading from stdin, allow the filename and url, respectively, to contain whitespace. 2015-04-07 00:58:51 -04:00
Joey Hess
42281f12d6 bring back --quiet filtering of stdout and stderr, with deadlock fixed
I don't quite understand the cause of the deadlock. It only occurred
when git-annex-shell transferinfo was being spawned over ssh to feed
download transfer progress back. And if I removed this line from
feedprogressback, the deadlock didn't occur:
	bytes <- readSV v

The problem was not a leaked FD, as far as I could see. So what was it?
I don't know.

Anyway, this is a nice clean implementation, that avoids the deadlock.
Just fork off the async threads to handle filtering the stdout and stderr,
and let them clean up their handles whenever they decide to exit.

I've verified that the handles do get promptly closed, although a little
later than I would expect. Presumably that "little later" is what
was making waiting on the threads deadlock.

Despite the late exit, the last line of stdout and stderr appears where
I'd want it to, so I guess this is ok..
2015-04-06 20:20:52 -04:00
Joey Hess
c83940393a emergency release 2015-04-06 17:13:20 -04:00
Joey Hess
0a89d55269 Fixes a bug in the last release that caused rsync and possibly other commands to hang at the end of a file transfer.
Stderr reader blocks waiting for all stderr, and so blocks the process ever
exiting.

I tried several ways to get around this, but no success yet. For now,
disable the stderr reader entirely.
2015-04-06 17:12:38 -04:00
Joey Hess
42e46a8701 avoid using --literal-pathspecs with git older than 1.8.1 which added it
Windows is still building with an older git.
2015-04-06 13:46:11 -04:00
Joey Hess
dd96043011 prep release 2015-04-06 12:50:22 -04:00
Joey Hess
9445556c97 rethought distributed fsck; instead add activity.log and expire command
This is much more space efficient!
2015-04-05 12:50:02 -04:00
Joey Hess
1d57f142f1 Merge branch 'concurrentprogress' 2015-04-04 15:01:00 -04:00
Joey Hess
20fb91a7ad WIP on making --quiet silence progress, and infra for concurrent progress bars 2015-04-03 16:48:30 -04:00
Joey Hess
bd110516c0 init: Improve fifo test to detect NFS systems that support fifos but not well enough for sshcaching.
ssh tries to hard link a fifo, and if not, complains:

muxserver_listen: link mux listener .git/annex/ssh/SHARD1@iabak.archiveteam.org.QK8zOCbtNebI7q54 => .git/annex/ssh/SHARD1@iabak.archiveteam.org: Operation not permitted
2015-04-03 14:57:10 -04:00
Joey Hess
7a44dacb74 version: Add --raw 2015-04-02 15:37:39 -04:00
Joey Hess
294991dacb Significantly sped up processing of large numbers of directories passed to a single git-annex command. (try 2)
New approach is to do it the expensive way for the first 100 paths
on the command line, but then assume the user doesn't care about order too
much and fall back to the cheap way that does not preserve order.
2015-04-02 01:44:32 -04:00
Joey Hess
f79502d377 Revert "Significantly sped up processing of large numbers of directories passed to a single git-annex command."
This reverts commit 705112903e.

Whoops, git ls-files does not always output in the input ordering.
That's why all this work is needed. Urk.
2015-04-02 01:24:37 -04:00
Joey Hess
8aa6b5f2a6 Fix truncation of parameters that could occur when using xargs git-annex.
This will only ever result in a few more git-ls-files being run than were run
before. (Only 1 more is really needed, but around 10 more are currently run
for a max length command line.)

So, no need to worry about the extra zombie, or lost laziness due to concat.
2015-04-02 01:20:07 -04:00
Joey Hess
705112903e Significantly sped up processing of large numbers of directories passed to a single git-annex command. 2015-04-02 00:19:49 -04:00
Joey Hess
656fc1c881 fsck: Added --distributed and --expire options, for distributed fsck. 2015-04-01 17:53:16 -04:00
Joey Hess
42bbed7ce5 import: --deduplicate and --cleanduplicates now output the keys corresponding to duplicated files they process. 2015-03-31 15:36:02 -04:00
Joey Hess
6b55974723 addurl --file: When used with a special remote that claims urls and checks their contents, don't override the user's provided filename with filenames that the special remote suggests. Also, don't allow adding the url if the special remote says it contains multiple files. 2015-03-31 15:20:29 -04:00
Joey Hess
f842888de3 test: Fix --list-tests
Seems list order matters, I don't know why, but have reported it on #tasty
2015-03-31 14:47:27 -04:00
Joey Hess
0a3f2757a7 Relax debian package dependencies to git >= 1:1.7.7.6 rather than needing >= 1:2.0.
Git.Merge needs >= 1.7.7.6 if built with such a version; rest of code all
probes git version at runtime.
2015-03-31 14:22:04 -04:00
Joey Hess
7ebd656eff remove changelog entry
This is confusing because I updated the affected tarballs using the version
number of the last release.
2015-03-31 13:30:39 -04:00
Joey Hess
9e25cbde20 importfeed: Avoid downloading a redundant item from a feed whose guid has been downloaded before, even when the url has changed.
To support this, always store itemid in metadata; before this was only done
when annex.genmetadata was set.
2015-03-31 13:30:13 -04:00
Joey Hess
f0195b2a43 Fix GETURLS in external special remote protocol to strip downloader prefix from logged url info before checking for the specified prefix.
This doesn't change what GETURLS returns, but only whether it matches
any prefix that the external special remote asked for.
2015-03-27 18:49:03 -04:00
Joey Hess
6b89692008 Fix make build target. Thanks, Justin Geibel. 2015-03-27 18:00:32 -04:00
Joey Hess
f35d0bf4b2 Prevent git-ls-files from double-expanding wildcards when an unexpanded wildcard is passed to a git-annex command like add or find.
Note that previously, `git annex find *.jpg` would find eg, foo/bar.jpg.
That was never intended or documented behavior, so I'm going to change it.
But this is potentially a behavior change if someone discovered that
behavior and relied on it despite it being accidental. Oh well.. can't make
an omlette w/o breaking some eggs.
2015-03-27 16:45:50 -04:00
Joey Hess
00b07d7155 Better fix for standalone tarball git-annex sync linker shim bug, that works for "git annex sync" as well as "git-annex sync". 2015-03-27 16:06:50 -04:00
Joey Hess
e473d59b92 prep release 2015-03-27 13:11:40 -04:00
Joey Hess
5be536e523 Fix bug introduced in the last release that broke git-annex sync when git-annex was installed from the standalone tarball.
This was introduced by commit 450ee53ab6

However, the same problem could affect other calls to programPath,
specifically some on the assistant. So, I fixed it at a deeper level.
2015-03-27 12:55:18 -04:00
Joey Hess
b8f0b7309f Work around curl bug when asked to download an empty url to a file.
In this situation, curl -o exits successfully without creating the output
file.

There was already a workaround for curl file:/// but I did not realize this
also affected regular url downloads.

To fix it, pre-create the destination file before starting curl.
Since we cannot always know the size of an url before trying to download
it, let's always do this.

Note that since curl is told -C -, we have to consider if this
makes curl try to do a ranged download, which might fail on some servers
where a regular download would have succeeded. My testing indicates
this isn't a problem; since the file is empty, curl seems to not try to
do a ranged download.

Original report: https://github.com/datalad/datalad/issues/79
Curl bug report: https://github.com/bagder/curl/issues/183
2015-03-27 10:22:36 -04:00
Joey Hess
2b7f3ee3f2 assistant: Committing a whole lot of files at once could overflow command-line length limits and cause the commit to fail. This only happened when using the assistant in an indirect mode repository. 2015-03-26 14:02:35 -04:00
Joey Hess
3af4691978 Improve error message when --in @date is used and there is no reflog for the git-annex branch. 2015-03-26 11:15:15 -04:00
Joey Hess
cd6b62f35e --auto is no longer a global option; only get, drop, and copy accept it.
Not a behavior change unless you were passing it to a command that ignored it.
2015-03-25 17:06:14 -04:00
Joey Hess
3cc7c03721 Man pages for individual commands now available, and can be opened using "git annex help <command>" 2015-03-23 17:50:03 -04:00
Joey Hess
c233f98564 migrate: --force will force migration of keys already using the destination backend. Useful in rare cases. 2015-03-23 12:11:16 -04:00
Joey Hess
798da6cf2e Added a post-update-annex hook, which is run after the git-annex branch is updated. Needed for git update-server-info.
See https://github.com/datalad/datalad/issues/1#issuecomment-84094406
2015-03-20 14:52:58 -04:00
Joey Hess
e6158130c6 checkpresentkey: New plumbing command to check if a key can be verified to be present on a remote. 2015-03-20 11:44:46 -04:00
Joey Hess
50ef4105e3 readpresentkey: New plumbing command for checking location log. 2015-03-20 11:22:27 -04:00
Joey Hess
86bdd5198f prep release 2015-03-17 13:03:31 -04:00
Joey Hess
707293ba7e remotedaemon: Fixed support for notifications of changes to gcrypt remotes, which was never tested and didn't quite work before. 2015-03-16 15:28:29 -04:00
Joey Hess
abfe3c09b2 registerurl: New plumbing command for mass-adding urls to keys. 2015-03-15 14:37:33 -04:00
Joey Hess
b24bb6b435 fromkey: Add stdin mode. 2015-03-15 14:07:43 -04:00
Joey Hess
fa180c1ba1 fromkey --force: Skip test that the key has its content in the annex. 2015-03-15 13:51:58 -04:00
Joey Hess
3439ea4bdc git-annex-shell: Improve error message when the specified repository doesn't exist or git config fails for some reason. 2015-03-05 21:45:42 -04:00
Joey Hess
504dda82a4 addurl: Added --raw option, which bypasses special handling of quvi, bittorrent etc urls. 2015-03-05 14:46:08 -04:00
Joey Hess
6045406deb Added SETURIPRESENT and SETURIMISSING to external special remote protocol
Useful for things like ipfs that don't use regular urls.

An external special remote can add a regular url to a key, and then
git-annex get will download it from the web. But for ipfs, we want to
instead tell git-annex that the uri uses OtherDownloader. Before this
change, the external special remote protocol lacked a way to do that.
2015-03-05 13:50:15 -04:00
Joey Hess
a6db10d565 sync: Fix committing when in a direct mode repo that has no HEAD ref.
Seen for example, a newly checked out git submodule. In this case,
.git/HEAD is a raw sha, rather than the usual reference to a ref.

Removed currentSha in passing, since it was a more roundabout way of
doing what headSha does, and headSha is more robust.
2015-03-04 15:25:35 -04:00
Joey Hess
9b93278e8a metadata: Fix encoding problem that led to mojibake when storing metadata strings that contained both unicode characters and a space (or '!') character.
The fix is to stop using w82s, which does not properly reconstitute unicode
strings. Instrad, use utf8 bytestring to get the [Word8] to base64. This
passes unicode through perfectly, including any invalid filesystem encoded
characters.

Note that toB64 / fromB64 are also used for creds and cipher
embedding. It would be unfortunate if this change broke those uses.

For cipher embedding, note that ciphers can contain arbitrary bytes (should
really be using ByteString.Char8 there). Testing indicated it's not safe to
use the new fromB64 there; I think that characters were incorrectly
combined.

For credpair embedding, the username or password could contain unicode.
Before, that unicode would fail to round-trip through the b64.
So, I guess this is not going to break any embedded creds that worked
before.

This bug may have affected some creds before, and if so,
this change will not fix old ones, but should fix new ones at least.
2015-03-04 12:54:30 -04:00
Joey Hess
e322826e33 Submodules are now supported by git-annex!
Seems to work, but still experimental until it's been tested more.

When repositories are on filesystems not supporting symlinks, the .git dir
symlink trick cannot be used. Since we're going to be in direct mode
anyway, the .git dir symlink is not strictly needed.

However, I have not fixed the code that creates new annex symlinks to
handle this case -- the committed symlinks will be wrong.

git annex sync happens to currently fail in a submodule using direct mode,
because there's no HEAD ref. That also needs to be dealt with to get
this fully working in crippled filesystems.

Leaving http://github.com/datalad/datalad/issues/44 open until these issues
are dealt with.
2015-03-02 16:43:44 -04:00
Joey Hess
450ee53ab6 When re-execing git-annex, use current program location, rather than ~/.config/git-annex/program, when possible.
Most of the time, there will be no discreprancy between programPath and
readProgramFile.

But, the programFile might have been written by an old version of git-annex
that is still installed, while a newer one is currently running. In this
case, we want to run the same one that's currently running.

This is especially important for things like the GIT_SSH=git-annex used for
ssh connection caching.

The only code that still uses readProgramFile directly is the upgrade code,
which needs to know where the standalone git-annex was installed, in order to
upgrade it.
2015-02-28 17:23:13 -04:00
Joey Hess
289881bdb8 sync: As well as the synced/git-annex push, attempt a git-annex:git-annex push, as long as the remote branch is an ancestor of the local branch, to better support bare git repos.
See my comment in the bug report for analysis; basically this is safe
because it's a non-forced push, so won't lose history. Even if it was a
forced push or somehow races, things will eventually become consistent and
no git-annex branch info will be lost.

(This used to be done, but it forgot to do it since version 4.20130909.)
2015-02-27 14:49:56 -04:00
Joey Hess
76cde095fe Linux standalone: Set LOCPATH=/dev/null to work around https://ghc.haskell.org/trac/ghc/ticket/7695
This prevents localization from working, but git-annex is not localized anyway.
2015-02-25 16:31:01 -04:00
Joey Hess
8a3e2b302a unannex: Refuse to unannex when repo is too new to have a HEAD
In this case there must be staged changes in the index (if there is
anything to unannex), and the unannex code path needs to run with a clean
index.
2015-02-25 13:59:23 -04:00
Joey Hess
fd2a543c7d Merge branch 'master' into database
Conflicts:
	debian/changelog
2015-02-22 14:12:42 -04:00
Joey Hess
7751a0584a typo 2015-02-19 14:43:21 -04:00
Joey Hess
8c915ccebc prep release 2015-02-19 14:16:19 -04:00
Joey Hess
3414229354 fsck: Multiple incremental fscks of different repos (some remote) can now be in progress at the same time in the same repo without it getting confused about which files have been checked for which remotes. 2015-02-17 17:08:11 -04:00
Joey Hess
bd6e41f8e6 Merge branch 'master' into database
Conflicts:
	debian/changelog
2015-02-17 16:15:00 -04:00
Joey Hess
88fbb13ee3 Linux standalone: Improved process names of linker shimmed programs. 2015-02-16 19:36:26 -04:00
Joey Hess
4e0a678a99 update 2015-02-16 17:08:58 -04:00
Joey Hess
b9544506f0 also assistant 2015-02-12 16:22:37 -04:00
Joey Hess
15107d2c5a propigate ssh-options everywhere ssh caching is used
* sync: Use the ssh-options git config when doing git pull and push.
* remotedaemon: Use the ssh-options git config.

Note that the rename env var means that if a new git-annex calls an old one
for git-annex ssh, or a new calls an old, nothing much will go wrong;
just ssh caching won't happen.
2015-02-12 16:14:53 -04:00
Joey Hess
5be7ba7ee5 The ssh-options git config is now used by gcrypt, rsync, and ddar special remotes that use ssh as a transport. 2015-02-12 15:44:10 -04:00
Joey Hess
f5b830e07c sync, assistant: Include repository name in head branch commit message.
Note that while the assistant detects changes made to remote names, I left
the commit message fixed rather than calculating it after every commit. It
doesn't seem worth the CPU to do the latter.
2015-02-11 13:34:05 -04:00
Joey Hess
f153079152 metadata: When setting metadata, do not recurse into directories by default, since that can be surprising behavior and difficult to recover from. The old behavior is available by using --force. 2015-02-10 16:06:53 -04:00
Joey Hess
4794ef083a fsck --from: If a download from a remote fails, propigate the failure. 2015-02-10 13:10:58 -04:00
Joey Hess
a787cead35 bittorrent: Fix mojibake introduced in parsing arai2c progress output.
hGetSomeString reads one byte at a time, so unicode bytes are not composed.
The problem comes when outputting that to the console with hPut; that
tried to apply the handle's encoding, and so we get mojibake.

Instead, use ByteStrings, and only convert it to a string for parsing, not
for display.

Note that there are a couple of other things that use hGetSomeString,
which I've left as-is for now.
2015-02-10 12:34:34 -04:00
Joey Hess
d3b61d69b1 addurl: Avoid crash if quvi is not installed, when git-annex was built with process-1.2
createProcess has been changed to throw an exception if the program is
not in path.
2015-02-10 11:59:59 -04:00
Joey Hess
7fce85adac Improve race recovery code when committing to git-annex branch. 2015-02-09 18:34:48 -04:00
Joey Hess
1316efdc6e assistant: Improve sanity check for control characters when pairing. 2015-02-09 16:34:57 -04:00
Joey Hess
bcf1b59c1b webapp: Fix reversion in opening webapp when starting it manually inside a repository. 2015-02-09 16:34:42 -04:00
Joey Hess
3e78b83875 Windows: Fix bug in dropping an annexed file, which caused a symlink to be staged that contained backslashes. 2015-02-09 15:37:26 -04:00
Joey Hess
27ad41b355 import: Avoid checksumming file twice when run in the default or --duplicate mode.
--deduplicate, --skip-duplicates, and --clean-duplicates still checksum the
file twice, the first time to determine if it's a duplicate. This cannot be
easily merged with the checksumming done to add the file, since the file
needs to be locked down before that second checksum is taken.
2015-02-08 14:43:42 -04:00
Joey Hess
8066a1c3cc The file matching options are now only accepted by commands that can actually use them. 2015-02-06 17:16:41 -04:00
Joey Hess
dfab5e6ff4 import: Support file matching options such as --exclude, --include, --smallerthan, --largerthan 2015-02-06 15:58:06 -04:00
Joey Hess
febb1c2082 groupwanted: New command to set the groupwanted preferred content expression. 2015-02-06 15:12:42 -04:00
Joey Hess
69a9c98e71 glacier: Detect when the glacier command in PATH is the wrong one, from boto, rather than from glacier-cli, and refuse to use it, since the boto program fails to fail when passed parameters it does not understand. 2015-02-06 14:39:27 -04:00
Joey Hess
9527414e67 prep release 2015-02-05 14:21:13 -04:00
Joey Hess
bf9058ac4f Windows: Fix S3 special remote; need to call withSocketsDo to support Windows. Thanks, Trent. 2015-02-05 14:00:30 -04:00
Joey Hess
c6b5f2f3c4 assistant: Fix local pairing when ssh pubkey comment contains spaces. 2015-02-04 14:05:27 -04:00
Joey Hess
8eb01bc894 Added MD5 and MD5E backends. 2015-02-04 13:47:54 -04:00
Joey Hess
95c1593098 Remove support for building without cryptohash.
This will prevent backporting to wheezy, but it's time to simplify the
code.
2015-02-04 13:41:26 -04:00
Joey Hess
b0575c621f implement annex.tune.branchhash1
I hope this doesn't impact speed much -- it does have to pull out a value
from Annex state every time it accesses the branch now.

The test case I dropped has never caught any problems that I can remember,
and would have been rather difficult to convert.
2015-01-28 17:17:26 -04:00
Joey Hess
009bd050c1 implement annex.tune.objecthashlower
Split out Annex.DirHashes which never really belonged in Locations.
2015-01-28 16:52:08 -04:00
Joey Hess
70736d2b41 Repository tuning parameters can now be passed when initializing a repository for the first time.
* init: Repository tuning parameters can now be passed when initializing a
  repository for the first time. For details, see
  http://git-annex.branchable.com/tuning/
* merge: Refuse to merge changes from a git-annex branch of a repo
  that has been tuned in incompatable ways.
2015-01-27 17:38:06 -04:00
Joey Hess
f50b6779f9 Fix default repository description created by git annex init, which got broken by the relative path changes in the last release. 2015-01-22 14:59:57 -04:00
Joey Hess
587f6a919b addurl: When a Content-Disposition header suggests a filename to use, addurl will consider using it, if it's reasonable and doesn't conflict with an existing file. (--file overrides this) 2015-01-22 14:52:52 -04:00
Joey Hess
4f657aa14e add getFileSize, which can get the real size of a large file on Windows
Avoid using fileSize which maxes out at just 2 gb on Windows.
Instead, use hFileSize, which doesn't have a bounded size.
Fixes support for files > 2 gb on Windows.

Note that the InodeCache code only needs to compare a file size,
so it doesn't matter it the file size wraps. So it has been
left as-is. This was necessary both to avoid invalidating existing inode
caches, and because the code passed FileStatus around and would have become
more expensive if it called getFileSize.

This commit was sponsored by Christian Dietrich.
2015-01-20 17:09:24 -04:00
Joey Hess
6035f94666 Windows: Fix running of the pre-commit-annex hook. 2015-01-20 14:48:16 -04:00
Joey Hess
23d2519be1 Fix wording of message displayed when unable to get a file that is available in untrusted repositories. 2015-01-16 13:29:54 -04:00
Joey Hess
a92737c8b9 Fix build failure when wget is not installed. 2015-01-15 15:42:15 -04:00
Joey Hess
1ce8367417 remotedaemon: Fix problem that could prevent ssh connections being made after two LOSTNET messages were received in a row
Perhaps due to two different network interfaces being brought down.

Since there is no reliable way to drain a Chan, I switched to STM TChan.
2015-01-15 15:37:53 -04:00
Joey Hess
4fcf65cda3 devblog 2015-01-13 18:36:17 -04:00
Joey Hess
534c29deae implemented old Richih wishlist about remote/uuid info
* info: Can now display info about a given uuid.
  * Added to remote/uuid info: Count of the number of keys present
    on the remote, and their size. This is rather expensive to calculate,
    so comes last and --fast will disable it.
  * Git remote info now includes the date of the last sync with the remote.
2015-01-13 18:13:14 -04:00
Joey Hess
4d7bc922a2 prep release 2015-01-13 12:10:33 -04:00
Joey Hess
676ef32547 Merge branch 'master' into relativepaths 2015-01-06 21:41:25 -04:00
Joey Hess
adefcf189a Bugfix: A file named HEAD in the work tree could confuse some git commands run by git-annex. 2015-01-06 21:41:21 -04:00
Joey Hess
858d776352 Merge branch 'master' into relativepaths
Conflicts:
	Locations.hs
	debian/changelog
2015-01-06 19:00:01 -04:00
Joey Hess
c0f2b992ed Generate shorter keys for WORM and URL, avoiding keys that are longer than used for SHA256, so as to not break on systems like Windows that have very small maximum path length limits. 2015-01-06 17:58:57 -04:00
Joey Hess
cd865c3b8f Switch to using relative paths to the git repository.
This allows the git repository to be moved while git-annex is running in
it, with fewer problems.

On Windows, this avoids some of the problems with the absurdly small
MAX_PATH of 260 bytes. In particular, git-annex repositories should
work in deeper/longer directory structures than before. See
http://git-annex.branchable.com/bugs/__34__git-annex:_direct:_1_failed__34___on_Windows/

There are several possible ways this change could break git-annex:

1. If it changes its working directory while it's running, that would
   be Bad News. Good news everyone! git-annex never does so. It would also
   break thread safety, so all such things were stomped out long ago.

2. parentDir "." -> "" which is not a valid path. I had to fix one
   instace of this, and I should probably wipe all calls to parentDir out
   of the git-annex code base; it was never a good idea.

3. Things like relPathDirToFile require absolute input paths,
   and code assumes that the git repo path is absolute and passes it to it
   as-is. In the case of relPathDirToFile, I converted it to not make
   this assumption.

Currently, the test suite has 16 failures.
2015-01-06 16:19:41 -04:00
Joey Hess
4d786ebe4a Check git version at runtime, rather than assuming it will be the same as the git version used at build time when running git-checkattr and git-branch remove.
It's ok to probe every time for git-branch remove because that's
run quite rarely. For git-checkattr, it's run only once, when
starting the --batch mode, and so again the overhead is pretty minimal.

This leaves 2 places where the build version is still used.
git merge might be interactive or fail if one skews, and --no-gpg-sign
might not be pased, or might be passed to a git that doesn't understand it
if the other skews. It seems a little expensive to check the git version
each time these are used.

This doesn't seem likely to cause many problems, at least compared with
check-attr hanging on skew.
2015-01-05 15:54:52 -04:00
Joey Hess
584eac78e6 sync: Fix an edge case where syncing in a bare repository would try to merge and so fail.
In the case where a remote of the bare repo has a fetch =  configuration,
refs/remotes/origin/master will exist, and so the merge code path tried to
run in the bare repo.
2015-01-05 13:40:49 -04:00
Joey Hess
5c77cef271 Android: Provide a version built with -fPIE -pie to support Android 5.0. 2015-01-05 12:29:20 -04:00
Joey Hess
5db31e2386 Fix build with process 1.2.1.0. 2015-01-04 13:07:57 -04:00
Joey Hess
73928c2274 Avoid re-checksumming when migrating from hash to hashE backend. Closes: #774494 2015-01-04 12:33:10 -04:00
Joey Hess
fd55563b02 unlock: Don't allow unlocking files that have never been committed to git before
Avoids an intractable problem that prevents the pre-commit hook from
telling if such a file is intended to be an annexed file or not.
2015-01-02 13:49:02 -04:00
Joey Hess
c678620963 touchups 2014-12-31 15:27:20 -04:00
Joey Hess
e0dbf380f1 prep release 2014-12-31 15:16:01 -04:00
Joey Hess
e013183280 OSX: Switched away from deprecated statfs64 interface.
Getting rid of build warning

warning: 'statfs64' is deprecated: first deprecated in OS X 10.6
[-Wdeprecated-declarations]

10.6 is much older than the oldest git-annex OSX port, so won't break
anything.
2014-12-31 12:20:27 -04:00
Joey Hess
a4cf80f460 Windows: Fix handling of views of filenames containing '%' 2014-12-30 17:48:04 -04:00
Joey Hess
23051899e6 Windows: Got the rsync special remote working.
More aggressive rsync params fixup for windows. Param may contain a url, or
a file path, so check if it looks like a local file path and if so, fix it
up.

On windows only, rsyncUrlIsPath will treat c:foo as a path, rather than as
a rsyncurl starting with a host "c".
2014-12-30 15:05:59 -04:00
Joey Hess
5b30ba63cd Windows: Fix local rsync filepath munging (fixes 26 test suite failures). 2014-12-30 13:57:49 -04:00
Joey Hess
6b3d0cb11a bittorrent: Fix locking problem when using addurl file://
Fixes:
/home/joey/tmp/xxx/.git/annex/misctmp/torrent18347: openFile: resource busy (file is locked)
2014-12-30 13:07:20 -04:00
Joey Hess
e9a5e4d6c6 Run shutdown cleanup actions even if there were failures processing the command.
Amoung other fixes, this means that addurl will stage added files even if
adding one of the urls fails.
2014-12-30 12:49:34 -04:00
Joey Hess
43dc7f678f setpresentkey: A new plumbing-level command. 2014-12-29 15:16:40 -04:00
Joey Hess
aba3e11776 sync: Now supports remote groups, the same way git remote update does. 2014-12-29 13:42:58 -04:00
Joey Hess
02f150b33d Work around statfs() overflow on some XFS systems.
statfs(".", 0xffa8ad50)                 = -1 EOVERFLOW (Value too large for defined data type)

Ref <20141222221621.GO7251@onerussian.com>
2014-12-23 11:52:23 -04:00
Joey Hess
8af447c01b vicfg: Avoid crashing on badly encoded config data. 2014-12-22 15:17:00 -04:00
Joey Hess
148c0c2048 prep Solstice release 2014-12-19 16:53:36 -04:00
Joey Hess
27fb7e514d Fix build with -f-S3. 2014-12-19 16:53:25 -04:00
Joey Hess
ef12386924 When possible, build with the haskell torrent library for parsing torrent files. 2014-12-18 14:26:10 -04:00
Joey Hess
a7690de016 Added bittorrent special remote
addurl behavior change: When downloading an url ending in .torrent,
it will download files from bittorrent, instead of the old behavior
of adding the torrent file to the repository.

Added Recommends on aria2 and bittornado | bittorrent.

This commit was sponsored by Asbjørn Sloth Tønnesen.
2014-12-16 23:22:46 -04:00
Joey Hess
c64ede23cd Use wget -q --show-progress for less verbose wget output, when built with wget 1.16. 2014-12-16 14:04:40 -04:00
Joey Hess
30bf112185 Urls can now be claimed by remotes. This will allow creating, for example, a external special remote that handles magnet: and *.torrent urls. 2014-12-08 19:15:07 -04:00
Joey Hess
8093008ef4 External special remote protocol now includes commands for setting and getting the urls associated with a key. 2014-12-08 13:32:46 -04:00
Joey Hess
5eb3ecee19 Webapp: When adding a new box.com remote, use the new style chunking. Thanks, Jon Ander Peñalba. 2014-12-05 13:43:07 -04:00
Joey Hess
15d1bd6c83 prep release 2014-12-03 15:17:09 -04:00
Joey Hess
911ba8d972 Merge branch 's3-aws' 2014-12-03 14:10:52 -04:00
Joey Hess
3aa0ead3f6 reorder 2014-12-03 13:38:20 -04:00
Joey Hess
e292310ba3 Windows: Install ssh and other bundled programs to Git/cmd, instead of Git/bin, since the latter is not in the default msysgit PATH. 2014-12-03 13:34:13 -04:00
Joey Hess
10b139956a Windows: ssh is no longer included in the git-annex bundle, since msysgit includes it. 2014-12-03 13:26:05 -04:00
Joey Hess
55fa1789dd Don't show "(gpg)" when decrypting the remote encryption cipher, since this could be taken to read that's the only time git-annex runs gpg, which is not the case. 2014-12-02 13:50:45 -04:00
Joey Hess
6ecd3ff421 diffdriver: New git-annex command, to make git external diff drivers work with annexed files.
Closes https://github.com/datalad/datalad/issues/18
2014-11-24 16:14:06 -04:00
Joey Hess
ffac19a29c Merge branch 'undo' 2014-11-14 14:55:35 -04:00
Joey Hess
2f83914212 Add undo action to nautilus and konqueror integration. 2014-11-14 14:55:21 -04:00
Joey Hess
13260ccc3a undo command
This commit was sponsored by Andrew Cant.
2014-11-14 14:41:07 -04:00
Joey Hess
31c2ece395 Windows: Remove Alt+A keyboard shortcut, which turns out to have scope outside the menus. 2014-11-14 13:56:05 -04:00
Joey Hess
372237991a clarification from author; lsof fixed a bug 2014-11-13 13:01:43 -04:00
Joey Hess
63fa5c0782 Work around apparent bug in lsof 4.88's -F output format. 2014-11-12 18:00:40 -04:00
Joey Hess
864086a956 proxy: for all your direct mode repository munging needs
This allows bypassing the direct mode guard in a safe way to do all sorts
of things including git revert, git mv, git checkout ...

This commit was sponsored by the WikiMedia Foundation.
2014-11-12 15:51:46 -04:00
Joey Hess
58d50f260a Debian package is now maintained by Gergely Nagy. 2014-11-11 17:11:16 -04:00
Joey Hess
adc5ca70a8 pre-commit: Block partial commit of unlocked annexed file, since that left a typechange staged in index
I had hoped that the git devs could change git's handling of partial
commits to not use a false index file, but seems not.

So, this relies on some git internals to detect that case. The test suite
has a test case added to catch it if changes to git break it.

This commit was sponsored by Paul Tagliamonte.
2014-11-10 15:36:24 -04:00
Joey Hess
748e403fed add changelog entires for when this branch gets merged 2014-11-06 14:38:51 -04:00
Joey Hess
36476aa005 prep release 2014-11-05 12:02:55 -04:00
Joey Hess
334f366979 Remove fixup code for bad bare repositories created by versions 5.20131118 through 5.20131127. That fixup code would accidentially fire when --git-dir was incorrectly pointed at the working tree of a git-annex repository, resulting in data loss. Closes: #768093 2014-11-04 18:04:19 -04:00
Joey Hess
0f6aaf8012 Windows: Fix crash when user.name is not set in git config. 2014-10-31 16:14:12 -04:00
Joey Hess
5bdcb23424 prep release 2014-10-24 13:03:50 -04:00
Joey Hess
25574bead1 enableremote: When the remote has creds, update the local creds cache file. Before, the old version of the creds could be left there, and would continue to be used. 2014-10-22 14:28:25 -04:00
Joey Hess
9280fe4cbe include creds location in info
This is intended to let the user easily tell if a remote's creds are
coming from info embedded in the repository, or instead from the
environment, or perhaps are locally stored in a creds file.

This commit was sponsored by Frédéric Schütz.
2014-10-21 15:09:40 -04:00
Joey Hess
aafaa363e3 info: When passed the name or uuid of a remote, displays info about that remote.
No per-remote-type info yet.

This commit was sponsored by Stanley Yamane.
2014-10-21 14:35:07 -04:00
Joey Hess
4a9e70c705 info: When run on a single annexed file, displays some info about the file, including its key and size. 2014-10-21 13:24:15 -04:00
Joey Hess
fced322834 glacier: Fix pipe setup when calling glacier-cli to retrieve an object. 2014-10-20 15:11:01 -04:00
Joey Hess
d3d2e51ddf update 2014-10-16 12:19:40 -04:00
Joey Hess
1e59df083d Use haskell setenv library to clean up several ugly workarounds for inability to manipulate the environment on windows.
Didn't know that this library existed!

This includes making git-annex not re-exec itself on start on windows, and
making the test suite on Windows run tests without forking.
2014-10-15 20:33:52 -04:00
Joey Hess
fe5e25eec7 initremote: Don't allow creating a special remote that has the same name as an existing git remote.
This is not a complete fix. For one, git remote will happily go add a
remote that has the same name as an existing special remote. For another,
enableremote will enable a special remote over top of an existing git
remote. And, also, the webapp might.
2014-10-15 15:47:49 -04:00
Joey Hess
cdcb4548b3 Remove hurd stuff from cabal file, since hackage currently rejects it.
https://github.com/haskell/hackage-server/issues/269
2014-10-15 13:31:20 -04:00
Joey Hess
db9121ecee vicfg: Deleting configurations now resets to the default, where before it has no effect.
Added a Default instance for TrustLevel, and was able to use that to clear
up several other parts of the code too.

This commit was sponsored by Stephan Schulz
2014-10-14 14:15:07 -04:00
Joey Hess
86a7bddb41 prep release 2014-10-13 10:13:27 -04:00
Joey Hess
c6e9125c61 repair: Prevent auto gc from happening when fetching from a remote. 2014-10-12 14:27:46 -04:00
Joey Hess
9af06670b5 map: Handle .git prefixed remote repos. Closes: #614759 2014-10-12 14:11:29 -04:00
Joey Hess
ef3804bdb3 S3: Fix embedcreds=yes handling for the Internet Archive.
Before, embedcreds=yes did not cause the creds to be stored in remote.log,
but also prevented them being locally cached.
2014-10-12 13:15:52 -04:00
Joey Hess
164f0d73ff Support building with yesod 1.4.
The new yesod needs the ViewPatterns extension.
Also, a TH splice in Assistant/Threads/WebApp.hs failed to work without
OverLoadedStrings.

This commit was sponsored by Brock Spratlen.
2014-10-09 17:01:54 -04:00
Joey Hess
1d5bde3be5 Adjust cabal file to support building w/o assistant on the hurd.
I used to have this and hackage rejected the os(gnu), so I am going to see
if the new hackage still rejects it.
2014-09-29 14:08:29 -04:00
Joey Hess
a001207aef prep release 2014-09-27 14:25:15 -04:00
Joey Hess
7de9b8ec06 Add temporary workaround for bug #763078 which broke building on armel and armhf. 2014-09-27 14:22:04 -04:00
Joey Hess
f518858c12 Really depend (not just build-depend) on new enough git for --no-gpg-sign to work. Closes: #763057 2014-09-27 12:15:22 -04:00
Joey Hess
5e3c41c7aa prep release 2014-09-26 15:09:13 -04:00
Joey Hess
adf69dc417 Work around failure to build on mips by using cabal, not Setup, to build in debian/rules. 2014-09-26 15:08:41 -04:00
Joey Hess
4058eeb252 Depend on new enough git for --no-gpg-sign to work. Closes: #762446 2014-09-22 13:50:16 -04:00
Joey Hess
264c65e8f8 prep release 2014-09-19 13:02:19 -04:00
Joey Hess
7faf2436f3 CVE id assigned 2014-09-19 01:38:51 -04:00
Joey Hess
0ed33c8b74 deal with old repositories with non-encrypted creds
See 2f3c3aa01f for backstory about how a repo
could be in this state.

When decryption fails, the repo must be using non-encrypted creds. Note
that creds are encrypted/decrypted using the encryption cipher which is
stored in the repo, so the decryption cannot fail due to missing gpg keys
etc. (For !shared encryptiom, the cipher is iteself encrypted using some
gpg key(s), and the decryption of the cipher happens earlier, so not
affected by this change.

Print a warning message for !shared repos, and continue on using the
cipher. Wrote a page explaining what users hit by this bug should do.

This commit was sponsored by Samuel Tardieu.
2014-09-18 17:58:03 -04:00