Merge branch 'master' into bloom

Conflicts:
	debian/changelog
This commit is contained in:
Joey Hess 2012-03-12 16:32:29 -04:00
commit 94aff8b878
6 changed files with 46 additions and 16 deletions

View file

@ -228,12 +228,19 @@ showSizeKeys d = total ++ missingnote
" keys of unknown size"
staleSize :: String -> (Git.Repo -> FilePath) -> Stat
staleSize label dirspec = do
keys <- lift (Command.Unused.staleKeys dirspec)
if null keys
then nostat
else stat label $ json (++ aside "clean up with git-annex unused") $
return $ showSizeKeys $ foldKeys keys
staleSize label dirspec = go =<< lift (Command.Unused.staleKeys dirspec)
where
go [] = nostat
go keys = onsize =<< sum <$> keysizes keys
onsize 0 = nostat
onsize size = stat label $
json (++ aside "clean up with git-annex unused") $
return $ roughSize storageUnits False size
keysizes keys = map (fromIntegral . fileSize) <$> stats keys
stats keys = do
dir <- lift $ fromRepo dirspec
liftIO $ forM keys $ \k ->
getFileStatus (dir </> keyFile k)
aside :: String -> String
aside s = " (" ++ s ++ ")"

1
debian/changelog vendored
View file

@ -7,6 +7,7 @@ git-annex (3.20120310) UNRELEASED; urgency=low
space, but now only needs to store the set of file contents that
are present in the annex in memory.
* status: Fixed to run in constant space.
* status: More accurate display of sizes of tmp and bad keys.
* unused: Now uses a bloom filter, and runs in constant space.
Use of a bloom filter does mean it will not notice a small
number of unused keys. For repos with up to half a million keys,

View file

@ -28,6 +28,8 @@ The git repository has some branches:
library.
* `tweak-fetch` adds support for the git tweak-fetch hook, which has
been proposed and implemented but not yet accepted into git.
* `bloom` makes `git annex unused` use a bloom filter, thus running
in truely constant memory. Waiting on the haskell library being packaged.
* `ghc7.0` supports versions of ghc older than 7.4, which
had a major change to filename encoding.
* `setup` contains configuration for this website

View file

@ -0,0 +1,2 @@
Any progress on Windows port? That would be very nice to have!
Depending on the scale of it, I might be able to help.

View file

@ -0,0 +1,9 @@
[[!comment format=mdwn
username="http://joey.kitenet.net/"
nickname="joey"
subject="comment 1"
date="2012-03-12T06:43:02Z"
content="""
[[todo/windows_support]] has everything I know about making a windows port. This badly needs someone who understand Windows to dive into it. The question of how to create a symbolic link (or the relevant Windows equivilant) from haskell on Windows
is a good starting point..
"""]]

View file

@ -13,21 +13,30 @@ With a little setup, git-annex can use Box as a
* Allow users to mount davfs filesystems, by ensuring that
`/sbin/mount.davfs` is setuid root. On Debian, just `sudo dpkg-reconfigure davfs2`
* Add yourself to the davfs2 group.
sudo adduser $(whoami) davfs2
sudo adduser $(whoami) davfs2
* Edit `/etc/fstab`, and add a line to mount Box using davfs.
sudo mkdir -p /media/box.com
echo "https://www.box.com/dav/ /media/box.com davfs noauto,user 0 0" | sudo tee -a /etc/fstab
sudo mkdir -p /media/box.com
echo "https://www.box.com/dav/ /media/box.com davfs noauto,user 0 0" | sudo tee -a /etc/fstab
* Create `~/.davfs2/davfs2.conf` with some important settings:
mkdir ~/.davfs2/
echo use_locks 0 >> ~/.davfs2/davfs2.conf
echo cache_size 1 >> ~/.davfs2/davfs2.conf
echo delay_upload 0 >> ~/.davfs2/davfs2.conf
mkdir ~/.davfs2/
echo use_locks 0 >> ~/.davfs2/davfs2.conf
echo cache_size 1 >> ~/.davfs2/davfs2.conf
echo delay_upload 0 >> ~/.davfs2/davfs2.conf
* Create `~/.davfs2/secrets`. This file contains your Box.com login and password.
Your login is probably the email address you signed up with.
echo "/media/box.com joey@kitenet.net mypassword" > ~/.davfs2/secrets
chmod 600 ~/.davfs2/secrets
echo "/media/box.com joey@kitenet.net mypassword" > ~/.davfs2/secrets
chmod 600 ~/.davfs2/secrets
* Now you should be able to mount Box, as a non-root user:
mount /media/box.com
mount /media/box.com
## git-annex setup