Commit graph

656 commits

Author SHA1 Message Date
Joey Hess
6cecc26206 update build deps 2012-07-26 05:13:27 -04:00
Joey Hess
e6ce54de82 build fixes 2012-07-25 22:04:10 -04:00
Joey Hess
32d3cffc4c run yesod, and launch webapp on startup 2012-07-25 21:26:13 -04:00
Joey Hess
e4592649d6 Merge branch 'master' into assistant
Conflicts:
	git-annex.cabal
2012-07-22 12:50:54 -04:00
Joey Hess
b902a2960c releasing version 3.20120721 2012-07-21 17:01:19 -04:00
Joey Hess
107a7b9388 try to make Utility.Mounts portable
This is an unholy mashup, but it just might work. It works on Linux,
that's all I've tested. :)
2012-07-19 20:38:58 -04:00
Joey Hess
f20a40f9d4 MountWatcher thread
Currently only prints mount points when mounts happen.
2012-07-19 13:04:33 -04:00
Joey Hess
e2c86a4b58 extacted Mounts.hsc from hsshellscript
Converted from using c2hs to using hsc2hs, just because other code
in git-annex uses hsc2hs.

Various cleanups.

This code is LGPLed, so I had to include that licence.
2012-07-19 12:53:39 -04:00
Joey Hess
f5f8879471 map: Write map.dot to .git/annex, which avoids watch trying to annex it. 2012-07-17 12:27:06 -04:00
Joey Hess
5a753a7b8a SHAnE backends are now smarter about composite extensions, such as .tar.gz Closes: #680450 2012-07-05 16:24:02 -06:00
Joey Hess
40729e7fa2 Use SHA library for files less than 50 kb in size, at which point it's faster than forking the more optimised external program. 2012-07-04 13:04:01 -04:00
Joey Hess
1da79ea61f When shaNsum commands cannot be found, use the Haskell SHA library (already a dependency) to do the checksumming. This may be slower, but avoids portability problems.
Using Crypto's version of the hashes would be another option.
I need to benchmark it. The SHA2 library (which provides SHA1 also,
confusing name) may be the fastest option, but is not currently in Debian.
2012-07-04 09:11:36 -04:00
Joey Hess
760e028dca pass associatedfile and remoteuuid to git-annex-shell
This *almost* works.

Along the way, I noticed that the --uuid parameter was being accidentially
passed after the --, so that has never been actually used by
git-annex-shell to verify it's running in the expected repository. Oops. Fixed.
2012-07-02 10:57:51 -04:00
Joey Hess
7225c2bfc0 record transfer information on local git remotes
In order to record a semi-useful filename associated with the key,
this required plumbing the filename all the way through to the remotes'
storeKey and retrieveKeyFile.

Note that there is potential for deadlock here, narrowly avoided.
Suppose the repos are A and B. A sends file foo to B, and at the same
time, B gets file foo from A. So, A locks its upload transfer info file,
and then locks B's download transfer info file. At the same time,
B is taking the two locks in the opposite order. This is only not a
deadlock because the lock code does not wait, and aborts. So one of A or
B's transfers will be aborted and the other transfer will continue.
Whew!
2012-07-01 17:15:11 -04:00
Joey Hess
e5fd8b67b7 get, move, copy: Now refuse to do anything when the requested file transfer is already in progress by another process.
Note this is per-remote, so trying to get the same file from multiple
remotes can still let duplicate downloads run. (And uploading the same file
to multiple remotes is not duplicate at all of course.)

get, move, and copy are the only git-annex subcommands that transfer
files, but there's still git-annex-shell recvkey and sendkey to deal with too.

I considered modifying retrieveKeyFile or getViaTmp, but they are called
by other code that does not involve expensive file transfers (migrate)
or that does file transfers that should not be checked by this (fsck --from).
2012-07-01 17:15:11 -04:00
Joey Hess
61786c52ad releasing version 3.20120629 2012-06-29 14:03:03 -04:00
Joey Hess
048b64024a sync: Automatically resolves merge conflicts.
untested, but it compiles :)
2012-06-27 13:08:32 -04:00
Joey Hess
6f45827fe0 git-config fileEncoding
Accept arbitrarily encoded repository filepaths etc when reading git config
output. This fixes support for remotes with unusual characters in their
names.

For example, a remote with a url of /tmp/çüş was previously
skipped, because the filename wasn't encoded right so it didn't think it
was available. And when setting the annex-uuid of a remote named "çüş",
it used to add it under a mis-encoded form of the remote's name. Both these
cases now work ok in my testing.
2012-06-26 23:07:11 -04:00
Joey Hess
1093d82f6b Got rid of the last place that did utf8 decoding.
Probably fixes bugs/git-annex:_Cannot_decode_byte___39____92__xfc__39__/
although I don't know how to reproduce that bug.
2012-06-26 22:58:44 -04:00
Joey Hess
7e62e57f8c Avoid ugly failure mode when moving content from a local repository that is not available.
Prelude.undefined error message was introduced by
bb4f31a0ee.

It seems best to filter out local repositories that cannot be accessed
from the list of remotes, rather than keeping them in and making every
thing that uses the list have to deal with remotes that may have an unknown
location.

Besides fixing the error message, this also makes unavailable local
remotes' names not be shown in various messages, including in git annex
status output.

Also, move --to an unavailable local repository now avoids some ugly
errors like "changeWorkingDirectory: does not exist".
2012-06-26 17:22:44 -04:00
Joey Hess
41fcb3d852 Version build dependency on STM, and allow building without it, which disables the watch command. 2012-06-26 09:15:47 -04:00
Joey Hess
cede7bdcde cabal: Only try to use inotify on Linux. 2012-06-25 11:38:42 -04:00
Joey Hess
a0952dd0f9 releasing version 3.20120624 2012-06-24 12:51:18 -04:00
Joey Hess
c79e3b67e9 sync: Avoid recent git's interactive merge. 2012-06-23 10:22:56 -04:00
Joey Hess
7db83a1b0f demote lsof
not available on kfreebsd, and only used by watch
2012-06-21 00:28:56 -04:00
Joey Hess
88e26046d7 typo 2012-06-20 15:27:54 -04:00
Joey Hess
483b1b08c6 Merge branch 'master' into watch 2012-06-20 13:15:59 -04:00
Joey Hess
dfccee2616 unused: Fix crash when file names contain invalid utf8.
Was decoding the git-cat-file of the symlink target as utf8, but that can't
do, unix filenames are from the 70's and need this shiny disco
fileSystemEncoding.
2012-06-20 12:57:00 -04:00
Joey Hess
7a09d74319 lifted out the kqueue and inotify to a generic DirWatcher interface
Kqueue code for dispatching events is not tested and probably doesn't
build.
2012-06-18 23:49:07 -04:00
Joey Hess
66344a3613 Enable diskfree on kfreebsd, using statvfs.
Could not reproduce the build failure I had seen related to this,
but the numbers were wrong with statfs64. Probably pulling from the wrong
place in the structure. statvfs seems to work..
2012-06-17 18:10:57 -04:00
Joey Hess
91567ab8f6 make inotify a build flag etc 2012-06-17 17:15:56 -04:00
Joey Hess
7d6329e5e4 check lsof at runtime 2012-06-16 02:49:26 -04:00
Joey Hess
0052cec2b7 add lsof build deps
Check for it in configure; and add a --force option for people without it
who want to live dangerously.
2012-06-15 23:29:39 -04:00
Joey Hess
53d2e81ffd Merge branch 'master' into watch 2012-06-15 15:20:11 -04:00
Joey Hess
8492f1c182 releasing version 3.20120614 2012-06-14 20:32:06 -04:00
Joey Hess
ca9d94a0ad addurl: Was broken by a typo introduced 2 released ago, now fixed. Closes: #677576 2012-06-14 20:20:03 -04:00
Joey Hess
2e5ea30981 Merge branch 'master' into watch
Conflicts:
	debian/changelog
	git-annex.cabal
2012-06-12 13:37:17 -04:00
Joey Hess
0e944fd0e9 Install man page when run by cabal, in a location where man will find it, even when installing under $HOME. Thanks, Nathan Collins 2012-06-12 11:36:42 -04:00
Joey Hess
0847a300fc Revert "Build with ghc's threaded runtime, so threaded code does not busy-wait."
This reverts commit 129f6123fe.

Saw hang during batch add with -threaded, so deferred for now.
2012-06-11 12:46:35 -04:00
Joey Hess
129f6123fe Build with ghc's threaded runtime, so threaded code does not busy-wait.
Sort of a work around for http://bugs.debian.org/677096
2012-06-11 12:21:18 -04:00
Joey Hess
a5a3cd55ac Merge branch 'master' into watch
Conflicts:
	debian/changelog
2012-06-11 12:13:07 -04:00
Joey Hess
7f70767bfb uninit: Refuse to run in a subdirectory. Closes: #677076 2012-06-11 10:33:58 -04:00
Joey Hess
2de50f733a smart commit thread
The commit thread now has access to a channel containing the times of
all uncommitted changes. This lets it be smart about detecting busy times
when a batch job is running (such as rm -rf, or untarring something, etc),
and avoid committing until it's done. While at the same time, instantly
committing one-off changes that the user is going to expect to see
immediately.

I had to use STM to implement the channel, because of
http://hackage.haskell.org/trac/ghc/ticket/4154
While this adds a dependency, I always wanted to use STM, so this actually
makes me happy. ;)

Also happy that shouldCommit is a pure function, so other commit smartness
strategies can easily be played with. Although the current one seems pretty
good.

There is one bug, for some reason it does double commits, every time.
2012-06-10 16:07:48 -04:00
Joey Hess
727158ff55 Merge branch 'master' into watch 2012-06-07 13:48:55 -04:00
Joey Hess
4d1c114e4d initremote: Automatically describe a remote when creating it.
This ensures that all special remotes show up in git annex status.
Before, a special remote that was not manually described, and was not
a current git remote, did not show up there, although initremote did list
it.
2012-06-07 11:16:48 -04:00
Joey Hess
c56812980c document watch 2012-06-06 23:28:33 -04:00
Joey Hess
a7a729bce4 Merge branch 'master' into watch 2012-06-05 20:30:37 -04:00
Joey Hess
c981ccc077 add: Prevent (most) modifications from being made to a file while it is being added to the annex.
Anything that tries to open the file for write, or delete the file,
or replace it with something else, will not affect the add.

Only if a process has the file open for write before add starts
can it still change it while (or after) it's added to the annex.
(fsck will catch this later of course)
2012-06-05 20:28:34 -04:00
Joey Hess
78f5f90c24 Merge branch 'master' into watch 2012-06-05 14:53:38 -04:00
Joey Hess
8511957c68 releasing version 3.20120605 2012-06-05 14:14:45 -04:00