Commit graph

699 commits

Author SHA1 Message Date
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
b281584422 remove some more !! 2012-10-20 16:21:43 -04:00
Joey Hess
f7f34d2072 drop unwanted content in the transfer scan
This was complicated quite a bit by needing to check numcopies. I optimised
that, so it only looks up numcopies once per file, no matter how many
remotes it checks to drop from. Although it did just occur to me that
it might be better to first check if it wants to drop content, and only
then check numcopies..
2012-10-18 15:07:11 -04:00
Joey Hess
919fec85cd better fix for zombie problem, which turns out to be a zombie ssh started by rsync
When rsyncProgress pipes rsync's stdout, this turns out to cause a ssh
process started by rsync to be left behind as a zombie. I don't know why,
but my recent zombie reaping cleanup was correct, it's just that this other
zombie, that's not directly started by git-annex, was no longer reaped
due to changes in the cleanup. Make rsyncProgress reap the zombie started
by rsync, as a workaround.

FWIW, the process tree looks like this. It seems like the rsync child
is for some reason starting but not waiting on this extra ssh process.
Ssh connection caching may be involved -- disabling it seemed to change
the shape of the tree, but did not eliminate the zombie.

 9378 pts/14   S+     0:00  |           \_ rsync -p --progress --inplace -4 -e 'ssh' '-S' ...
 9379 pts/14   S+     0:00  |           |   \_ ssh ...
 9380 pts/14   S+     0:00  |           |   \_ rsync -p --progress --inplace -4 -e 'ssh' '-S' ...
 9381 pts/14   Z+     0:00  |           \_ [ssh] <defunct>
2012-10-17 00:47:52 -04:00
Joey Hess
51ef707a59 nub the autostart file
It's possible for the file to get duplicate lines in it, and if so, we want
to ignore the dups.
2012-10-14 15:19:34 -04:00
Joey Hess
4571ad9590 add help command 2012-10-13 19:07:56 -04:00
Joey Hess
9c3e1ca3c9 full analysis of ways content could stop being preferred and need to be dropped 2012-10-13 13:21:43 -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
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
80b3952930 webapp: display message about starting web browser
One reason to do this is that on OSX, it doesn't jump to the web browser
when opening a new page. Linux seems ahead in usability here... :P
2012-10-11 15:19:48 -04:00
Joey Hess
bbf2c31aa7 better message 2012-10-11 12:14:23 -04:00
Joey Hess
c0aec874a2 webapp: avoid infinite loop on start
If the autostart file lists a repository, for which a directory exists,
but there's not actually a valid git repo in there, the web app used to
try to use it, and see it wasn't valid, and then try to autostart again.

The ensuing runaway loop also ate memory, although not as fast as I was led
to belive was happening to someone on IRC yesterday. So that guy may have
had a different problem. But this seems otherwise a reasonable fit for the
circumstances described, if git-annex was started before something that
occurred during desktop login that made the repository available.
2012-10-11 12:08:11 -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
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
fee40dd374 generalized Annex.Wanted
this should make it easy to use from inside the assistant, where
everything is an AssociatedFile.
2012-10-08 17:14:01 -04:00
Joey Hess
1eedf495c3 make copy --to check preferred content of the remote 2012-10-08 16:06:56 -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
71fd18a97f wired preferred content up to get, copy, and drop --auto 2012-10-08 13:16:53 -04:00
Joey Hess
47314c0fad fix last zombies in the assistant
Made Git.LsFiles return cleanup actions, and everything waits on
processes now, except of course for Seek.
2012-10-04 19:56:32 -04:00
Joey Hess
de3ea4adb6 remove now-unnecessary manual reaps 2012-10-04 18:58:57 -04:00
Joey Hess
5594bf0643 more zombie fighting
I'm down to 9 places in the code that can produce unwaited for zombies.

Most of these are pretty innocuous, at least for now, are only
used in short-running commands, or commands that run a set of
actions and explicitly reap zombies after each one.

The one from Annex.Branch.files could be trouble later,
since both Command.Fsck and Command.Unused can trigger it,
and the assistant will be doing those eventally. Ditto the one in
Git.LsTree.lsTree, which Command.Unused uses.

The only ones currently affecting the assistant though, are
in Git.LsFiles. Several threads use several of those.

