Commit graph

2616 commits

Author SHA1 Message Date
Joey Hess
2934a65ac5 add safeSystem
This is more safe than System.Cmd.Utils.safeSystem, since it does not throw
an error on nonzero exit status.
2011-11-09 17:28:35 -04:00
Joey Hess
8ce7e73f74 reorg to allow taking content lock
The lock will only persist during the perform stage, so the content must
be removed from the annex then, rather than in the cleanup stage.

(No lock is actually taken yet.)
2011-11-09 16:54:18 -04:00
Joey Hess
58563c5b1a warning about version of git-annex shipped in recent Ubuntu release 2011-11-09 14:37:14 -04:00
Joey Hess
a243d6e6e9 directly lock content? 2011-11-09 14:32:31 -04:00
Joey Hess
393b6b1bde problem that came to me at 2 am 2011-11-09 13:34:17 -04:00
Joey Hess
56b8194470 cleanup 2011-11-09 01:33:20 -04:00
Joey Hess
bf460a0a98 reorder repo parameters last
Many functions took the repo as their first parameter. Changing it
consistently to be the last parameter allows doing some useful things with
currying, that reduce boilerplate.

In particular, g <- gitRepo is almost never needed now, instead
use inRepo to run an IO action in the repo, and fromRepo to get
a value from the repo.

This also provides more opportunities to use monadic and applicative
combinators.
2011-11-08 16:27:20 -04:00
Joey Hess
2ff8915365 fix 2011-11-08 12:24:56 -04:00
Joey Hess
67c9f84a1f fix broken links 2011-11-08 12:23:03 -04:00
Joey Hess
d35cd6ff26 wiki updates 2011-11-08 12:16:02 -04:00
Joey Hess
05b7608113 update 2011-11-08 01:27:06 -04:00
Joey Hess
b11a63a860 clean up read/show abuse
Avoid ever using read to parse a non-haskell formatted input string.

show :: Key is arguably still show abuse, but displaying Keys as filenames
is just too useful to give up.
2011-11-08 00:17:54 -04:00
Joey Hess
fdf988be6d indent 2011-11-07 21:27:43 -04:00
Joey Hess
faa4935047 Handle a case where an annexed file is moved into a gitignored directory, by having fix --force add its change. 2011-11-07 18:10:31 -04:00
gernot
26d3c3b497 2011-11-07 20:55:54 +00:00
Joey Hess
3c263cc9ea fix 2011-11-07 16:34:12 -04:00
Joey Hess
64bc4e4751 refactor 2011-11-07 16:13:06 -04:00
Joey Hess
63a292324d add a UUID type
Should have done this a long time ago.
2011-11-07 15:59:16 -04:00
Joey Hess
b08f7c428b better usage 2011-11-07 14:00:23 -04:00
Joey Hess
97ba3a118d update 2011-11-07 13:29:00 -04:00
Joey Hess
95b9d726f8 update 2011-11-07 13:26:37 -04:00
Joey Hess
146995c4e1 update 2011-11-07 13:18:16 -04:00
Joey Hess
b7cd088433 add 2011-11-07 13:08:47 -04:00
Joey Hess
80787703c3 add news item for git-annex 3.20111107 2011-11-07 13:07:43 -04:00
Joey Hess
f8911cc69d releasing version 3.20111107 2011-11-07 13:06:58 -04:00
Joey Hess
41eecb4601 Bugfix: In the past two releases, git-annex init has written the uuid.log in the wrong format, with the UUID and description flipped.
This is my own damn fault for not making UUID a real type, and then relying
on the type checker to ensure my refactoring was correct -- which it wasn't!

I should probably add code to clean up bogus entries in the uuid.log, but
right now I want to get the fix out there to prevent people experiencing
this bug.

I should also make UUID a real data type.
2011-11-07 12:47:41 -04:00
Joey Hess
aae0417d94 Don't try to read config from repos with annex-ignore set. 2011-11-07 11:50:30 -04:00
Joey Hess
f229911715 optimization
The last commit added some git-log calls to a merge. This removes some,
by only merging branches that have unique refs.
2011-11-06 15:33:15 -04:00
Joey Hess
c99fb58909 merge: Use fast-forward merges when possible.
Thanks Valentin Haenel for a test case showing how non-fast-forward merges
could result in an ongoing pull/merge/push cycle.

While the git-annex branch is fast-forwarded, git-annex's index file is still
updated using the union merge strategy as before. There's no other way to
update the index that would be any faster.

