Commit graph

837 commits

Author SHA1 Message Date
Joey Hess
76ca972112 releasing version 3.20121127 2012-11-27 17:55:06 -04:00
Joey Hess
2525fefbb9 The standalone builds now unset their special path and library path variables before running the system web browser.
Should fix a crash reported on OSX.
2012-11-27 17:05:29 -04:00
Joey Hess
5ff666ec99 rsync: Fix bug introduced in last release that broke encrypted rsync special remotes. 2012-11-27 16:29:31 -04:00
Joey Hess
44a7387eba Fix dirContentsRecursive, which had missed some files in deeply nested subdirectories. Could affect various parts of git-annex. 2012-11-26 16:45:55 -04:00
Joey Hess
6d775b704b releasing version 3.20121126 2012-11-26 12:35:39 -04:00
Joey Hess
135dec91de reorder 2012-11-25 17:57:40 -04:00
Joey Hess
5f3661238d Display a warning when a non-existing file or directory is specified. 2012-11-25 17:54:08 -04:00
Joey Hess
463cf58140 webapp and assistant glacier support 2012-11-24 16:30:15 -04:00
Joey Hess
a5111a6d85 Amazon Glacier special remote; 100% working 2012-11-20 16:43:58 -04:00
Joey Hess
9221e62d87 Allow controlling whether login credentials for S3 and webdav are committed to the repository, by setting embedcreds=yes|no when running initremote. 2012-11-19 17:32:58 -04:00
Joey Hess
7b71685a93 Bugfix: directory special remote could loop forever storing a key when a too small chunksize was configured.
Ensure that each file has something written to it, even if the bytestring
chunk size is greater than the configured chunksize.

This means we may write a bit larger than the configured value, but only
when the configured value is very small; ie, < 8 kb.
2012-11-19 13:30:58 -04:00
Joey Hess
5f977cc725 directory special remote: Made more efficient and robust.
Files are now written to a tmp directory in the remote, and once all
chunks are written, etc, it's moved into the final place atomically.

For now, checkpresent still checks every single chunk of a file, because
the old method could leave partially transferred files with some chunks
present and others not.
2012-11-19 13:18:23 -04:00
Joey Hess
7df1e71fe3 S3: Added progress display for uploading and downloading. 2012-11-18 22:49:07 -04:00
Joey Hess
81379bb29c better streaming while encrypting/decrypting
Both the directory and webdav special remotes used to have to buffer
the whole file contents before it could be decrypted, as they read
from chunks. Now the chunks are streamed through gpg with no buffering.
2012-11-18 15:27:44 -04:00
Joey Hess
da40668038 blog for the day 2012-11-16 23:23:04 -04:00
Joey Hess
d3766803b4 OSX: Fix RunAtLoad value in plist file. 2012-11-15 01:01:54 -04:00
Joey Hess
d468e37f46 automatic repolist updating 2012-11-13 17:50:54 -04:00
Joey Hess
c9d58a6590 Fix build of assistant without yesod. 2012-11-13 15:36:34 -04:00
Joey Hess
75dbce69e6 Show error message to user when testing XMPP creds. 2012-11-13 13:21:09 -04:00
Joey Hess
4371d0b8c0 releasing version 3.20121112 2012-11-12 11:04:26 -04:00
Joey Hess
a1d58959e4 release notes for tomorrow's release 2012-11-12 01:23:42 -04:00
Joey Hess
2a88845c28 changelog 2012-11-10 14:04:43 -04:00
Joey Hess
9d18e9b916 changelog 2012-11-10 14:02:25 -04:00
Joey Hess
1178840032 Bugfix: Fix hang in webapp when setting up a ssh remote with an absolute path. 2012-11-05 12:35:11 -04:00
Joey Hess
0b8027e527 webapp: When setting up authorized_keys, use GIT_ANNEX_SHELL_DIRECTORY. 2012-11-05 12:35:05 -04:00
Joey Hess
bd230efa56 git-annex-shell: GIT_ANNEX_SHELL_DIRECTORY can be set to limit it to operating on a specified directory. 2012-11-05 11:29:12 -04:00
Joey Hess
33dbb19d99 webapp: Ensure that rsync special remotes are enabled using the same name they were originally created using.
It was creating a new special remote with a different name, unless
the stars perfectly aligned and the names matched.
2012-10-31 16:14:52 -04:00
Joey Hess
39e82b1af8 webapp: Generate better git remote names.
Wrote a better git remote name sanitizer. Git blows up on lots of weird
stuff, especially if it starts the remote name, but I managed to get
some common punctuation working.
2012-10-31 15:26:19 -04:00
Joey Hess
c03d9b2310 webapp: Fix renaming of special remotes.
Working around what seems to me to be a git bug. Surely there are valid
setups of real git remotes that don't have fetch set?
2012-10-31 14:39:05 -04:00
Joey Hess
7fe077ec24 webapp: Fix creation of rsync.net repositories. 2012-10-31 13:58:31 -04:00
Joey Hess
7fe1baf3f1 assistant: Fix syncing local drives.
Amoung other things, this makes it immediately sync files from a removable
drive when it's added.
2012-10-30 19:33:27 -04:00
Joey Hess
0cf152b88b webapp: Make an initial, empty commit so there is a master branch
Several things only happen when on a branch, so make sure we're on one.
2012-10-30 19:12:05 -04:00
Joey Hess
f89d6dd33e The standalone tarball's runshell now takes care of installing a ~/.ssh/git-annex-shell wrapper the first time it's run. 2012-10-29 14:40:28 -04:00
Joey Hess
9767562f65 rsync special remote: Include annex-rsync-options when running rsync to test a key's presence.
Also, use the new withQuietOutput function to avoid running the shell to
/dev/null stderr in two other places.
2012-10-28 13:51:14 -04:00
Joey Hess
6633a5158d update 2012-10-27 00:57:53 -04:00
Joey Hess
8e4620a6c7 NetWatcher: When dbus connection is lost, try to reconnect.
MountWatcher can't do this, because it uses the session dbus,
and won't have access to the new DBUS_SESSION_BUS_ADDRESS if a new session
is started.

