diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-12 16:32:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-12 16:32:29 -0400 |
commit | 94aff8b8786efb1d396fb20fd0d177fce6056a71 (patch) | |
tree | 7ee61a8a74d7ba128d16b1d1c0f0f2b09d56dbfe | |
parent | 8540183a02345843a7869521cd65abbe658b4e51 (diff) | |
parent | 77fb50e01a8c66f87fdd79c9c4235074a0f55fa7 (diff) |
Merge branch 'master' into bloom
Conflicts:
debian/changelog
-rw-r--r-- | Command/Status.hs | 19 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/download.mdwn | 2 | ||||
-rw-r--r-- | doc/forum/windows_port__63__.mdwn | 2 | ||||
-rw-r--r-- | doc/forum/windows_port__63__/comment_1_23fa9aa3b00940a1c1b3876c35eef019._comment | 9 | ||||
-rw-r--r-- | doc/tips/using_box.com_as_a_special_remote.mdwn | 29 |
6 files changed, 46 insertions, 16 deletions
diff --git a/Command/Status.hs b/Command/Status.hs index eadb4f163..39e71e750 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -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 ++ ")" diff --git a/debian/changelog b/debian/changelog index 8d7337116..fd5838683 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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, diff --git a/doc/download.mdwn b/doc/download.mdwn index 120e0a517..2727cc191 100644 --- a/doc/download.mdwn +++ b/doc/download.mdwn @@ -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 diff --git a/doc/forum/windows_port__63__.mdwn b/doc/forum/windows_port__63__.mdwn new file mode 100644 index 000000000..092b8f8e1 --- /dev/null +++ b/doc/forum/windows_port__63__.mdwn @@ -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. diff --git a/doc/forum/windows_port__63__/comment_1_23fa9aa3b00940a1c1b3876c35eef019._comment b/doc/forum/windows_port__63__/comment_1_23fa9aa3b00940a1c1b3876c35eef019._comment new file mode 100644 index 000000000..95323ff99 --- /dev/null +++ b/doc/forum/windows_port__63__/comment_1_23fa9aa3b00940a1c1b3876c35eef019._comment @@ -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.. +"""]] diff --git a/doc/tips/using_box.com_as_a_special_remote.mdwn b/doc/tips/using_box.com_as_a_special_remote.mdwn index f9e2fbba5..917c7a93b 100644 --- a/doc/tips/using_box.com_as_a_special_remote.mdwn +++ b/doc/tips/using_box.com_as_a_special_remote.mdwn @@ -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 |