Merge branch 'master' into watch
Conflicts: debian/changelog
This commit is contained in:
commit
a5a3cd55ac
10 changed files with 117 additions and 23 deletions
|
@ -23,9 +23,13 @@ def = [addCheck check $ command "uninit" paramPaths seek
|
|||
|
||||
check :: Annex ()
|
||||
check = do
|
||||
b <- current_branch
|
||||
b <- current_branch
|
||||
when (b == Annex.Branch.name) $ error $
|
||||
"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
|
||||
current_branch = Git.Ref . Prelude.head . lines <$> revhead
|
||||
revhead = inRepo $ Git.Command.pipeRead
|
||||
|
|
10
debian/changelog
vendored
10
debian/changelog
vendored
|
@ -1,13 +1,19 @@
|
|||
git-annex (3.20120606) UNRELEASED; urgency=low
|
||||
git-annex (3.20120612) UNRELEASED; urgency=low
|
||||
|
||||
* watch: New subcommand, which uses inotify to watch for changes to
|
||||
files and automatically annexes new files, etc, so you don't need
|
||||
to manually run git commands when manipulating files.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Tue, 05 Jun 2012 20:25:51 -0400
|
||||
|
||||
git-annex (3.20120611) unstable; urgency=medium
|
||||
|
||||
* 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
|
||||
|
||||
-- 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
|
||||
|
||||
|
|
57
doc/design/assistant/blog/day_5__committing.mdwn
Normal file
57
doc/design/assistant/blog/day_5__committing.mdwn
Normal file
|
@ -0,0 +1,57 @@
|
|||
After a few days otherwise engaged, back to work today.
|
||||
|
||||
My focus was on adding the committing thread mentioned in [[day_4__speed]].
|
||||
I got rather further than expected!
|
||||
|
||||
First, I implemented a really dumb thread, that woke up once per second,
|
||||
checked if any changes had been made, and committed them. Of course, this
|
||||
rather sucked. In the middle of a large operation like untarring a tarball,
|
||||
or `rm -r` of a large directory tree, it made lots of commits and made
|
||||
things slow and ugly. This was not unexpected.
|
||||
|
||||
So next, I added some smarts to it. First, I wanted to stop it waking up
|
||||
every second when there was nothing to do, and instead blocking wait on a
|
||||
change occuring. Secondly, I wanted it to know when past changes happened,
|
||||
so it could detect batch mode scenarios, and avoid committing too
|
||||
frequently.
|
||||
|
||||
I played around with combinations of various Haskell thread communications
|
||||
tools to get that information to the committer thread: `MVar`, `Chan`,
|
||||
`QSem`, `QSemN`. Eventually, I realized all I needed was a simple channel
|
||||
through which the timestamps of changes could be sent. However, `Chan`
|
||||
wasn't quite suitable, and I had to add a dependency on
|
||||
[Software Transactional Memory](http://en.wikipedia.org/wiki/Software_Transactional_Memory),
|
||||
and use a `TChan`. Now I'm cooking with gas!
|
||||
|
||||
With that data channel available to the committer thread, it quickly got
|
||||
some very nice smart behavior. Playing around with it, I find it commits
|
||||
*instantly* when I'm making some random change that I'd want the
|
||||
git-annex assistant to sync out instantly; and that its batch job detection
|
||||
works pretty well too.
|
||||
|
||||
There's surely room for improvement, and I made this part of the code
|
||||
be an entirely pure function, so it's really easy to change the strategy.
|
||||
This part of the committer thread is so nice and clean, that here's the
|
||||
current code, for your viewing pleasure:
|
||||
|
||||
[[!format haskell """
|
||||
{- Decide if now is a good time to make a commit.
|
||||
- Note that the list of change times has an undefined order.
|
||||
-
|
||||
- Current strategy: If there have been 10 commits within the past second,
|
||||
- a batch activity is taking place, so wait for later.
|
||||
-}
|
||||
shouldCommit :: UTCTime -> [UTCTime] -> Bool
|
||||
shouldCommit now changetimes
|
||||
| len == 0 = False
|
||||
| len > 4096 = True -- avoid bloating queue too much
|
||||
| length (filter thisSecond changetimes) < 10 = True
|
||||
| otherwise = False -- batch activity
|
||||
where
|
||||
len = length changetimes
|
||||
thisSecond t = now `diffUTCTime` t <= 1
|
||||
"""]]
|
||||
|
||||
Still some polishing to do to eliminate minor innefficiencies and deal
|
||||
with more races, but this part of the git-annex assistant is now very usable,
|
||||
and will be going out to my beta testers soon!
|
|
@ -0,0 +1,16 @@
|
|||
[[!comment format=mdwn
|
||||
username="https://www.google.com/accounts/o8/id?id=AItOawkq0-zRhubO6kR9f85-5kALszIzxIokTUw"
|
||||
nickname="James"
|
||||
subject="Cloud Service Limitations"
|
||||
date="2012-06-11T02:15:04Z"
|
||||
content="""
|
||||
Hey Joey!
|
||||
|
||||
I'm not very tech savvy, but here is my question.
|
||||
I think for all cloud service providers, there is an upload limitation on how big one file may be.
|
||||
For example, I can't upload a file bigger than 100 MB on box.net.
|
||||
Does this affect git-annex at all? Will git-annex automatically split the file depending on the cloud provider or will I have to create small RAR archives of one large file to upload them?
|
||||
|
||||
Thanks!
|
||||
James
|
||||
"""]]
|
|
@ -0,0 +1,8 @@
|
|||
[[!comment format=mdwn
|
||||
username="http://joeyh.name/"
|
||||
ip="4.153.8.126"
|
||||
subject="re: cloud"
|
||||
date="2012-06-11T04:48:08Z"
|
||||
content="""
|
||||
Yes, git-annex has to split files for certian providers. I already added support for this as part of my first pass at supporting box.com, see [[tips/using_box.com_as_a_special_remote]].
|
||||
"""]]
|
|
@ -23,10 +23,11 @@ really useful, it needs to:
|
|||
is exceeded. This can be tuned by root, so help the user fix it.
|
||||
**done**
|
||||
- periodically auto-commit staged changes (avoid autocommitting when
|
||||
lots of changes are coming in)
|
||||
- tunable delays before adding new files, etc
|
||||
- coleasce related add/rm events for speed and less disk IO
|
||||
lots of changes are coming in) **done**
|
||||
- coleasce related add/rm events for speed and less disk IO **done**
|
||||
- don't annex `.gitignore` and `.gitattributes` files **done**
|
||||
- run as a daemon **done**
|
||||
- tunable delays before adding new files, etc
|
||||
- configurable option to only annex files meeting certian size or
|
||||
filename criteria
|
||||
- option to check files not meeting annex criteria into git directly
|
||||
|
@ -107,7 +108,3 @@ Many races need to be dealt with by this code. Here are some of them.
|
|||
|
||||
Not a problem; The removal event removes the old file from the index, and
|
||||
the add event adds the new one.
|
||||
|
||||
* At startup, `git add --update` is run, to notice deleted files.
|
||||
Then inotify starts up. Files deleted in between won't have their
|
||||
removals staged.
|
||||
|
|
|
@ -22,3 +22,15 @@ Or I could try to use Cygwin.
|
|||
## 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.
|
||||
|
||||
## 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
|
||||
Version: 3.20120605
|
||||
Version: 3.20120611
|
||||
Cabal-Version: >= 1.8
|
||||
License: GPL
|
||||
Maintainer: Joey Hess <joey@kitenet.net>
|
||||
|
|
Loading…
Reference in a new issue