Commit graph

843 commits

Author SHA1 Message Date
Joey Hess
5b9900133c allow disabling syncing to a repo on its edit form
This is not quite right yet, since it disables it so hard it doesn't show
up in the repo list anymore!
2012-10-11 17:14:42 -04:00
Joey Hess
4ef6dac5c2 webapp: Improve wording of intro display. Closes: #689848 2012-10-11 15:04:38 -04:00
Joey Hess
bf11d3d8ae Makefile: Avoid building with -threaded if the ghc threaded runtime does not exist.
This should fix build on mips, mipsel, s390, s390x, and sparc.

cabal doesn't test this yet.
2012-10-11 14:08:23 -04:00
Joey Hess
c755d036f4 test: Fix threaded runtime hang.
There was one forkProcess lurking in test.hs, and that seems to be
responsible for recent buildd failures on amd64 and armhf. I was able to
reproduce it pretty easily on amd64, and even once on i386, and it was
clearly that same bad old threaded runtime hang. So removing this
forkProcess should fix it. Odd that it lurked for some months before
popping up.
2012-10-11 13:45:15 -04:00
Joey Hess
97ea08e2d1 Avoid unsetting HOME when running certian git commands. Closes: #690193
Setting GIT_INDEX_FILE clobbers the rest of the environment, making git
not read ~/.gitconfig, and blow up if GECOS didn't have a name for the
user.

I'm not entirely happy with getEnvironment being run every time now,
that's somewhat expensive. It may make sense to just set GIT_COMMITTER_*
and GIT_AUTHOR_*, but I worry that clobbering the rest could break PATH,
or GIT_PATH, or something else that might be used by a command run in here.
And caching the environment is not a good idea either; it can change..
2012-10-11 12:58:24 -04:00
Joey Hess
bf72760af2 dead: Remove dead repository from all groups.
This is less expensive than having inallgroup weed out dead repositories.
2012-10-10 15:39:13 -04:00
Joey Hess
9da7dd8874 webapp: configure new repos to use the standard preferred content settings 2012-10-10 15:35:10 -04:00
Joey Hess
b6ce003843 rename --ingroup to --inallgroup 2012-10-10 12:59:45 -04:00
Joey Hess
558a69d34d releasing version 3.20121009 2012-10-09 15:43:36 -04:00
Joey Hess
a5781fd9ba webapp automatic grouping
webapp: Adds newly created repositories to one of these groups:
clients, drives, servers

This is heuristic, but it's a pretty good heuristic, and can always be
configured.
2012-10-09 14:24:17 -04:00
Joey Hess
5ac15149cc assistant: Now honors preferred content settings when deciding what to transfer.
Both when queueing downloads, and uploads, consults the preferred content
settings.

I didn't make it check yet when requeing failed transfers or queuing
deferred downloads; dealing with the preferred content settings (or indeed,
other settings) changing while the assistant is running still needs work.
2012-10-09 12:18:41 -04:00
Joey Hess
a3c9b16195 simplify changelog 2012-10-08 16:14:55 -04:00
Joey Hess
17543f6e80 drop --auto --from with preferred content
With --from, it needs to examine the preferred content of the repository
being dropped from, instead of the local repository.
2012-10-08 15:34:44 -04:00
Joey Hess
e375b931c0 add --ingroup limit 2012-10-08 15:18:58 -04:00
Joey Hess
7cd81bd978 Added --smallerthan and --largerthan limits 2012-10-08 13:39:18 -04:00
Joey Hess
71fd18a97f wired preferred content up to get, copy, and drop --auto 2012-10-08 13:16:53 -04:00
Joey Hess
18c9de5e14 Merge branch 'master' into safesemaphore
Conflicts:
	debian/changelog
2012-10-07 17:36:58 -04:00
Joey Hess
34e7faf71a uninit: Unset annex.version. Closes: #689852 2012-10-07 16:04:03 -04:00
Joey Hess
33a2af36f2 Depend on and use the Haskell SafeSemaphore library, which provides exception-safe versions of SampleVar and QSemN. Thanks, Ben Gamari for an excellent patch set. 2012-10-05 17:50:17 -04:00
Joey Hess
2b0423e13f Only build-depend on libghc-clientsession-dev on arches that will have the webapp. 2012-10-04 17:08:43 -04:00
Joey Hess
7a7f63182c vicfg: New command, allows editing (or simply viewing) most of the repository configuration settings stored in the git-annex branch.
Incomplete; I need to finish parsing and saving. This will also be used
for editing transfer control expresssions.

