File: comment_8_a2b5da1ea55a222dd30f0e982d5ee807._comment

package info (click to toggle)
git-annex 10.20230126-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 69,344 kB
  • sloc: haskell: 74,654; javascript: 9,103; sh: 1,304; makefile: 203; perl: 136; ansic: 44
file content (197 lines) | stat: -rw-r--r-- 5,753 bytes parent folder | download | duplicates (8)
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
[[!comment format=mdwn
 username="anarcat"
 subject="works with sync --content, but the assistant is slow to pickup tracking info"
 date="2015-08-19T20:29:46Z"
 content="""
well, this is not exactly the topology i have here.

you setup a topology like this:

    A <- B <-> C

`X <- Y` means `X is a remote of Y`.

My topology is:

    A -> B -> C

So B can't directly manage objects from A. It can *receive* objects from it, but that's it.

So here's a clearer transcript of the session, using the same semantics you have been using for the different repos, but with the remotes setup differently, as I describe above:

<pre>
[1113]anarcat@desktop008:bench$ git init B
Initialized empty Git repository in /home/anarcat/test/bench/B/.git/
[1114]anarcat@desktop008:bench$ cd B/
[1115]anarcat@desktop008:B$ git annex init
init  ok
(recording state in git...)
[1116]anarcat@desktop008:B$ date > somefile
[1117]anarcat@desktop008:B$ git annex add
add somefile ok
(recording state in git...)
[1118]anarcat@desktop008:B$ git commit -madded
[master (root-commit) d2f6177] added
 1 file changed, 1 insertion(+)
 create mode 120000 somefile
[1119]anarcat@desktop008:B$ git annex wanted . \"not inallgroup=backup\"
wanted . ok
(recording state in git...)
[1138]anarcat@desktop008:B$ git remote add C ../C # actually did that later
[1120]anarcat@desktop008:B$ cd ../
[1121]anarcat@desktop008:bench$ git clone -o B B A
Cloning into 'A'...
done.
[1122]anarcat@desktop008:bench$ git clone B C
Cloning into 'C'...
done.
[1123]anarcat@desktop008:bench$ cd A
[1124]anarcat@desktop008:A$ git annex wanted . standard
(merging B/git-annex into git-annex...)
(recording state in git...)
wanted . ok
(recording state in git...)
[1125]anarcat@desktop008:A$ git annex group . source
group . ok
(recording state in git...)
[1126]anarcat@desktop008:A$ cd ../C
[1127]anarcat@desktop008:C$ git annex wanted . standard
(merging origin/git-annex into git-annex...)
(recording state in git...)
wanted . ok
(recording state in git...)
[1128]anarcat@desktop008:C$ git annex group . backup
group . ok
(recording state in git...)
[1142]anarcat@desktop008:C$ git remote rm origin # because this is S3 in production, and can't do anything on its own
</pre>

And of course now, it actually works fine, with `sync --content`:

<pre>
[1144]anarcat@desktop008:A$ git annex sync --content
commit  ok
pull B
remote: Counting objects: 20, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 20 (delta 8), reused 0 (delta 0)
Unpacking objects: 100% (20/20), done.
From /home/anarcat/test/bench/B
   d2f6177..b625a42  master     -> B/master
   0432685..2061cf9  git-annex  -> B/git-annex
ok
(merging B/git-annex into git-annex...)
copy otherfile copy otherfile (to B...) ok
drop otherfile ok
pull B
ok
(recording state in git...)
push B
Counting objects: 8, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (8/8), 720 bytes | 0 bytes/s, done.
Total 8 (delta 3), reused 0 (delta 0)
To /home/anarcat/test/bench/B
   0432685..e0fccbd  git-annex -> synced/git-annex
ok
[1145]anarcat@desktop008:A$ cd ../B
[1146]anarcat@desktop008:B$ git annex sync --content
commit  ok
pull C
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
From ../C
   2061cf9..1d0a3d5  git-annex  -> C/git-annex
ok
(merging C/git-annex into git-annex...)
(recording state in git...)
copy otherfile copy otherfile (to C...) ok
drop otherfile ok
pull C
ok
(recording state in git...)
push C
Counting objects: 20, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (20/20), 1.55 KiB | 0 bytes/s, done.
Total 20 (delta 10), reused 0 (delta 0)
To ../C
   2061cf9..86a892f  git-annex -> synced/git-annex
ok
[1147]anarcat@desktop008:B$ git annex list
here
|C
||web
|||bittorrent
||||
_X__ otherfile
_X__ somefile
</pre>

Now, that's all great for `sync --content` - but what about the assistant?

<pre>
[1150]anarcat@desktop008:B$ git annex assistant
[1151]anarcat@desktop008:B$ cd ../A
[1152]anarcat@desktop008:A$ git annex assistant
[1154]anarcat@desktop008:A$ date > foo
[1157]anarcat@desktop008:A$ git annex list --allrepos
here
|B
||web
|||bittorrent
||||anarcat@desktop008:~/test/bench/C
|||||
_X___ foo
____X otherfile
____X somefile
[1158]anarcat@desktop008:A$ sleep 600; git annex list --allrepos
here
|B
||web
|||bittorrent
||||anarcat@desktop008:~/test/bench/C
|||||
_X___ foo
____X otherfile
____X somefile
</pre>

so from `A`'s perspective, it looks like the file didn't migrate properly. *but* it actually did!

<pre>
[1159]anarcat@desktop008:A$ cd ../B
[1160]anarcat@desktop008:B$ git annex list --allrepos
here
|C
||web
|||bittorrent
||||anarcat@desktop008:~/test/bench/A
|||||
_X___ foo
_X___ otherfile
_X___ somefile
[1161]anarcat@desktop008:B$ cd -
/home/anarcat/test/bench/A
[1162]anarcat@desktop008:A$ git annex list --allrepos
here
|B
||web
|||bittorrent
||||anarcat@desktop008:~/test/bench/C
|||||
_X___ foo
____X otherfile
____X somefile
</pre>

how long does it take for the assistant to start syncs like this? are those timers user-accessible somehow? this problem sure looks like [[bugs/sync-git-annex_branch_not_syncing_in_the_assistant]] - but maybe i'm confused there as well.

anyways, it does seem like content actually does gets synced around properly by the assistant. i'll try to deploy the new preferred content expression in production and report back here.

and sorry for the noisy pastes and hand-holding, but i was thoroughly confused by this one. i thought i had a good grasp on preferred content and all that, but it seems i was wrong... :(
"""]]