summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar https://www.google.com/accounts/o8/id?id=AItOawmhfodZquCI_EEl-f3h7HkROTszlsQL6yA <Joe@web>2013-06-16 17:27:19 +0000
committerGravatar admin <admin@branchable.com>2013-06-16 17:27:19 +0000
commitb2f11335b5060a43eab5fcf563e601e099035f19 (patch)
treee45da482385a905224f8eb864f29dd18360cf90d
parent07253b2dc7da1deab77d60cfd380d039d0f958a3 (diff)
Added a comment
-rw-r--r--doc/bugs/windows_port_-_repo_can__39__t_pull_newly_added_files_/comment_4_29e72997b88f91f84639587b4cede34c._comment76
1 files changed, 76 insertions, 0 deletions
diff --git a/doc/bugs/windows_port_-_repo_can__39__t_pull_newly_added_files_/comment_4_29e72997b88f91f84639587b4cede34c._comment b/doc/bugs/windows_port_-_repo_can__39__t_pull_newly_added_files_/comment_4_29e72997b88f91f84639587b4cede34c._comment
new file mode 100644
index 000000000..c785ff77b
--- /dev/null
+++ b/doc/bugs/windows_port_-_repo_can__39__t_pull_newly_added_files_/comment_4_29e72997b88f91f84639587b4cede34c._comment
@@ -0,0 +1,76 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawmhfodZquCI_EEl-f3h7HkROTszlsQL6yA"
+ nickname="Joe"
+ subject="comment 4"
+ date="2013-06-16T17:27:18Z"
+ content="""
+I have a workaround that requires a small patch. I'm not sure why it's not creating the mapping, but I noticed that git annex fsck has a verifyDirectMapping which will create the mapping if it doesn't exist.
+
+git annex fsck will throw an error on fixLinks and won't proceed to verifyDirectMapping if the map file doesn't exist. So, I needed a way to call verifyDirectMapping directly. My hack is to add an argument to git annex fsck to call verifyDirectMapping.
+
+My workflow is this:
+
+**repo1**:
+[[!format sh \"\"\"
+echo a > new.txt
+git annex add .
+git commit -m \"add a\"
+git copy --to origin
+git annex sync
+\"\"\"]]
+
+**repo2**:
+[[!format sh \"\"\"
+git annex sync
+git annex pull origin synced/master
+git annex fsck --verifyDirectMapping
+git annex get .
+\"\"\"]]
+
+The new file comes down cleanly.
+
+I'm sure there's a better way to do this to fix the core issue, but here's how I patched Fsck.hs as a minimal workaround
+
+[[!format diff \"\"\"
+
+diff --git a/Command/Fsck.hs b/Command/Fsck.hs
+old mode 100644
+new mode 100755
+index 9af6a4a..97aabb8
+--- a/Command/Fsck.hs
++++ b/Command/Fsck.hs
+@@ -59,12 +60,16 @@ incrementalScheduleOption :: Option
+ incrementalScheduleOption = Option.field [] \"incremental-schedule\" paramTime
+ \"schedule incremental fscking\"
+
++verifyDirectMappingOption :: Option
++verifyDirectMappingOption = Option.flag [] \"verifyDirectMapping\" \"verifies direct mappings are consistent\"
++
+ options :: [Option]
+ options =
+ [ fromOption
+ , startIncrementalOption
+ , moreIncrementalOption
+ , incrementalScheduleOption
++ , verifyDirectMappingOption
+ ]
+
+ seek :: [CommandSeek]
+@@ -107,18 +112,23 @@ withIncremental = withValue $ do
+ start :: Maybe Remote -> Incremental -> FilePath -> (Key, Backend) -> CommandStart
+ start from inc file (key, backend) = do
+ numcopies <- numCopies file
+- case from of
+- Nothing -> go $ perform key file backend numcopies
+- Just r -> go $ performRemote key file backend numcopies r
++ verify <- Annex.getFlag (Option.name verifyDirectMappingOption)
++ if verify
++ then go $ verifyDirectMapping key file
++ else
++ case from of
++ Nothing -> go $ perform key file backend numcopies
++ Just r -> go $ performRemote key file backend numcopies r
+
+
+\"\"\"]]
+"""]]