Removed the group display from the status output, I didn't really
like that format, and vicfg can be used to see as well as edit rempository
group membership.
2012-10-03 17:04:52 -04:00
Joey Hess
9aab70de66 always check with ls-files before adding new files
Makes it safe to use git annex unlock with the watcher/assistant.
And also to mix use of the watcher/assistant with regular files stored in git.

Long ago, I had avoided doing this check, except during the startup scan,
because it would be slow to run ls-files repeatedly.

But then I added the lsof check, and to make that fast, got it to detect
batch file adds. So let's move the ls-files check to also occur when it'll
have a batch, and can check them all with one call.

This does slow down adding a single file by just a bit, but really only
a little bit. (The lsof check is probably more expensive.) It also
speeds up the startup scan, especially when there are lots of new files
found by the scan.

Also, fixed the sleep for annex.delayadd to not run while the threadstate
lock is held, so it doesn't unnecessarily freeze everything else.

Also, --force no longer makes it skip the lsof check, which was not
documented, and seems never a good idea.
2012-10-02 17:41:23 -04:00
Joey Hess
eeaa8dada8 A way to match files in repositories in a group
--copies=group:number can now be used to match files that are present in a
specified number of repositories in a group.
2012-10-01 18:25:11 -04:00
Joey Hess
2a96b1aab3 group, ungroup: New commands to indicate groups of repositories. 2012-10-01 15:12:04 -04:00
Joey Hess
e0432bc140 releasing version 3.20121001 2012-10-01 14:12:31 -04:00
Joey Hess
0ea56761a9 typo 2012-10-01 13:50:45 -04:00
Joey Hess
e24ff46f96 move 2012-10-01 13:38:19 -04:00
Joey Hess
5849c3f24b Avoid building the webapp on Debian architectures that do not yet have template haskell and thus yesod. (Should be available for arm soonish I hope). 2012-09-29 01:28:02 -04:00
Joey Hess
67c04a443e reorg 2012-09-28 16:08:01 -04:00
Joey Hess
1117583087 The Makefile now builds with the new yesod by default.
Systems like Debian that have the old yesod 1.0.1 should set
GIT_ANNEX_LOCAL_FEATURES=-DWITH_OLD_YESOD
2012-09-28 15:59:06 -04:00
Joey Hess
087781fb05 Always do a system wide installation when DESTDIR is set. Closes: #689052 2012-09-28 15:48:00 -04:00
Joey Hess
4a6315fb6f demote libnss-mdns to suggests
At recommends it causes avahi-daemon to be pulled in on upgrade, which is
just too annoying to deal with avoiding on servers. MDNS is needed for
robust peering, but probably most desktop systems have it anyway; it's in
task-desktop.
2012-09-28 00:09:38 -04:00
Joey Hess
7f78bc92b6 webapp: Avoid crashing when ssh-keygen -F chokes on an invalid known_hosts file. 2012-09-27 11:27:16 -04:00
Joey Hess
17708dd173 add a configurator for S3 2012-09-26 14:44:07 -04:00
Joey Hess
e4bf74a965 store S3 creds in a 600 mode file inside the local git repo 2012-09-26 14:42:32 -04:00
Joey Hess
926ffaf3f3 Fix fallback to ~/Desktop when xdg-user-dir is not available. Closes: #688833
Really the fix here is to make Utility.Process only throw IOErrors,
which is what I naturally assumed it'd throw.
2012-09-25 22:48:17 -04:00
Joey Hess
84d431a679 rename option 2012-09-25 19:43:33 -04:00
Joey Hess
3e297e99a3 fsck: New --incremental-restart option which is nice for scheduling eg, monthly incremental fsck runs in cron jobs. 2012-09-25 19:37:34 -04:00
Joey Hess
f0e0d17440 New --time-limit option, makes long git-annex commands stop after a specified amount of time. 2012-09-25 16:48:24 -04:00
Joey Hess
ec65584c53 changelog 2012-09-25 15:10:35 -04:00
Joey Hess
bc83179a76 Test that uuid -m works, falling back to plain uuid if not. 2012-09-25 10:48:20 -04:00
Joey Hess
40df26757a copy: avoid updating location log when no copy is performed
git annex copy --to remote often does not need to copy a file,
but it was still updating the location log in this case.
2012-09-24 19:58:34 -04:00
Joey Hess
300a4ebade releasing version 3.20120924 2012-09-24 15:20:28 -04:00
Joey Hess
cb3c9340f8 license the webapp under the AGPL 3+
This means that anyone serving up the webapp to users as a service
(ie, without providing any git-annex binary at all to the user) still needs
to provide a link to the source code for it, including any modifications
they may make.

