summaryrefslogtreecommitdiff
path: root/doc/bugs/On_Windows__44___annex_get_over_HTTP_sends_URLs_with_incorrect_separator.mdwn
blob: 08bc76ed165d4c7de0816c2e89889c200685bb8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
### Please describe the problem.
On Windows, attempting to annex get from a remote over HTTP fails. URLs which are nearly correct, but have incorrect slashes, are sent.

### What steps will reproduce the problem?
1. Create an annex on Linux.
2. Configure repository for HTTP access
3. Clone annex on Windows.
4. "git annex get ."
5. git annex makes requests for urls like the following: http://host/repo/.git/annex/objects\<3-char-hash>\<3-char-hash>\SHA<file hash>

### What version of git-annex are you using? On what operating system?
Windows 7: 4.20140627-g8a36ec5 (from the git-annex download page)

Debian Linux: 3.20120629 (from the package manager)

### Please provide any additional information below.
placing a wrapper script in front of wget which replaces '\' with '/' works around the issue, and allows git annex get to complete.


###Full Transcript

#### 1. setup of linux repo
[[!format sh """
test-git-annex@linux_host:~/test_annex$ git version
git version 1.7.10.4
test-git-annex@linux_host:~/test_annex$ git annex version
git-annex version: 3.20120629
local repository version: 3
default repository version: 3
supported repository versions: 3
upgrade supported from repository versions: 0 1 2
test-git-annex@linux_host: ~test-git-annex@linux_host:~$ mkdir test_annex
test-git-annex@linux_host: ~test-git-annex@linux_host:~$ cd test_annex/
test-git-annex@linux_host:~/test_annex$ git init .
Initialized empty Git repository in /home/test-git-annex/test_annex/.git/
test-git-annex@linux_host:~/test_annex$ annex init laptop
init laptop ok
(Recording state in git...)
~/test_annextest-git-annex@linux_host:~/test_annex$ echo "this is some content" > file1.txt
test-git-annex@linux_host:~/test_annex$ git annex add file1.txt
add file1.txt (checksum...) ok
(Recording state in git...)
test-git-annex@linux_host:~/test_annex$ git commit -a -m "initial commit"
[master (root-commit) 821c6c1] initial commit
 1 file changed, 1 insertion(+)
 create mode 120000 file1.txt
test-git-annex@linux_host:~/test_annex$ ls -l
total 4
lrwxrwxrwx 1 test-git-annex test-git-annex 178 Jul  6 11:33 file1.txt -> .git/annex/objects/J9/m6/SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729/SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729
test-git-annex@linux_host:~/test_annex$ cat file1.txt 
this is some content
"""]]

#### 2. set up and run http server
[[!format sh """
test-git-annex@MrLinuxTablet:~/test_annex$ git update-server-info
cd ..
test-git-annex@MrLinuxTablet:~$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

"""]]

#### 3. Set up Windows, clone repo, init annex

[[!format sh """

#Windows 7
#download and install git from git-scm.com/download/win
#Git-1.8.3-preview20130601.exe
#on install, selecting "Run Git from the Windows Command Prompt"
#on install, selecting "checkout as-is, commit as-is"
#installs to C:\Program Files (x86)\Git
#download and install git-annex from http://git-annex.branchable.com/install/
#git-annex-installer.exe
#need to right-click 'run as administrator', per reported bug (link here)
#installs to C:\Program Files (x86)\Git\cmd
#also installs some utilities, including wget.exe

C:\Users\test-git-annex>git clone http://192.168.0.8:8000/test_annex/.git
Cloning into 'test_annex'...

C:\Users\test-git-annex>cd test_annex

C:\Users\test-git-annex\test_annex>dir
 Volume in drive C has no label.

 Directory of C:\Users\test-git-annex\test_annex

<DIR>          .
<DIR>          ..
              178 file1.txt
               1 File(s)            178 bytes

C:\Users\test-git-annex\test_annex>type file1.txt
.git/annex/objects/J9/m6/SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729/SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729

C:\Users\test-git-annex\test_annex>git annex init windows
init windows
  Detected a crippled filesystem.

  Enabling direct mode.

  Detected a filesystem without fifo support.

  Disabling ssh connection caching.
ok
(Recording state in git...)

"""]]

####4. annex get

