Commit graph

4364 commits

Author SHA1 Message Date
Joey Hess
5f5f7b1a9f tweak 2012-06-12 11:38:16 -04:00
Joey Hess
0e944fd0e9 Install man page when run by cabal, in a location where man will find it, even when installing under $HOME. Thanks, Nathan Collins 2012-06-12 11:36:42 -04:00
Joey Hess
7b3b6e4654 cleanup 2012-06-12 11:35:32 -04:00
Joey Hess
66a961b1b7 remove cabal file 2012-06-12 11:35:24 -04:00
Joey Hess
942d8f7298 hlint 2012-06-12 11:32:06 -04:00
Nathan Collins
fd40af6e62 Merge branch 'master' into cabal-man-pages 2012-06-12 02:54:27 -07:00
Nathan Collins
000bbba3c0 Clean up Setup.hs.
Remove post-copy hook 'myPostCopy': it's easy to write one based on
'myPostInst', so just wait until someone complains that it's missing.

Remove most comments.

Put long type sigs on one line like in the other source files.
2012-06-12 02:50:09 -07:00
Nathan Collins
2e0965eba9 Generate sdist tarball name from git-annex.cabal 'Version:'.
Instead of generating with `cabal sdist`.
2012-06-12 02:45:53 -07:00
Nathan Collins
79a71d9ba6 Simplify git-annex.cabal and generate sdist with make-sdist.sh.
The `cabal install` is happy as long as the files it needs are
present, but `cabal sdist` will only package up files you tell it to.
So, generate the source tarball ourselves.

The source tarball is generated by make-sdist.sh, which uses cabal
sdist to calculate the package name.  Could also generate the name
from the 'Version:' field in git-annex.cabal.
2012-06-12 02:36:05 -07:00
Nathan Collins
72b0054931 Get ready for a simple git-annex.cabal.
I have a new idea: instead of the template-based approaches that work
around cabals requirement that you list all files to put in the sdist,
we can simply generate the sdist ourselves, with the files we
want. Take that cabal!
2012-06-12 00:53:51 -07:00
Nathan Collins
9fe433390d Remove .dir-locals.el and add doc/contributing.mdwn.
Add link CONTRIBUTING -> doc/contributing.mdwn, so that it's easy to
find (many files in doc/).

Add .dir-locals.el to .gitignore, now that it's no longer versioned.

The CONTRIBUTING file gives a reference to a page on the Emacs wiki
that shows how to set up a .dir-locals.el that sets up tabs for
indentation.  I updated the wiki page to include the
`(highlight-regexp "^ *")` part, which had been the hardest to
discover.
2012-06-12 00:43:42 -07:00
Nathan Collins
236ae1fbc4 Add link COPYRIGHT -> debian/copyright; add COPYRIGHT to sdist. 2012-06-11 23:27:00 -07:00
Joey Hess
85f0992c03 Merge branch 'master' into watch 2012-06-11 19:10:05 -04:00
Joey Hess
48dd2ff264 blog for the day 2012-06-11 16:44:45 -04:00
Joey Hess
d3a6f04abf update 2012-06-11 15:41:26 -04:00
Joey Hess
7f3934520a avoid using STM while the MVar is held
I thought this might be a lock conflict that explains the deadlock when
built with -threaded, but it seems not.. it still locks! It even locks
without the committer thread.

Indeed, it locks when running "git annex add"! -threaded is exposing some
other problem.

Still, this seems conceptually cleaner and did not add any inneficiencies.
Also added some high-level documentation about the threads used.
2012-06-11 15:29:11 -04:00
Joey Hess
f7dbcd58ff tweak 2012-06-11 14:24:13 -04:00
Joey Hess
0847a300fc Revert "Build with ghc's threaded runtime, so threaded code does not busy-wait."
This reverts commit 129f6123fe.

Saw hang during batch add with -threaded, so deferred for now.
2012-06-11 12:46:35 -04:00
Joey Hess
129f6123fe Build with ghc's threaded runtime, so threaded code does not busy-wait.
Sort of a work around for http://bugs.debian.org/677096
2012-06-11 12:21:18 -04:00
Joey Hess
a5a3cd55ac Merge branch 'master' into watch
Conflicts:
	debian/changelog
2012-06-11 12:13:07 -04:00
Joey Hess
5642e189b7 add news item for git-annex 3.20120611 2012-06-11 10:45:33 -04:00
Joey Hess
5a7b7d67f7 releasing version 3.20120611 2012-06-11 10:44:16 -04:00
Joey Hess
7f70767bfb uninit: Refuse to run in a subdirectory. Closes: #677076 2012-06-11 10:33:58 -04:00
Nathan Collins
6eb4f35c03 Merge branch 'master' into cabal-man-pages 2012-06-11 00:18:48 -07:00
Nathan Collins
7753b33c88 Refactor generation of git-annex.cabal and incorporate man pages.
The existing `sed | find | perl` hack in the Makefile was not
including the man pages in the generated git-annex.cabal.  I couldn't
figure out why it didn't work; running the `find | perl` part of the
command *did* list the man pages ...

So, I set up a new hack. It produces a cleaner .cabal file and
includes the man pages in the sdist.  I changed git-annex.cabal and
its generation as follows:

- git-annex.cabal is now generated by a here document in
  git-annex.cabal.template.sh.  The here document has inline file list
  insertion, whereas before the file lists were inserted with sed.

- The 'Extra-Source-Files:' field now only includes the non-source
  files: the man pages, plain text documentation, and license.

- The source dependencies are now listed in 'Other-Modules' sections
  in the 'Executable' and 'Test-Suite' sections.  The list of
  dependencies is generated by `gen-other-modules.sh`.

- The ./debian and ./doc are no longer included in the sdist package.
  These were not installed anywhere by `cabal install`.  A user that
  wants them could clone the git repo.

Running the tests with cabal is not yet working, i.e.

  cabal configure --enable-tests && cabal build && cabal test

and

  cabal install --enable-tests

fail to find Utility.Touch.  However, I did not break this: it doesn't
work for the git-annex package on Hackage either.  Next step is to
figure out how to deal with HSC in cabal ... or not bother, because
`make test` works.  I'm worried this is a cabal bug.

To test building from sdist, I've been running

  cd ../.. ; cabal sdist ; cd dist ; tar xf git-annex-3.20120605.tar.gz && cd git-annex-3.20120605 && rm -fr /tmp/git-annex && cabal install --prefix=/tmp/git-annex && tree -A /tmp/git-annex

in the dist directory.  Using `cabal-dev install` is a better test,
but is very slow.
2012-06-11 00:12:11 -07:00
Joey Hess
28242b3bf8 note 2012-06-11 02:13:04 -04:00
Joey Hess
31065fa4e2 Merge branch 'master' of ssh://git-annex.branchable.com 2012-06-11 02:10:18 -04:00
Joey Hess
aba425fb2b update 2012-06-11 02:09:22 -04:00
Joey Hess
433ff41496 bugfix 2012-06-11 02:06:22 -04:00
Joey Hess
d0a0a6ae21 git annex watch --stop 2012-06-11 02:01:20 -04:00
Joey Hess
8539a7bde8 fix pid file locking
Ok, that's odd.. opening it before fork breaks the locking.
I don't understand why.
2012-06-11 01:37:25 -04:00
Joey Hess
0b3e2bed78 add a pid file
Writes pid to a file. Is supposed to take an exclusive lock, but that's not
working, and it's too late for me to understand why.
2012-06-11 01:20:19 -04:00
http://joeyh.name/
d2dbb59539 Added a comment: re: cloud 2012-06-11 04:48:08 +00:00
Joey Hess
d5884388b0 daemonize git annex watch 2012-06-11 00:39:09 -04:00
Nathan Collins
b86f201bdf Rename git-annex.cabal. 2012-06-10 19:17:51 -07:00
https://www.google.com/accounts/o8/id?id=AItOawkq0-zRhubO6kR9f85-5kALszIzxIokTUw
d271383d31 Added a comment: Cloud Service Limitations 2012-06-11 02:15:06 +00:00
Nathan Collins
721de7067c Add cabal-dev to .gitignore. 2012-06-10 19:03:35 -07:00
Nathan Collins
f4b82e31b4 Fix Makefile dependencies for make test. 2012-06-10 18:59:16 -07:00
Joey Hess
ca9ee21bd7 crazy optimisation
Crazy like a fox..
2012-06-10 19:58:34 -04:00
Joey Hess
b20c270d00 update 2012-06-10 19:11:04 -04:00
Joey Hess
c1b432ee54 run git add --update after inotify is started
This way, there's no window where deleted files won't be noticed.
2012-06-10 19:10:18 -04:00
Joey Hess
aae0ba1995 fixed the double commits problem 2012-06-10 18:41:05 -04:00
Joey Hess
fc0dd79774 avoid running pre-commit hook from watch commits 2012-06-10 17:53:17 -04:00
Joey Hess
cda6c4dff5 tweak 2012-06-10 17:40:35 -04:00
Joey Hess
f4aacd5c86 update 2012-06-10 16:49:36 -04:00
Joey Hess
39b9aaa7a9 typo 2012-06-10 16:44:22 -04:00
Joey Hess
a0e29b214f blog for the day 2012-06-10 16:33:42 -04:00
Joey Hess
7201d7835c Merge branch 'master' into watch 2012-06-10 16:13:23 -04:00
Joey Hess
2de50f733a smart commit thread
The commit thread now has access to a channel containing the times of
all uncommitted changes. This lets it be smart about detecting busy times
when a batch job is running (such as rm -rf, or untarring something, etc),
and avoid committing until it's done. While at the same time, instantly
committing one-off changes that the user is going to expect to see
immediately.

I had to use STM to implement the channel, because of
http://hackage.haskell.org/trac/ghc/ticket/4154
While this adds a dependency, I always wanted to use STM, so this actually
makes me happy. ;)

Also happy that shouldCommit is a pure function, so other commit smartness
strategies can easily be played with. Although the current one seems pretty
good.

There is one bug, for some reason it does double commits, every time.
2012-06-10 16:07:48 -04:00
Joey Hess
6e54907e35 add a thread to commit changes
Currently the stupidest possible version, just wakes up every second,
and may make empty commits sometimes.
2012-06-10 13:56:39 -04:00