It is possible that a union merge and a fast-forward result in different file
contents: Files should have the same lines, but a union merge may change
their order. If this happens, the next commit made to the git-annex branch
will have some unnecessary changes to line orders, but the consistency
of data should be preserved.

Note that when the journal contains changes, a fast-forward is never attempted,
which is fine, because committing those changes would be vanishingly unlikely
to leave the git-annex branch at a commit that already exists in one of
the remotes.

The real difficulty is handling the case where multiple remotes have all
changed. git-annex does find the best (ie, newest) one and fast forwards
to it. If the remotes are diverged, no fast-forward is done at all. It would
be possible to pick one, fast forward to it, and make a merge commit to
the rest, I see no benefit to adding that complexity.

Determining the best of N changed remotes requires N*2+1 calls to git-log, but
these are fast git-log calls, and N is typically small. Also, typically
some or all of the remote refs will be the same, and git-log is not called to
compare those. In the real world I expect this will almost always add only
1 git-log call to the merge process. (Which already makes N anyway.)
2011-11-06 15:22:40 -04:00
Joey Hess
bf07e2c921 typo 2011-11-06 13:53:11 -04:00
Joey Hess
cd267dea15 add news item for git-annex 3.20111105 2011-11-05 15:55:30 -04:00
Joey Hess
0556dc812e releasing version 3.20111105 2011-11-05 15:55:19 -04:00
Valentin_Haenel
526c20d068 add bug report 2011-11-05 16:31:18 +00:00
Joey Hess
0bb798e351 Pass -t to rsync to preserve timestamps. 2011-11-04 19:41:11 -04:00
Valentin_Haenel
502f86604f a recipe for setting up a bare remote 2011-11-04 23:19:13 +00:00
http://joey.kitenet.net/
dabb6a9f26 Added a comment: depends ... 2011-11-04 19:59:24 +00:00
Joey Hess
ef3457196a use SHA256 by default
To get old behavior, add a .gitattributes containing: * annex.backend=WORM

I feel that SHA256 is a better default for most people, as long as their
systems are fast enough that checksumming their files isn't a problem.
git-annex should default to preserving the integrity of data as well as git
does. Checksum backends also work better with editing files via
unlock/lock.

I considered just using SHA1, but since that hash is believed to be somewhat
near to being broken, and git-annex deals with large files which would be a
perfect exploit medium, I decided to go to a SHA-2 hash.

SHA512 is annoyingly long when displayed, and git-annex displays it in a
few places (and notably it is shown in ls -l), so I picked the shorter
hash. Considered SHA224 as it's even shorter, but feel it's a bit weird.

I expect git-annex will use SHA-3 at some point in the future, but
probably not soon!

Note that systems without a sha256sum (or sha256) program will fall back to
defaulting to SHA1.
2011-11-04 15:51:01 -04:00
Joey Hess
1089e85d48 add changelog for bugfix 2011-11-04 15:51:01 -04:00
Joey Hess
532ff19aa5 fix link 2011-11-04 15:51:01 -04:00
https://www.google.com/accounts/o8/id?id=AItOawmBUR4O9mofxVbpb8JV9mEbVfIYv670uJo
7df8052a4b 2011-11-03 23:53:51 +00:00
Joey Hess
5f3dd3d246 ensure directory exists when locking journal
Fixes git annex init in a bare repository that already has a git-annex
branch.
2011-11-02 15:09:19 -04:00
Joey Hess
c33313c50b tweak 2011-11-02 14:24:44 -04:00
Joey Hess
eec137f33a Record uuid when auto-initializing a remote so it shows in status. 2011-11-02 14:18:21 -04:00
Joey Hess
8e249ea0bd add tip for mode of operation somewhat like mercurial bigfiles extension 2011-11-02 13:32:19 -04:00
Joey Hess
e9286e7be7 point to new extension now in mercurial 2011-11-02 12:02:04 -04:00
Joey Hess
c643136e32 playing with >=>
Apparently in haskell if you teach a man to fish, he'll write
more pointfree code.
2011-10-31 23:39:55 -04:00
Joey Hess
3d2a9f8405 cleanup 2011-10-31 17:22:55 -04:00
Joey Hess
00988bcf36 fixed my build environment 2011-10-31 15:40:57 -04:00
Joey Hess
3d3e1c4c25 better command name 2011-10-31 15:18:41 -04:00
Joey Hess
09861cf4f7 cleanup 2011-10-31 15:12:02 -04:00