(And yeah, using pipes or ResourceT would be a less ad-hoc approach,
but I don't really feel like ripping my entire code base apart right
now to change a foundation monad. Maybe one of these days..)
2012-10-04 18:47:31 -04:00
Joey Hess
f67b54e5e3 make a pipeReadStrict, that properly waits on the process
Nearly everything that's reading from git is operating on a small
amount of output and has been switched to use that. Only pipeNullSplit
stuff continues using the lazy version that yields zombies.
2012-10-04 18:04:09 -04:00
Joey Hess
bc649a35ba added preferred-content log, and allow editing it with vicfg
This includes a full parser for the boolean expressions in the log,
that compiles them into Matchers. Those matchers are not used yet.

A complication is that matching against an expression should never
crash git-annex with an error. Instead, vicfg checks that the expressions
parse. If a bad expression (or an expression understood by some future
git-annex version) gets into the log, it'll be ignored.

Most of the code in Limit couldn't fail anyway, but I did have to make
limitCopies check its parameter first, and return an error if it's bad,
rather than erroring at runtime.
2012-10-04 16:00:19 -04:00
Joey Hess
b67525ce65 tweak 2012-10-03 23:29:37 -04:00
Joey Hess
b793b77d85 finished vicfg
One note: Deleted lines are not currently parsed as config changes.
That makes sense for trust settings. It may make sense to support deleted
lines as a way to clear group settings.
2012-10-03 19:37:39 -04:00
Joey Hess
dda953bcce wrote parser 2012-10-03 19:13:21 -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
717e008390 status: display repository groups 2012-10-02 13:45:30 -04:00
Joey Hess
5bd5bc094a simplify 2012-10-01 15:17:21 -04:00
Joey Hess
2a96b1aab3 group, ungroup: New commands to indicate groups of repositories. 2012-10-01 15:12:04 -04:00
Joey Hess
3da78cc241 make the standalone OSX app automatically install itself when run 2012-09-26 16:50:04 -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
995b04d36f only read/set the incremental timestamp file once 2012-09-25 15:45:17 -04:00
Joey Hess
ed93d662d3 use --more rather than --new to continue incremental fsck 2012-09-25 15:07:20 -04:00
Joey Hess
e855cffa1b basic incremental fsck now working 2012-09-25 15:06:33 -04:00
Joey Hess
6885b2deda add recordStartTime and getStartTime 2012-09-25 14:16:34 -04:00
Joey Hess
1233417698 move sticky bit code into Utility.FileMode
Simplified it using existing functions.

I doubt setSticky needs to return the FileMode; if it does for some
reason, it can be changed to use modifyFileMode'

Converted isSticky to a pure function for consistency with isSymlink.
Note that the sticky bit of a file can be tested thus:
  isSticky . fileMode <$> getFileStatus file
2012-09-25 13:33:13 -04:00
Joey Hess
39d60f3570 Justin's metadata code 2012-09-25 13:22:12 -04:00
Joey Hess
9e54a29546 add --incremental and --new options
Not yet used..
2012-09-25 13:19:05 -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
96b0e3d6e9 quiet calls to transferkey 2012-09-24 13:36:05 -04:00
Joey Hess
3887432c54 fixes for transfer resume
Fix resuming of downloads, which do not have a transfer info file to read.

When checking upload progress, use the MVar, rather than re-reading
the info file.

Catch exceptions in the transfer action. Required a tryAnnex.
2012-09-24 13:18:16 -04:00
Joey Hess
df07ccf404 make the assistant retry failed transfers
When a transfer fails, the progress info can be used to intelligently
retry it. If the transfer managed to make some progress, but did not
fully complete, then there's a good chance that a retry will finish it
(or at least make more progress).
2012-09-23 13:27:13 -04:00
Joey Hess
582316f66f avoid webapp crash on startup when there's no ~/.gitconfig
git config --list --global exits nonzero when there's no global config
2012-09-23 12:43:14 -04:00
Joey Hess
c048add74d hooked up git-annex-shell transferinfo
Finally done with progressbars!
2012-09-21 23:25:06 -04:00
Joey Hess
77af38ec6c git-annex-shell transferinfo command
TODO: Use this when running sendkey, to feed back transfer info from the
client side rsync.
2012-09-21 16:23:25 -04:00
Joey Hess
226781c047 unify types 2012-09-21 14:50:14 -04:00
Joey Hess
084aba8aaf fix breakage caught by test suite
Can't use show-ref --tags --branches, as that omits remote branches.
Instead, filter out the synced refs directly.
2012-09-21 00:49:48 -04:00
Joey Hess
0cb4382880 typo 2012-09-19 17:10:22 -04:00