Bumped dbus library version, FD leak in it is fixed.
2012-10-26 19:38:27 -04:00
Joey Hess
7ee0ffaeb9 Use USER and HOME environment when set, and only fall back to getpwent, which doesn't work with LDAP or NIS. 2012-10-25 18:17:54 -04:00
Joey Hess
b846a69451 Re-enable dbus, using a new version of the library that fixes the memory leak.
For now, when dbus goes away, the assistant keeps running but does not fall
back or reconnect. To do so needs more changes to the DBus library; in
particular a connectSessionWith and connectSystemWith to let me specify
my own clientThreadRunner.
2012-10-25 14:32:30 -04:00
Joey Hess
9cdbfa764e configure: Check that checksum programs produce correct checksums. + bitter rant
So, it might be called sha1sum, or on some other OS, it might be called
sha1. It might be hidden away off of PATH on that OS. That's just expected
insanity; UNIX has been this way since 1980's. And these days, nobody even
gives the flying flip about standards that we briefly did in the 90's
after the first round of unix wars.

But it's the 2010's now, and we've certainly learned something.
So, let's make it so sometimes sha1 is a crazy program that wants to run as
root so it can lock memory while prompting for a passphrase, and outputting
binary garbage. Yes, that'd be wise. Let's package that in major Linux
distros, too, so users can stumble over it.
2012-10-25 00:05:17 -04:00
Joey Hess
c6fbed48a1 bugfix: Don't fail transferring content from read-only repos. Closes: #691341
This used to work, but got broken when the transfer info files were added,
as it failed writing them on the readonly filesystem.
2012-10-24 10:59:25 -04:00
Joey Hess
8b1235b022 bup: Don't pass - to bup-split to make it read stdin
bup 0.25 does not accept that; and bup split reads from stdin by
default if no file is given. I'm not sure what version of bup changed this.

This only affected bup special remotes that were encrypted.
2012-10-23 16:01:02 -04:00
Joey Hess
95f17ed0de webapp: Switched to using the same multicast IP address that avahi uses. 2012-10-22 15:50:30 -04:00
Joey Hess
b05981d973 uninit: Check and abort if there are symlinks to annexed content that are not checked into git. 2012-10-22 11:54:50 -04:00
Joey Hess
12efabf070 webapp: Allow dashes in ssh key comments when pairing. 2012-10-22 11:18:19 -04:00
Joey Hess
1f1d75bc13 OSX: Stop installing non-self-contained webapp into Desktop directory.
This was a stopgap, and we have the self-contained webapp now.
2012-10-21 15:33:06 -04:00
Joey Hess
62f50b2052 file:/// URLs can now be used with the web special remote. 2012-10-21 01:28:10 -04:00
Joey Hess
c7c2015435 add ConfigMonitor thread
Monitors git-annex branch for changes, which are noticed by the Merger
thread whenever the branch ref is changed (either due to an incoming push,
or a local change), and refreshes cached config values for modified config
files.