This may make git-annex be covered by the AGPL as a whole when it is built
with the webapp. If in doubt, you should ask a lawyer.

When git-annex is built with the webapp disabled, no AGPLed code is used.
Even building in the assistant does not pull in AGPLed code.
2012-09-24 14:48:47 -04:00
Joey Hess
2edf15b677 remove blaze-markup 2012-09-24 14:25:32 -04:00
Joey Hess
43d40c9c8b lintian fixes 2012-09-24 14:25:21 -04:00
Joey Hess
d77ff5dadd changelog and minor cleanup to fix mixed spaces/tabs 2012-09-23 15:42:05 -04:00
Joey Hess
ee8789e9d7 changelog updates 2012-09-21 21:37:31 -04:00
Joey Hess
601ee470af sync: Pushes the git-annex branch to remote/synced/git-annex, rather than directly to remote/git-annex.
This fixes a problem I was seeing in the assistant where two remotes would
attempt to sync with one another at the same time, and both failed pushing
the diverged git-annex branch. Then when both tried to resolve the failed
push, they each modified their git-annex branch, which again each blocked
the other from pushing into it. The result was that the git-annex
branches were perpetually diverged (despite having the same content!) and
once the assistant fell into this trap, it couldn't get out and always
had to do the slow push/fail/pull/merge/push/fail cycle.
2012-09-16 17:54:12 -04:00
Joey Hess
0b12db64d8 Avoid crashing on encoding errors in filenames when writing transfer info files and reading from checksum commands. 2012-09-16 01:53:06 -04:00
Joey Hess
48fd1e629c reinject: When the provided file doesn't match, leave it where it is, rather than moving to .git/annex/bad/ 2012-09-16 01:17:48 -04:00
Joey Hess
da63b7e96c Support repositories created with --separate-git-dir. Closes: #684405 2012-09-15 22:40:04 -04:00
Joey Hess
7f45baee5e migrate: Check content before generating the new key, to avoid generating a key for corrupt data. 2012-09-14 00:18:18 -04:00
Joey Hess
5573911d25 Disable ssh connection caching if the path to the control socket would be too long (and use relative path to minimise path to the control socket). 2012-09-13 19:26:39 -04:00
Joey Hess
3724344461 SHA256E is new default backend
The default backend used when adding files to the annex is changed from
SHA256 to SHA256E, to simplify interoperability with OSX, media players,
and various programs that needlessly look at symlink targets.

To get old behavior, add a .gitattributes containing: * annex.backend=SHA256
2012-09-12 13:22:16 -04:00
Joey Hess
6b36c18f2d update deps 2012-09-11 20:26:44 -04:00
Joey Hess
24bfabe263 add build dep on network-info 2012-09-07 19:44:20 -04:00
Joey Hess
a8e05c8da1 add network-multicast to bulld depends 2012-09-07 14:54:00 -04:00
Joey Hess
d9d16622b9 test: Set a lot of git environment variables so testing works in strange environments that normally need git config to set names, etc. Closes: #682351 Thanks, gregor herrmann 2012-09-06 15:06:48 -04:00
Joey Hess
b12db9ef92 Merge branch 'master' into assistant
Conflicts:
	debian/changelog

