Commit graph

2739 commits

Author SHA1 Message Date
Joey Hess
cea65b9e5b init: When run in an already initalized repository, and without a description specified, don't delete the old description. 2011-11-12 15:42:52 -04:00
Joey Hess
e9bfa8eaed avoid unnecessary auto-merge when only changing a file in the branch.
Avoids doing auto-merging in commands that don't need fully current
information from the git-annex branch. In particular, git annex add no
longer needs to auto-merge. Affected commands: Anything that doesn't
look up data from the branch, but does write a change to it.

It might seem counterintuitive that we can change a value without first
making sure we have the current value. This optimisation works because
these two sequences are equivilant:

1. pull from remote
2. union merge
3. read file from branch
4. modify file and write to branch

vs.

1. read file from branch
2. modify file and write to branch
3. pull from remote
4. union merge

After either sequence, the git-annex branch contains the same logical content
for the modified file. (Possibly with lines in a different order or
additional old lines of course).
2011-11-12 15:15:57 -04:00
Joey Hess
897bf938f6 merge: Improve commit messages to mention what was merged. 2011-11-12 14:51:19 -04:00
Joey Hess
fe4ad93e4a add 2011-11-12 14:46:32 -04:00
Joey Hess
6e946b9a39 add 2011-11-12 14:24:14 -04:00
Joey Hess
30f1aeb13c golf 2011-11-12 14:24:07 -04:00
Joey Hess
15b92ad6a1 add news item for git-annex 3.20111111 2011-11-11 16:29:57 -04:00
Joey Hess
baa07971ff releasing version 3.20111111 2011-11-11 16:29:19 -04:00
Joey Hess
71b216d1fb map: Support remotes with /~/ and /~user/
More accurately, it was supported already when map uses git-annex-shell,
but not when it does not.

Note that the user name cannot be shell escaped using git-annex's current
approach for shell escaping. I tried and some shells like dash cannot
cd ~'joey'. Rest of directory is still shell escaped, not for security but
in case a directory has a space or other weird character.
2011-11-11 16:18:53 -04:00
Joey Hess
826d5887b2 Automatically fix up badly formatted uuid.log entries produced by 3.20111105, whenever the uuid.log is changed (ie, by init or describe). 2011-11-11 13:42:31 -04:00
Joey Hess
637b5feb45 lint 2011-11-11 01:52:58 -04:00
Joey Hess
b327227ba5 better limiting of start actions to only run whenAnnexed
Mostly only refactoring, but this does remove one redundant stat of the
symlink by copy.
2011-11-10 23:45:14 -04:00
Joey Hess
4389782628 tweak 2011-11-10 22:37:52 -04:00
Joey Hess
2de1e2c2ce Optimized copy --from and get --from to avoid checking the location log for files that are already present.
This can be a significant speedup when running in large trees that are
only missing a few files; it makes copy --from just as fast as get.
2011-11-10 21:32:42 -04:00
Joey Hess
49d2177d51 factored out some useful error catching methods 2011-11-10 20:57:28 -04:00
Joey Hess
a71c03bc51 add make fast target 2011-11-10 03:10:17 -04:00
Joey Hess
e4105df78a tested all known types of cycles, all are fixed
My testing involved widening the race by adding sleeps, and making sure
something sane happens in each case.
2011-11-10 03:06:08 -04:00
Joey Hess
9570421251 better message when content is locked 2011-11-10 02:59:13 -04:00
Joey Hess
a218ce41cf exclusive locks, ugh 2011-11-09 22:15:33 -04:00
Joey Hess
cf0174c922 content locking
I've tested that this solves the cyclic drop problem.
Have not looked at cyclic move, etc.
2011-11-09 21:54:42 -04:00
Joey Hess
737f043c55 fast build mode for vim 2011-11-09 21:36:11 -04:00
Joey Hess
992bf13382 lockContent in dropkey
This is needed for drop --from and move --from to check the lock,
as they do not use git-annex-shell inannex.
2011-11-09 19:47:04 -04:00
Joey Hess
d3e1a3619f safer inannex checking
git-annex-shell inannex now returns always 0, 1, or 100 (the last when
it's unclear if content is currently in the index due to it currently being
moved or dropped).

(Actual locking code still not yet written.)
2011-11-09 18:33:15 -04:00
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