Rate limited to run no more often than once per minute. This is important
because frequent git-annex branch changes happen when files are being
added, or transferred, etc.

A primary use case is that, when preferred content changes are made,
and get pushed to remotes, the remotes start honoring those settings.
Other use cases include propigating repository description and trust
changes to remotes, and learning when a remote has added a new special
remote, so the webapp can present the GUI to enable that special remote
locally.

Also added a uuid.log cache. All other config files already had caches.
2012-10-20 16:43:35 -04:00
Joey Hess
403bb5b93a update 2012-10-20 12:59:59 -04:00
Joey Hess
14b376d440 Merge branch 'safesemaphore'
Conflicts:
	debian/changelog
	git-annex.cabal
2012-10-20 12:44:25 -04:00
Joey Hess
40aab719df Replace "in=" with "present" in preferred content expressions
in= was problimatic in two ways. First, it referred to a remote by name,
but preferred content expressions can be evaluated elsewhere, where that
remote doesn't exist, or a different remote has the same name. This name
lookup code could error out at runtime. Secondly, in= seemed pretty useless.
in=here did not cause content to be gotten, but it did let present content
be dropped.

present is more useful, although "not present" is unstable and should be
avoided.
2012-10-19 16:09:21 -04:00
Joey Hess
e7780a39f5 Preferred content path matching bugfix.
When in a subdir, both the normal filepath, and the filepath relative to
the top of the git repo are needed for matching. The former for key lookup,
and the latter for include/exclude to match against. Previously, key lookup
didn't work in this situation.
2012-10-17 16:01:09 -04:00
Joey Hess
e6b1f36e1d Fix handling of GIT_DIR when it refers to a git submodule.
The old code was just wrong in taking fromPath of GIT_DIR -- that made an
localUnknown location with the GIT_DIR in it, which only worked by
accident, and failed in submodules.
2012-10-17 14:28:05 -04:00
Joey Hess
45201f78a7 releasing version 3.20121017 2012-10-16 21:24:33 -04:00
Joey Hess
9200a02af5 Fix zombie cleanup reversion introduced in 3.20121009. 2012-10-16 21:06:33 -04:00
Joey Hess
634b870240 releasing version 3.20121016 2012-10-16 16:47:59 -04:00
Joey Hess
d7c19ef307 Temporarily disable use of dbus, as the haskell dbus library blows up when losing connection, which will need to be fixed upstream. 2012-10-16 11:56:07 -04:00
Joey Hess
8fec62d299 A relative core.worktree is relative to the gitdir.
Now that this is handled correctly, git-annex can be used in git submodules.

Also, fixed infelicity where Git.CurrentRepo and Git.Config.updateLocation
were both dealing with core.worktree. Now updateLocation handles it for
Local as well as for LocalUnknown repos.
2012-10-16 00:08:39 -04:00
Joey Hess
9b6628bca9 changelog 2012-10-15 22:46:18 -04:00
Joey Hess
d430fb1153 Bug fix: A recent change caused git-annex-shell to crash. 2012-10-15 22:22:40 -04:00
Joey Hess
e52fc5ba89 vicfg: New file format, avoids ambiguity with repos that have the same description, or no description.
This is also nice in that uuids are all the same length, so the values
of each line, line up.

Also a great deal of boilerplate elimination.
2012-10-12 23:11:26 -04:00
Joey Hess
8c4d5130eb releasing version 3.20121010 2012-10-12 14:17:57 -04:00
Joey Hess
e290f1b903 Automatically detect when a ssh remote does not have git-annex-shell installed, and set annex-ignore.
Aka solve the github problem.

Note that it's possible the initial configlist will fail for some network
reason etc, and then the fetch succeeds. In this case, a usable remote gets
disabled. But it does print a message, and this only happens once per
remote, so that seems ok.
2012-10-12 13:45:14 -04:00
Joey Hess
e05c21cb73 Fix a crash when merging files in the git-annex branch that contain invalid utf8.
The crash actually occurred when writing out the file, which was done to a
handle that had not had fileSystemEncoding applied to it.
2012-10-12 12:19:30 -04:00
Joey Hess
589d1711f2 git config remote.name.annex-sync can be used to control whether a remote gets synced. 2012-10-11 18:39:21 -04:00
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
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
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
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
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
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
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
13e9b275dd initremote: Avoid recording remote's description before checking that its config is valid. 2012-07-27 21:05:27 -04:00
Joey Hess
b902a2960c releasing version 3.20120721 2012-07-21 17:01:19 -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
88e26046d7 typo 2012-06-20 15:27:54 -04:00