Updated changelog for assistant and webapp
2012-08-27 13:31:54 -04:00
Joey Hess
0ef7028077 releasing version 3.20120825 2012-08-25 10:27:59 -04:00
Joey Hess
b985e0b7ec Bugfix: Fix fsck in SHA*E backends, when the key contains composite extensions, as added in 3.20120721. 2012-08-24 12:17:21 -04:00
Joey Hess
1f83dafc7e Bugfix: Fix fsck in SHA*E backends, when the key contains composite extensions, as added in 3.20120721. 2012-08-24 12:16:17 -04:00
Joey Hess
68f1be8f0a Merge branch 'master' into assistant
Conflicts:
	Makefile
	debian/copyright
2012-08-20 16:04:56 -04:00
Joey Hess
c94b21ffd5 add svg versions of the git-annex logo, in color and black and white
This is a simple application of inkscape's rather amazing tracing
capabilities.
2012-08-19 21:18:21 -04:00
Joey Hess
dcd208513d Merge branch 'master' into assistant
Conflicts:
	debian/changelog
2012-08-17 08:22:43 -07:00
Joey Hess
fe8fee235b Pass --use-agent to gpg when in no tty mode. Thanks, Eskild Hustvedt. 2012-08-17 08:22:11 -07:00
Joey Hess
cbca93cf7c Merge branch 'master' into assistant
Conflicts:
	debian/changelog
2012-08-16 16:36:32 -07:00
Joey Hess
2e1f3a86ae Merge branch 'master' into assistant
Conflicts:
	debian/changelog
2012-08-09 14:03:40 -04:00
Joey Hess
ad4e152fd6 S3: Add fileprefix setting. 2012-08-09 13:54:54 -04:00
Joey Hess
d99abc1255 releasing version 3.20120807 2012-08-07 13:49:58 -04:00
Joey Hess
7e2d07484f Merge branch 'master' into assistant 2012-08-07 13:31:43 -04:00
Joey Hess
2a9077f4e9 fix transfer log cleanup crash
Avoid crashing when "git annex get" fails to download from one location,
and falls back to downloading from a second location.

The problem is that git annex get calls download recursively from within
itself if the first download attempt fails. So the first time through, it
writes a transfer info file, which is then overwritten on the second,
recursive call. Then on cleanup, it tries to delete the file twice, which
of course doesn't work.

Fixed both by not crashing if the transfer file is removed, and by
changing Get to not run download recursively like that. It's the only
thing that did so, and it just seems like a bad idea.
2012-08-07 13:30:08 -04:00
Joey Hess
0833eb43a6 Merge remote-tracking branch 'origin/master' into assistant
Conflicts:
	Init.hs
2012-08-05 15:06:44 -04:00
Joey Hess
b885c0c6c8 unused, status: Avoid crashing when ran in bare repo. 2012-08-05 15:01:26 -04:00
Joey Hess
0ca85a9428 Revert "init: If no description is provided for a new repository, one will automatically be generated, like "joey@gnu:~/foo""
This reverts commit abde98cda2.

Temporarily dropping from master, since this actually uses stuff
that's only currently availble in the assistant branch. Will come back when
I merge that, and can wait..
2012-08-03 23:51:49 -04:00
Joey Hess
b618bd8b8e Merge branch 'master' into assistant 2012-08-03 10:45:22 -04:00
Joey Hess
abde98cda2 init: If no description is provided for a new repository, one will automatically be generated, like "joey@gnu:~/foo" 2012-08-03 10:45:18 -04:00
Joey Hess
0a66947e3b Merge branch 'master' into assistant 2012-07-27 21:05:34 -04:00
Joey Hess
13e9b275dd initremote: Avoid recording remote's description before checking that its config is valid. 2012-07-27 21:05:27 -04:00
Joey Hess
bc5b151617 update to newer version of Bootstrap
This does fix some UI issues I was having.
2012-07-27 14:45:19 -04:00
Joey Hess
3305e019db add yesod-default
another dependency cabal works without here, oddly
2012-07-27 12:09:34 -04:00
Joey Hess
7e3c1e008d webapp now uses twitter bootstrap
mocked up the main screen, and am actually pretty happy with it!
2012-07-27 04:48:50 -04:00
Joey Hess
d92f5ff44c add bootstrap 2012-07-27 01:36:01 -04:00
Joey Hess
1f47c1f6d8 update 2012-07-27 00:35:09 -04:00
Joey Hess
1983ca2852 added jquery to static site
Had to switch to toWaiAppPlain to avoid a seeming bug in toWaiApp;
chromium only received a partial copy of jquery. Always the same length
each time, which makes me think it's a bug in the compression, although
a bug in the autohead middleware is also a possibility.

