Merge branch 'master' into cabal-man-pages
This commit is contained in:
commit
fd40af6e62
7 changed files with 77 additions and 16 deletions
|
@ -23,9 +23,13 @@ def = [addCheck check $ command "uninit" paramPaths seek
|
||||||
|
|
||||||
check :: Annex ()
|
check :: Annex ()
|
||||||
check = do
|
check = do
|
||||||
b <- current_branch
|
b <- current_branch
|
||||||
when (b == Annex.Branch.name) $ error $
|
when (b == Annex.Branch.name) $ error $
|
||||||
"cannot uninit when the " ++ show b ++ " branch is checked out"
|
"cannot uninit when the " ++ show b ++ " branch is checked out"
|
||||||
|
top <- fromRepo Git.repoPath
|
||||||
|
cwd <- liftIO getCurrentDirectory
|
||||||
|
whenM ((/=) <$> liftIO (absPath top) <*> liftIO (absPath cwd)) $ error $
|
||||||
|
"can only run uninit from the top of the git repository"
|
||||||
where
|
where
|
||||||
current_branch = Git.Ref . Prelude.head . lines <$> revhead
|
current_branch = Git.Ref . Prelude.head . lines <$> revhead
|
||||||
revhead = inRepo $ Git.Command.pipeRead
|
revhead = inRepo $ Git.Command.pipeRead
|
||||||
|
|
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -1,10 +1,11 @@
|
||||||
git-annex (3.20120606) UNRELEASED; urgency=low
|
git-annex (3.20120611) unstable; urgency=medium
|
||||||
|
|
||||||
* add: Prevent (most) modifications from being made to a file while it
|
* add: Prevent (most) modifications from being made to a file while it
|
||||||
is being added to the annex.
|
is being added to the annex.
|
||||||
* initremote: Automatically describe a remote when creating it.
|
* initremote: Automatically describe a remote when creating it.
|
||||||
|
* uninit: Refuse to run in a subdirectory. Closes: #677076
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Tue, 05 Jun 2012 20:25:51 -0400
|
-- Joey Hess <joeyh@debian.org> Mon, 11 Jun 2012 10:32:01 -0400
|
||||||
|
|
||||||
git-annex (3.20120605) unstable; urgency=low
|
git-annex (3.20120605) unstable; urgency=low
|
||||||
|
|
||||||
|
|
50
doc/design/assistant/blog/day_6__polish.mdwn
Normal file
50
doc/design/assistant/blog/day_6__polish.mdwn
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
Since my last blog, I've been polishing the `git annex watch` command.
|
||||||
|
|
||||||
|
First, I fixed the double commits problem. There's still some extra
|
||||||
|
committing going on in the `git-annex` branch that I don't understand. It
|
||||||
|
seems like a shutdown event is somehow being triggered whenever
|
||||||
|
a git command is run by the commit thread.
|
||||||
|
|
||||||
|
I also made `git annex watch` run as a proper daemon, with locking to
|
||||||
|
prevent multiple copies running, and a pid file, and everything.
|
||||||
|
I made `git annex watch --stop` stop it.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Then I managed to greatly increase its startup speed. At startup, it
|
||||||
|
generates "add" events for every symlink in the tree. This is necessary
|
||||||
|
because it doesn't really know if a symlink is already added, or was
|
||||||
|
manually added before it starter, or indeed was added while it started up.
|
||||||
|
Problem was that these events were causing a lot of work staging the
|
||||||
|
symlinks -- most of which were already correctly staged.
|
||||||
|
|
||||||
|
You'd think it could just check if the same symlink was in the index.
|
||||||
|
But it can't, because the index is in a constant state of flux. The
|
||||||
|
symlinks might have just been deleted and re-added, or changed, and
|
||||||
|
the index still have the old value.
|
||||||
|
|
||||||
|
Instead, I got creative. :) We can't trust what the index says about the
|
||||||
|
symlink, but if the index happens to contian a symlink that looks right,
|
||||||
|
we can trust that the SHA1 of its blob is the right SHA1, and reuse it
|
||||||
|
when re-staging the symlink. Wham! Massive speedup!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Then I started running `git annex watch` on my own real git annex repos,
|
||||||
|
and noticed some problems.. Like it turns normal files already checked into
|
||||||
|
git into symlinks. And it leaks memory scanning a big tree. Oops..
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
I put together a quick screencast demoing `git annex watch`.
|
||||||
|
|
||||||
|
<video controls src="http://joeyh.name/screencasts/git-annex-watch.ogg"></video>
|
||||||
|
|
||||||
|
While making the screencast, I noticed that `git-annex watch` was spinning
|
||||||
|
in strace, which is bad news for powertop and battery usage. This seems to
|
||||||
|
be a [GHC bug](http://bugs.debian.org/677096) also affecting Xmonad. I
|
||||||
|
tried switching to GHC's threaded runtime, which solves that problem, but
|
||||||
|
causes git-annex to hang under heavy load. Tried to debug that for quite a
|
||||||
|
while, but didn't get far. Will need to investigate this further..
|
||||||
|
Am seeing indications that this problem only affects ghc 7.4.1; in
|
||||||
|
particular 7.4.2 does not seem to have the problem.
|
|
@ -22,3 +22,15 @@ Or I could try to use Cygwin.
|
||||||
## Deeper system integration
|
## Deeper system integration
|
||||||
|
|
||||||
[NTFS Reparse Points](http://msdn.microsoft.com/en-us/library/aa365503%28v=VS.85%29.aspx) allow a program to define how the OS will interpret a file or directory in arbitrary ways. This requires writing a file system filter.
|
[NTFS Reparse Points](http://msdn.microsoft.com/en-us/library/aa365503%28v=VS.85%29.aspx) allow a program to define how the OS will interpret a file or directory in arbitrary ways. This requires writing a file system filter.
|
||||||
|
|
||||||
|
## Developement environment
|
||||||
|
|
||||||
|
Someone wrote in to say:
|
||||||
|
|
||||||
|
> For Windows Development you can easily qualify
|
||||||
|
> for Bizspark - http://www.microsoft.com/bizspark/
|
||||||
|
>
|
||||||
|
> This will get you 100% free Windows OS licenses and
|
||||||
|
> Dev tools, plus a free Azure account for cloud testing.
|
||||||
|
> (You can also now deploy Linux VMs to Azure as well)
|
||||||
|
> No money required at all.
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
git-annex 3.20120418 released with [[!toggle text="these changes"]]
|
|
||||||
[[!toggleable text="""
|
|
||||||
* bugfix: Adding a dotfile also caused all non-dotfiles to be added.
|
|
||||||
* bup: Properly handle key names with spaces or other things that are
|
|
||||||
not legal git refs.
|
|
||||||
* git-annex (but not git-annex-shell) supports the git help.autocorrect
|
|
||||||
configuration setting, doing fuzzy matching using the restricted
|
|
||||||
Damerau-Levenshtein edit distance, just as git does. This adds a build
|
|
||||||
dependency on the haskell edit-distance library.
|
|
||||||
* Renamed diskfree.c to avoid OSX case insensativity bug.
|
|
||||||
* cabal now installs git-annex-shell as a symlink to git-annex.
|
|
||||||
* cabal file now autodetects whether S3 support is available."""]]
|
|
6
doc/news/version_3.20120611.mdwn
Normal file
6
doc/news/version_3.20120611.mdwn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
git-annex 3.20120611 released with [[!toggle text="these changes"]]
|
||||||
|
[[!toggleable text="""
|
||||||
|
* add: Prevent (most) modifications from being made to a file while it
|
||||||
|
is being added to the annex.
|
||||||
|
* initremote: Automatically describe a remote when creating it.
|
||||||
|
* uninit: Refuse to run in a subdirectory. Closes: #[677076](http://bugs.debian.org/677076)"""]]
|
|
@ -1,5 +1,5 @@
|
||||||
Name: git-annex
|
Name: git-annex
|
||||||
Version: 3.20120606
|
Version: 3.20120611
|
||||||
Cabal-Version: >= 1.8
|
Cabal-Version: >= 1.8
|
||||||
License: GPL
|
License: GPL
|
||||||
Maintainer: Joey Hess <joey@kitenet.net>
|
Maintainer: Joey Hess <joey@kitenet.net>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue