From dc2e0d0d9bc8d5fd106e7c1c8d871498f8012233 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 Jul 2012 11:32:21 -0400 Subject: [PATCH 1/2] updates --- doc/design/assistant/syncing.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/design/assistant/syncing.mdwn b/doc/design/assistant/syncing.mdwn index 836dac43c5..a9f59f4968 100644 --- a/doc/design/assistant/syncing.mdwn +++ b/doc/design/assistant/syncing.mdwn @@ -7,7 +7,9 @@ all the other git clones, at both the git level and the key/value level. location tracking indicates remotes do not, and enqueue Uploads for them. Also, enqueue Downloads for any files we're missing. * After git sync, identify content that we don't have that is now available - on remotes, and transfer. + on remotes, and transfer. But first, need to ensure that when a remote + receives content, and updates its location log, it syncs that update + out. ## longer-term TODO @@ -90,6 +92,8 @@ anyway. Watcher. **done** * enqueue Tranferrs (Downloads) as new dangling symlinks are noticed by Watcher. **done** + (Note: Needs git-annex branch to be merged before the tree is merged, + so it knows where to download from. Checked and this is the case.) * Write basic Transfer handling thread. Multiple such threads need to be able to be run at once. Each will need its own independant copy of the Annex state monad. **done** From f5f88794713ebbbbc177d064f074a80ca23e9b79 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 Jul 2012 12:27:06 -0400 Subject: [PATCH 2/2] map: Write map.dot to .git/annex, which avoids watch trying to annex it. --- Command/Map.hs | 4 ++-- debian/changelog | 1 + doc/bugs/__34__git_annex_watch__34___adds_map.dot.mdwn | 6 +++++- test.hs | 3 --- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Command/Map.hs b/Command/Map.hs index 65e28945f6..0773f68283 100644 --- a/Command/Map.hs +++ b/Command/Map.hs @@ -39,6 +39,8 @@ start = do umap <- uuidMap trusted <- trustGet Trusted + + file <- () <$> fromRepo gitAnnexDir <*> pure "map.dot" liftIO $ writeFile file (drawMap rs umap trusted) next $ next $ @@ -49,8 +51,6 @@ start = do showOutput liftIO $ boolSystem "dot" [Param "-Tx11", File file] ) - where - file = "map.dot" {- Generates a graph for dot(1). Each repository, and any other uuids, are - displayed as a node, and each of its remotes is represented as an edge diff --git a/debian/changelog b/debian/changelog index 5eaf9d52eb..f90763acae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ git-annex (3.20120630) UNRELEASED; urgency=low faster than forking the more optimised external program. * SHAnE backends are now smarter about composite extensions, such as .tar.gz Closes: #680450 + * map: Write map.dot to .git/annex, which avoids watch trying to annex it. -- Joey Hess Sun, 01 Jul 2012 15:04:37 -0400 diff --git a/doc/bugs/__34__git_annex_watch__34___adds_map.dot.mdwn b/doc/bugs/__34__git_annex_watch__34___adds_map.dot.mdwn index d6dc3e42de..94c495735e 100644 --- a/doc/bugs/__34__git_annex_watch__34___adds_map.dot.mdwn +++ b/doc/bugs/__34__git_annex_watch__34___adds_map.dot.mdwn @@ -1,4 +1,8 @@ -"git annex watch" will add the file generated by "git annex map", which is probably not intended. Shouldn’t this file be created in /tmp or .git/annex/ or somewhere else? +"git annex watch" will add the file generated by "git annex map", which is +probably not intended. Shouldn’t this file be created in /tmp or +.git/annex/ or somewhere else? + +> Indeed, so [[done]] --[[Joey]] /tmp $ cd test/ /tmp/test $ git init diff --git a/test.hs b/test.hs index 089c86bfb6..9de73264ee 100644 --- a/test.hs +++ b/test.hs @@ -550,9 +550,6 @@ test_map = "git-annex map" ~: intmpclonerepo $ do git_annex "describe" ["origin", "origin repo"] @? "describe 2 failed" -- --fast avoids it running graphviz, not a build dependency git_annex "map" ["--fast"] @? "map failed" - doesFileExist "map.dot" @? "map.dot not generated" - c <- readFile "map.dot" - ("this repo" `isInfixOf` c && "origin repo" `isInfixOf` c) @? ("map.dot bad content: " ++ c) test_uninit :: Test test_uninit = "git-annex uninit" ~: intmpclonerepo $ do