aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Steve <Steve@web>2012-11-25 22:59:39 +0000
committerGravatar admin <admin@branchable.com>2012-11-25 22:59:39 +0000
commit4197a408f2c9beb1dda347c7b191d08e23d91f22 (patch)
tree08a7cd7a17fae1aa778e925f8e4279c27acf0618
parent5d805534bdada561f25ea54a0d32c5168523a86f (diff)
-rw-r--r--doc/bugs/dropping_and_re-adding_from_web_remotes_doesn__39__t_work.mdwn131
1 files changed, 131 insertions, 0 deletions
diff --git a/doc/bugs/dropping_and_re-adding_from_web_remotes_doesn__39__t_work.mdwn b/doc/bugs/dropping_and_re-adding_from_web_remotes_doesn__39__t_work.mdwn
new file mode 100644
index 000000000..f0eb90555
--- /dev/null
+++ b/doc/bugs/dropping_and_re-adding_from_web_remotes_doesn__39__t_work.mdwn
@@ -0,0 +1,131 @@
+In experimenting with the web remote, I found that dropping a URL gave an error, but still succeeded, while re-adding the same URL fails to work correctly.
+
+#What steps will reproduce the problem?
+
+<pre>
+/tmp $ dd if=/dev/zero of=/tmp/file.bin count=1024
+1024+0 records in
+1024+0 records out
+524288 bytes (524 kB) copied, 0.0135652 s, 38.6 MB/s
+/tmp $ mkdir /tmp/repo
+/tmp $ cd /tmp/repo
+/tmp/repo $ git init
+Initialized empty Git repository in /tmp/repo/.git/
+/tmp/repo $ git annex init "test"
+init test ok
+(Recording state in git...)
+/tmp/repo $ git annex addurl file:///tmp/file.bin --file annexed.bin
+######################################################################## 100.0%
+(checksum...) ok
+(Recording state in git...)
+/tmp/repo $ git annex drop annexed.bin
+drop annexed.bin (checking file:///tmp/file.bin...) ok
+(Recording state in git...)
+/tmp/repo $ mv /tmp/file.bin /tmp/file2.bin
+/tmp/repo $ git annex get annexed.bin
+get annexed.bin (from web...)
+curl: (37) Couldn't open file /tmp/file.bin
+
+ Unable to access these remotes: web
+
+ Try making some of these repositories available:
+ 00000000-0000-0000-0000-000000000001 -- web
+failed
+git-annex: get: 1 failed
+/tmp/repo $ git annex drop --from web annexed.bin --force
+drop web annexed.bin
+ removal from web not supported
+failed
+(Recording state in git...)
+git-annex: drop: 1 failed
+/tmp/repo $ git annex get annexed.bin
+get annexed.bin (not available)
+ No other repository is known to contain the file.
+failed
+git-annex: get: 1 failed
+/tmp/repo $ mv /tmp/file2.bin /tmp/file.bin
+/tmp/repo $ git annex addurl file:///tmp/file.bin --file annexed.bin
+addurl annexed.bin ok
+/tmp/repo $ git annex whereis annexed.bin
+whereis annexed.bin (0 copies) failed
+git-annex: whereis: 1 failed
+/tmp/repo $ git annex addurl file:///tmp/file.bin --file annexed2.bin
+######################################################################## 100.0%
+(checksum...) ok
+(Recording state in git...)
+/tmp/repo $ git annex whereis annexed.bin
+whereis annexed.bin (1 copy)
+ e2418e81-ec04-4091-aabe-ed75d65f93fa -- here (test)
+ok
+/tmp/repo $ git annex whereis annexed2.bin
+whereis annexed2.bin (1 copy)
+ e2418e81-ec04-4091-aabe-ed75d65f93fa -- here (test)
+ok
+/tmp/repo $ git annex drop annexed.bin
+drop annexed.bin (unsafe)
+ Could only verify the existence of 0 out of 1 necessary copies
+
+ No other repository is known to contain the file.
+
+ (Use --force to override this check, or adjust annex.numcopies.)
+failed
+git-annex: drop: 1 failed
+/tmp/repo $ git annex drop annexed2.bin
+drop annexed2.bin (unsafe)
+ Could only verify the existence of 0 out of 1 necessary copies
+
+ No other repository is known to contain the file.
+
+ (Use --force to override this check, or adjust annex.numcopies.)
+failed
+git-annex: drop: 1 failed
+/tmp/repo $ mv /tmp/file.bin /tmp/file2.bin
+/tmp/repo $ git annex addurl file:///tmp/file2.bin --file annexed.bin
+addurl annexed.bin ok
+(Recording state in git...)
+/tmp/repo $ git annex whereis annexed2.bin
+whereis annexed2.bin (2 copies)
+ 00000000-0000-0000-0000-000000000001 -- web
+ e2418e81-ec04-4091-aabe-ed75d65f93fa -- here (test)
+
+ web: file:///tmp/file.bin
+ web: file:///tmp/file2.bin
+ok
+/tmp/repo $ mv /tmp/file2.bin /tmp/file.bin
+/tmp/repo $ git annex drop annexed.bin
+drop annexed.bin (checking file:///tmp/file.bin...) ok
+(Recording state in git...)
+/tmp/repo $ git annex get annexed.bin
+get annexed.bin (from web...)
+######################################################################## 100.0%
+ok
+(Recording state in git...)
+/tmp/repo $ git annex drop annexed.bin
+drop annexed.bin (checking file:///tmp/file.bin...) ok
+(Recording state in git...)
+/tmp/repo $ mv /tmp/file.bin /tmp/file2.bin
+/tmp/repo $ git annex get annexed.bin
+get annexed.bin (from web...)
+curl: (37) Couldn't open file /tmp/file.bin
+######################################################################## 100.0%
+ok
+(Recording state in git...)
+</pre>
+
+#What is the expected output? What do you see inst
+
+
+When dropping one file and I see "git-annex: drop: 1 failed" I would expect the file to still be in the remote as far as git-annex is concerned.
+
+When re-adding the URL, I expect the file to be re-added to the web remote. (note that it re-appears after adding the same file via a different URL)
+
+
+#What version of git-annex are you using? On what operating system?
+
+
+3.20121112 on Gentoo Linux
+
+
+#Please provide any additional information below.
+
+This seems to be a corner case, and would probably have minimal impact on most people.