Anyway, there's little need for compression for a local webapp. Not wasting
time compressing things is probably a net gain.

Similarly, I've not worried about minifying this yet. Although that would
avoid bloating the git-annex binary quite so much.
2012-07-26 23:55:51 -04:00
Joey Hess
df00c6166c update deps
Note that here I don't need blaze-markup for cabal to succeed, but Jimmy
reports he does. Seems like Text.Blaze.Renderer.String moved from blaze to
blaze-markup in some version.
2012-07-26 13:13:23 -04:00
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
Joey Hess
13118136c0 Preserve parent environment when running hooks of the hook special remote. 2012-06-04 21:52:36 -04:00
Joey Hess
59ce18d757 add hinotify dependencies 2012-06-04 13:34:22 -04:00
Joey Hess
2183fd2abd Require that the SHA256 backend can be used when building, since it's the default. 2012-05-31 23:15:40 -04:00
Joey Hess
6fd83851c1 Fix display of warning message when encountering a file that uses an unsupported backend. 2012-05-31 21:03:24 -04:00
Joey Hess
3a10095d40 import: New subcommand, pulls files from a directory outside the annex and adds them
Use case for this was developed somewhere on the Transiberian Railroad.
2012-05-31 19:47:18 -04:00
Joey Hess
65977a5584 lock: Reset unlocked file to index, rather than to branch head.
Resetting an unlocked file to the branch head failed if it had just been
added, not committed, and unlocked, since the branch didbn't have it.

The code was concerned about dropping any changes that might be staged in the
index, but I cannot see why.
2012-05-30 17:01:22 -04:00
Joey Hess
6e213d04f1 sync: Show a nicer message if a user tries to sync to a special remote. 2012-05-27 20:55:56 -04:00
Joey Hess
ab07762ddb releasing version 3.20120522 2012-05-22 11:27:22 -04:00
Joey Hess
eb6cb1b87f Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR.
The environment needs to override git-config. Changed when git config is
read, and avoid rereading it once it's been read.

chdir for both worktree settings.
2012-05-18 18:20:53 -04:00
Joey Hess
bb4f31a0ee Clean up handling of git directory and git worktree.
Baked into the code was an assumption that a repository's git directory
could be determined by adding ".git" to its work tree (or nothing for bare
repos). That fails when core.worktree, or GIT_DIR and GIT_WORK_TREE are
used to separate the two.

This was attacked at the type level, by storing the gitdir and worktree
separately, so Nothing for the worktree means a bare repo.

A complication arose because we don't learn where a repository is bare
until its configuration is read. So another Location type handles
repositories that have not had their config read yet. I am not entirely
happy with this being a Location type, rather than representing them
entirely separate from the Git type. The new code is not worse than the
old, but better types could enforce more safety.

Added support for core.worktree. Overriding it with -c isn't supported
because it's not really clear what to do if a git repo's config is read, is
not bare, and is then overridden to bare. What is the right git directory
in this case? I will worry about this if/when someone has a use case for
overriding core.worktree with -c. (See Git.Config.updateLocation)

Also removed and renamed some functions like gitDir and workTree that
misused git's terminology.

One minor regression is known: git annex add in a bare repository does not
print a nice error message, but runs git ls-files in a way that fails
earlier with a less nice error message. This is because before --work-tree
was always passed to git commands, even in a bare repo, while now it's not.
2012-05-18 17:03:12 -04:00
Joey Hess
e36808e167 Pass -a to cp even when it supports --reflink=auto, to preserve permissions.
Amoung other things, this makes unlocking a WORM backed file and then
re-adding it without making any changes not add a new object, as the
timestamp is preserved.
2012-05-15 14:18:51 -04:00
Joey Hess
61a5df33d4 releasing version 3.20120511 2012-05-11 12:37:26 -04:00
Joey Hess
32a41f8af1 add a favicon 2012-05-10 14:18:35 -04:00