summaryrefslogtreecommitdiff
path: root/doc/bugs/windows_port_-_can__39__t_directly_access_files.mdwn
blob: cb2e650d0a353d0fae2ebabd2432d6bf3ee2888d (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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
### Please describe the problem.
Using the windows port of git annex, I'm unable to directly access files that are retrieved from a remote ssh repository. Instead, the file contains a reference to ../.git/annex/objects....

**Update** This appears to be a problem with remote bare repositories only. I was able to get from a remote regular git repository without the stand-in symlinks. The stand-in symlink file gets replaced with the real content on "get" using a non-base repository.

### What steps will reproduce the problem?

[[!format sh """
** on ssh server **

git init --bare annex.git
cd annex.git
git annex init origin

** on windows laptop - add content main repository ** 
git init annex
cd annex
git annex init laptop

git remote add origin ssh://xxxxx/~/annex.git
echo hello > foo.txt
git annex add .
git commit -m "done"
git annex sync
git annex copy --to origin
git annex sync
git annex whereis foo.txt

** on windows laptop - backup repository **

cd ..
git init annex.backup
cd annex.backup
git annex init "backup"
git remote add origin ssh://joebo@xxxxx.com/~/annex.git
git fetch origin
git merge origin/synced/master
git annex sync
git annex get .
find . | xargs grep hello
./.git/annex/objects/d91/b11/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7
163af34d08286a2e846f6be03.txt/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc
7163af34d08286a2e846f6be03.txt:hello

** updating the file from windows laptop **
cd ..\annex
echo hello2 > foo.txt
git annex add .
git commit -m "updated"
git annex sync
git annex copy --to origin
git annex sync	

cd ..\annex.backup
git fetch origin
git merge origin/synced/master
get annex sync
git annex get .
find . | xargs grep hello2
./.git/annex/objects/7ed/895/SHA256E-s9--3f70947299d2926028fd0107c4309e65ca33a9a
e0175fc4bc57792ca17240d18.txt/SHA256E-s9--3f70947299d2926028fd0107c4309e65ca33a9
ae0175fc4bc57792ca17240d18.txt:hello2
"""]]



### What version of git-annex are you using? On what operating system?

	git-annex version: 4.20130601-gc01f842
	build flags: Pairing Testsuite S3 WebDAV DNS
	local repository version: 4
	default repository version: 3
	supported repository versions: 3 4
	upgrade supported from repository versions: 2


### Please provide any additional information below.

[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log

joebo@joebo:~$ sudo rm -rf annex.git
joebo@joebo:~$ git init --bare annex.git
Initialized empty Git repository in /home/joebo/annex.git/
joebo@joebo:~$ cd annex.git
joebo@joebo:~/annex.git$ git annex init origin
init origin ok



C:\Users\joebo>cd annex

C:\Users\joebo\annex>git annex init laptop
init laptop
  Detected a crippled filesystem.

  Enabling direct mode.

  Detected a filesystem without fifo support.

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

C:\Users\joebo\annex>
C:\Users\joebo\annex>git remote add origin ssh://joebo@xxxxx.com/~
cho hello > foo.txt

C:\Users\joebo\annex>git annex add .
add foo.txt (checksum...) ok
(Recording state in git...)

C:\Users\joebo\annex>git commit -m "done"
[master (root-commit) 7f54efa] done
 1 file changed, 1 insertion(+)
 create mode 120000 foo.txt

C:\Users\joebo\annex>git annex sync
commit
ok
pull origin
warning: no common commits
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
From ssh://xxxxx.com/~/annex
 * [new branch]      git-annex  -> origin/git-annex
ok
(merging origin/git-annex into git-annex...)
(Recording state in git...)
push origin
Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (16/16), 1.48 KiB, done.
Total 16 (delta 1), reused 0 (delta 0)
To ssh://joebo@xxxxx.com/~/annex.git
 * [new branch]      git-annex -> synced/git-annex
 * [new branch]      master -> synced/master
ok

C:\Users\joebo\annex>git annex copy --to origin
copy foo.txt (checking origin...) (to origin...)
foo.txt
           0 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)

sent 67 bytes  received 31 bytes  65.33 bytes/sec
total size is 0  speedup is 0.00
ok
(Recording state in git...)

C:\Users\joebo\annex>git annex sync
commit
ok
pull origin
ok
push origin
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 446 bytes, done.
Total 5 (delta 1), reused 0 (delta 0)
To ssh://joebo@xxxxx.com/~/annex.git
   ed1a701..c4c9cd0  git-annex -> synced/git-annex
ok

C:\Users\joebo\annex>git annex whereis foo.txt
whereis foo.txt (2 copies)
        03573d86-d460-11e2-8500-ebab2910b225 -- origin
        3b6b60fb-0979-4869-98de-38208182ab92 -- here (laptop)
ok


C:\Users\joebo\annex>cd ..

C:\Users\joebo>git init annex.backup
Initialized empty Git repository in C:/Users/joebo/annex.backup/.git/

C:\Users\joebo>cd annex.backup

C:\Users\joebo\annex.backup>git annex init "backup"
init backup
  Detected a crippled filesystem.

  Enabling direct mode.

  Detected a filesystem without fifo support.

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

C:\Users\joebo\annex.backup>git remote add origin ssh://joebo@xxxxx.com/~/anne
x.git

C:\Users\joebo\annex.backup>git fetch origin
warning: no common commits
remote: Counting objects: 25, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 25 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (25/25), done.
From ssh://xxxxx.com/~/annex
 * [new branch]      git-annex  -> origin/git-annex
 * [new branch]      synced/git-annex -> origin/synced/git-annex
 * [new branch]      synced/master -> origin/synced/master

C:\Users\joebo\annex.backup>git merge origin/synced/master

C:\Users\joebo\annex.backup>git annex sync
(merging origin/git-annex origin/synced/git-annex into git-annex...)
(Recording state in git...)
commit
ok
pull origin
ok
push origin
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (8/8), 818 bytes, done.
Total 8 (delta 2), reused 0 (delta 0)
To ssh://joebo@xxxxx.com/~/annex.git
   c4c9cd0..f403560  git-annex -> synced/git-annex
ok

C:\Users\joebo\annex.backup>git annex get .
get foo.txt (from origin...)
SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.txt

           0 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)

sent 30 bytes  received 145 bytes  116.67 bytes/sec
total size is 0  speedup is 0.00
ok
(Recording state in git...)

C:\Users\joebo\annex.backup>cat foo.txt
.git/annex/objects/fW/Gk/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649
b934ca495991b7852b855.txt/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e464
9b934ca495991b7852b855.txt
C:\Users\joebo\annex.backup>ls
foo.txt


# End of transcript or log.
"""]]

> [[done]]; see my comment. --[[Joey]]