Commit graph

3674 commits

Author SHA1 Message Date
Sergei Trofimovich
8428703d78 git-union-merge: add 'text' to dependencies
Fixes following build failure on ghc-7.4/Cabal-1.14:

    $ runhaskell Setup.hs build
    Building git-annex-3.20120227...
    Preprocessing executable 'git-union-merge' for git-annex-3.20120227...
    Git/Command.hs:11:18:
        Could not find module `Data.Text.Lazy.IO'
        It is a member of the hidden package `text-0.11.1.13'.
        Perhaps you need to add `text' to the build-depends in your .cabal file.
        Use -v to see a list of the files searched for.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-02-28 10:40:50 -04:00
Joey Hess
6d3fb5cba7 remove -fspec-constr-count workaround
not needed with ghc 7.4
2012-02-27 14:36:40 -04:00
Joey Hess
ed0f5cd2d3 add news item for git-annex 3.20120227 2012-02-27 13:07:09 -04:00
Joey Hess
8cae4115a8 releasing version 3.20120227 2012-02-27 13:07:04 -04:00
Joey Hess
2fd294d06f move --from, copy --from: 10 times faster scanning remote on local disk
Rather than go through the location log to see which files are present on
the remote, it simply looks at the disk contents directly.

I benchmarked this speeding up scanning 834 files, from an annex on my
phone's SSD, from 11.39 seconds to 1.31 seconds. (No files actually moved.)

Also benchmarked 8139 files, from an annex on spinning storage,
speeding up from 103.17 to 13.39 seconds.

Note that benchmarking with an encrypted annex on flash actually showed a
minor slowdown with this optimisation -- from 13.93 to 14.50 seconds. Seems
the overhead of doing the crypto needed to get the filenames to directly
check can be higher than the overhead of looking up data in the location
log. (Which says good things about how well the location log and git have
been optimised!) It *may* make sense to make encrypted local remotes not
have hasKeyCheap set; further benchmarking is called for.
2012-02-26 14:59:48 -04:00
Joey Hess
00d814aecc fix filename encoding for git cat-file
The filename sent to git cat-file needs to be sent on a File encoded handle.

Also set the read handle to use the File encoding, so that any error
message mentioning the filename is received properly.

The actual file content is read using Data.ByteString.Char8, which
will ignore the read handle's encoding, so this won't change that.
(Whether that is entirely correct remains to be seen.)
2012-02-26 14:11:50 -04:00
Joey Hess
b889581945 version dependency on openssh-client
This is only to ensure that it's as new a version as it was built with, so
partial upgrades work.
2012-02-25 19:31:46 -04:00
Joey Hess
12b89a3eb8 configure: Check if ssh connection caching is supported by the installed version of ssh and default annex.sshcaching accordingly. 2012-02-25 19:15:29 -04:00
Joey Hess
c3fbe07d7a do a cleanup commit after moving data from or to a git remote
Added Annex.cleanup, which is a general purpose interface for adding
actions to run at the end.

Remotes with the old git-annex-shell will commit every time, and have no
commit command, so hide stderr when running the commit command.
2012-02-25 18:02:49 -04:00
Joey Hess
a3c9d06a26 add git-annex-shell commit
Eventually, git-annex might try running this after making changes to
a remote. I have not yet thought of a good way for it to tell which
remotes it needs to run it on though. It can't just do it when
shutting down a cached ssh connection, because ssh connection caching
is optional, and that would not handle local remotes not accessed over ssh
either.
2012-02-25 16:47:28 -04:00
Joey Hess
1f73db3469 improve alwayscommit=false mode
Now changes are staged into the branch's index, but not committed,
which avoids growing a large journal. And sync and merge always
explicitly commit, ensuring that even when they do nothing else,
they commit the staged changes.

Added a flag file to indicate that the branch's journal contains
uncommitted changes. (Could use git ls-files, but don't want to run
that every time.)

In the future, this ability to have uncommitted changes staged in the
journal might be used on remotes after a series of oneshot commands.
2012-02-25 16:18:55 -04:00
Joey Hess
b49c0c2633 add annex.alwayscommit option
To avoid commits of data to the git-annex branch after each command
is run, set annex.alwayscommit=false. Its data will then be committed
less frequently, when a merge or sync is done.
2012-02-25 15:31:42 -04:00
http://adamspiers.myopenid.com/
638741f49e Added a comment: very nice 2012-02-25 15:02:18 +00:00
Joey Hess
2d5974685f Merge branch 'master' of ssh://git-annex.branchable.com 2012-02-25 10:53:29 -04:00
Joey Hess
df3a310b83 update copyright format url 2012-02-25 10:40:05 -04:00
http://www.joachim-breitner.de/
92236dbdaf Added a comment 2012-02-24 23:09:04 +00:00
Joey Hess
39f3e9e068 update 2012-02-24 17:53:21 -04:00
http://joey.kitenet.net/
0aa7f19c93 Added a comment 2012-02-24 20:52:51 +00:00
Joey Hess
21216becb4 Merge branch 'master' of ssh://git-annex.branchable.com 2012-02-24 16:35:33 -04:00
Joey Hess
bd66f962d3 Deal with NFS problem that caused a failure to remove a directory when removing content from the annex.
I was able to reproduce this on linux using the kernel's nfs server and
mounting localhost:/. Determined that removing the directory fails when
the just-deleted file in it was locked. Considered dropping the lock
before removing the directory, but this would complicate parts of the code
that should not need to worry about locking. So instead, ignore the failure
to remove the directory in this case.

While I was at it, made it attempt to remove both levels of hash
directories, in case they're empty.
2012-02-24 16:30:47 -04:00
http://www.joachim-breitner.de/
0b19f7c709 2012-02-24 20:28:20 +00:00
Joey Hess
c9b48520cc move misplaced bug report 2012-02-24 15:48:01 -04:00
Joey Hess
5aa7c7e83a Merge branch 'master' of ssh://git-annex.branchable.com 2012-02-24 15:46:39 -04:00
https://www.google.com/accounts/o8/id?id=AItOawkCoDbzG4_biL7Y9IvUiRsBH_GchCKAaW4
6dca07e255 2012-02-24 17:47:02 +00:00
Joey Hess
cac130b205 cleanup 2012-02-21 00:16:24 -04:00
Joey Hess
7e17151e69 revert hlint change
broke a test
2012-02-20 15:37:31 -04:00
Joey Hess
6c0155efb7 refactor 2012-02-20 15:22:21 -04:00
Joey Hess
ac5cff3668 quiet expected compiler warning 2012-02-20 11:08:50 -04:00
Joey Hess
ddb8edcf2b improve interface 2012-02-18 18:03:24 -04:00
Joey Hess
779ec91908 more robustness fixes 2012-02-18 12:08:02 -04:00
Joey Hess
abd50e01fb don't fail with --pathdepth when file already exists 2012-02-18 12:05:13 -04:00
Joey Hess
0cbbf0da79 warning 2012-02-18 11:54:47 -04:00
Joey Hess
00340dfe49 don't error out entirely if an url cannot be downloaded 2012-02-18 11:44:21 -04:00
Joey Hess
0fada43808 avoid unnecessary log changes when re-adding the same url 2012-02-17 23:58:56 -04:00
Joey Hess
5bf07b3b5c Store web special remote url info in a more efficient location.
storing it in remotes/web/xx/yy/foo.log meant lots of extra directory
objects in git. Now I use xx/yy/foo.log.web, which is just as unique, but
more efficient since foo.log is there anyway.

Of course, it still looks in the old location too.
2012-02-17 23:15:29 -04:00
Joey Hess
1ed5e4d9e3 variable name 2012-02-17 00:21:35 -04:00
Joey Hess
f3c75b601f reorg 2012-02-17 00:19:47 -04:00
Joey Hess
ba5515d422 reorder for clarity 2012-02-16 22:38:08 -04:00
Joey Hess
156a631f63 make Migrate use ReKey rather than the other way around
as ReKey is plumbing, this makes sense
2012-02-16 22:36:56 -04:00
Joey Hess
69a0161c3a fix filename limit when using --pathdepth 2012-02-16 19:37:02 -04:00
Joey Hess
990fcad978 order commands in usage by name 2012-02-16 16:53:44 -04:00
Joey Hess
db6b4cdfcf rekey: New plumbing level command, can be used to change the keys used for files en masse. 2012-02-16 16:36:35 -04:00
Joey Hess
aeaaa0ff87 reorder 2012-02-16 15:07:59 -04:00
Joey Hess
d05550e803 zero still bad 2012-02-16 14:28:54 -04:00
Joey Hess
346c934409 allow pathdepth to drop from the front or take from the end (negative) 2012-02-16 14:26:53 -04:00
Joey Hess
c2245260b1 improve usage 2012-02-16 12:37:30 -04:00
Joey Hess
39c3f56b33 addurl: Add --pathdepth option. 2012-02-16 12:25:19 -04:00
Joey Hess
a86d937b5b avoid too long filename when making up a filename for addurl too 2012-02-16 02:09:09 -04:00
Joey Hess
8f9b501515 handle really long urls
Using the whole url as a key can make the filename too long. Truncate
and use a md5sum for uniqueness if necessary.
2012-02-16 02:05:06 -04:00
Joey Hess
a1e52f0ce5 hlint 2012-02-16 00:44:51 -04:00