summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-14 12:41:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-14 12:41:48 -0400
commit342fc28437f59edcea8fb61ff987ea1899140f35 (patch)
treef192d5ec5be8a817124ccba3d08d03333e94e62e
parent95a1f6b2accca9b7c6a6c30c92380dc0de57d3a0 (diff)
parent6cb4743cfb105427a00b551ebd51fc5c9626bfea (diff)
Merge branch 'master' into bloom
Conflicts: Command/Commit.hs debian/changelog
-rw-r--r--Command/Commit.hs3
-rw-r--r--Remote/Git.hs7
-rw-r--r--debian/changelog1
-rw-r--r--doc/forum/post-copy__47__sync_hook.mdwn14
-rw-r--r--doc/forum/post-copy__47__sync_hook/comment_1_c8322d4b9bbf5eac80b48c312a42fbcf._comment11
5 files changed, 33 insertions, 3 deletions
diff --git a/Command/Commit.hs b/Command/Commit.hs
index 19b0bc250..1c82ed7df 100644
--- a/Command/Commit.hs
+++ b/Command/Commit.hs
@@ -22,7 +22,8 @@ seek = [withNothing start]
start :: CommandStart
start = next $ next $ do
Annex.Branch.commit "update"
- runhook =<< (inRepo $ Git.hookPath "annex-content")
+ _ <- runhook =<< (inRepo $ Git.hookPath "annex-content")
+ return True
where
runhook (Just hook) = liftIO $ boolSystem hook []
runhook Nothing = return True
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 29c50e87f..12a7f1844 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -290,10 +290,13 @@ rsyncParamsRemote r sending key file = do
then return $ o ++ eparam ++ [dummy, File file]
else return $ o ++ eparam ++ [File file, dummy]
where
- -- the rsync shell parameter controls where rsync
+ -- The rsync shell parameter controls where rsync
-- goes, so the source/dest parameter can be a dummy value,
-- that just enables remote rsync mode.
- dummy = Param ":"
+ -- For maximum compatability with some patched rsyncs,
+ -- the dummy value needs to still contain a hostname,
+ -- even though this hostname will never be used.
+ dummy = Param "dummy:"
rsyncParams :: Git.Repo -> Annex [CommandParam]
rsyncParams r = do
diff --git a/debian/changelog b/debian/changelog
index 938aba130..393234ba5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,7 @@ git-annex (3.20120310) UNRELEASED; urgency=low
detect then it's too small for the number of keys in a repository.
* git-annex-shell: Runs hooks/annex-content after content is received
or dropped.
+ * Work around a bug in rsync (IMHO) introduced by openSUSE's SIP patch.
-- Joey Hess <joeyh@debian.org> Sat, 10 Mar 2012 14:03:22 -0400
diff --git a/doc/forum/post-copy__47__sync_hook.mdwn b/doc/forum/post-copy__47__sync_hook.mdwn
new file mode 100644
index 000000000..05fbc0b29
--- /dev/null
+++ b/doc/forum/post-copy__47__sync_hook.mdwn
@@ -0,0 +1,14 @@
+Hi,
+
+I have the following setup:
+- normal git repository with website code.
+- git annex repository to hold large set of binary data (pdfs, flashmovies, etc) that belongs to the site.
+
+I use git annex so I (and other developers) don't need to copy 1.4Gb+ of binary data for every working copy. (Data that is mostly left untouched.) Using git annex copy --to=origin I can simply only add new additions to this media/binary repository, without first pulling all the data. So far so good.
+
+When commits are pushed to a certain branch on the normal git repository, a post-receive hook exports (GIT_WORK_TREE=/data/site/ git checkout $branch -f) the updated repository to an apache documentroot. Thereby updating the staging server of the website.
+
+My question is, how can I do the same thing for my git annex repository? Since post-receive fires on receiving the annex hashes, and not the actual files. Those are rsynced, and I cannot find a way to trigger an action after all files are copied by git annex via rsync.
+
+Any tips?
+
diff --git a/doc/forum/post-copy__47__sync_hook/comment_1_c8322d4b9bbf5eac80b48c312a42fbcf._comment b/doc/forum/post-copy__47__sync_hook/comment_1_c8322d4b9bbf5eac80b48c312a42fbcf._comment
new file mode 100644
index 000000000..04a6f4668
--- /dev/null
+++ b/doc/forum/post-copy__47__sync_hook/comment_1_c8322d4b9bbf5eac80b48c312a42fbcf._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 1"
+ date="2012-03-14T16:23:25Z"
+ content="""
+I've made git-annex-shell run the git `hooks/annex-content` after content is received or dropped.
+
+Note that the clients need to be running at least git-annex version 3.20120227 , which runs git-annex-shell commit, which runs the hook.
+
+"""]]