[[!format sh """
#create empty file named 'wget' in Git\cmd, and install cygwin, add to path, to provide necessary DLLs
C:\Users\test-git-annex\test_annex> git annex get file.txt

C:\Users\test-git-annex\test_annex>git annex -vd get file1.txt
[<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","ls-files","--cached","-z","--","file1.txt"]
get file1.txt [<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","show-ref","git-annex"]
[<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","show-ref","--hash","refs/heads/git-annex"]
[<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","log","refs/heads/git-annex..98d1182bcee688b06307963dfea81aa70a3c8336","--oneline","-n1"]
[<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","log","refs/heads/git-annex..304263841906c0b4dda39d0fdbe54e4af4307cb8","--oneline","-n1"]
(merging origin/git-annex into git-annex...)
[<datetime>] chat: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","cat-file","--batch"]
[<datetime>] feed: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","update-index","-z","--index-info"]
[<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","diff-index","--raw","-z","-r","--no-renames","-l0","--cached","304263841906c0b4dda39d0fdbe54e4af4307cb8"]
[<datetime>] chat: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","hash-object","-t","blob","-w","--stdin","--no-filters"]
[<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","log","304263841906c0b4dda39d0fdbe54e4af4307cb8..refs/heads/git-annex","--oneline","-n1"]
(Recording state in git...)
[<datetime>] read: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","write-tree"]
[<datetime>] chat: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","commit-tree","838284a4dbc1c57bea2595ac7636c32a7a86b745","-p","refs/heads/git-annex","-p","304263841906c0b4dda39d0fdbe54e4af4307cb8"]
[<datetime>] call: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","update-ref","refs/heads/git-annex","c594efcf08bd4de8963cc3fb6890275f623aee12"]
[<datetime>] call: wget ["-q","-c","-O","C:\\Users\\test-git-annex\\AppData\\Local\\Temp\\git-annex4860.tmp","http://192.168.0.8:8000/test_annex/.git/config"]
cygwin warning:
  MS-DOS style path detected: C:\Users\test-git-annex\AppData\Local\Temp\git-annex4860.tmp
  Preferred POSIX equivalent is: /cygdrive/c/Users/test-git-annex/AppData/Local/Temp/git-annex4860.tmp
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
[<datetime>] read: git ["config","--null","--list","--file","C:\\Users\\test-git-annex\\AppData\\Local\\Temp\\git-annex4860.tmp"]
[<datetime>] call: git ["--git-dir=C:\\Users\\test-git-annex\\test_annex\\.git","--work-tree=C:\\Users\\test-git-annex\\test_annex","config","remote.origin.annex-uuid","64000156-e66a-11e2-aa76-131bb0a453f3"]
[<datetime>] read: git ["config","--null","--list"]
(from origin...) [<datetime>] call: wget ["-c","-O","C:\\Users\\test-git-annex\\test_annex\\.git\\annex\\tmp\\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729","http://192.168.0.8:8000/test_annex/.git/annex\\objects\\c96\\53e\\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729\\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729"]
cygwin warning:
  MS-DOS style path detected: C:\Users\test-git-annex\test_annex\.git\annex\tmp\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729
  Preferred POSIX equivalent is: /cygdrive/c/Users/test-git-annex/test_annex/.git/annex/tmp/SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
--<datetime>--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729
Connecting to 192.168.0.8:8000... connected.
HTTP request sent, awaiting response... 404 File not found
<datetime> ERROR 404: File not found.

[<datetime>] call: wget ["-c","-O","C:\\Users\\test-git-annex\\test_annex\\.git\\annex\\tmp\\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729","http://192.168.0.8:8000/test_annex/.git/annex\\objects\\J9\\m6\\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729\\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729"]
cygwin warning:
  MS-DOS style path detected: C:\Users\test-git-annex\test_annex\.git\annex\tmp\SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729
  Preferred POSIX equivalent is: /cygdrive/c/Users/test-git-annex/test_annex/.git/annex/tmp/SHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
--<datetime>--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729
Connecting to 192.168.0.8:8000... connected.
HTTP request sent, awaiting response... 404 File not found
<datetime> ERROR 404: File not found.


  Unable to access these remotes: origin

  Try making some of these repositories available:
        64000156-e66a-11e2-aa76-131bb0a453f3 -- origin (laptop)
failed
git-annex: get: 1 failed

"""]]

#### http server output from above

[[!format sh """
192.168.0.2 - - [<datetime>] code 404, message File not found
192.168.0.2 - - [<datetime>] "GET /test_annex/.git/annex%5Cobjects%5Cc96%5C53e%5CSHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729%5CSHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729 HTTP/1.1" 404 -
192.168.0.2 - - [<datetime>] code 404, message File not found
192.168.0.2 - - [<datetime>] "GET /test_annex/.git/annex%5Cobjects%5CJ9%5Cm6%5CSHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729%5CSHA256-s21--6ed275e9e01c84a57fdd99d6af793c5d587d02e699cd2c28b32b7dc90f73e729 HTTP/1.1" 404 -
"""]]

> [[fixed|done]] --[[Joey]]