summaryrefslogtreecommitdiff
path: root/doc/bugs/addurl_--batch_from_url_from_a_custom_special_remote_adds_to_annex_disregarding_largefiles___40__on_first_run__41__.mdwn
blob: 59278794b6038a2822731768bb414a3d377d6e70 (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
### Please describe the problem.

I am a bit unsure what is going on ;)

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

6.20160118+gitgdaf852e-1~ndall+1

### Please provide any additional information below.

[[!format sh """

$ chmod a+w -R /tmp/123; rm -rf /tmp/123; mkdir /tmp/123; cd /tmp/123; git init; git annex init;
chmod: cannot access ‘/tmp/123’: No such file or directory
Initialized empty Git repository in /tmp/123/.git/
init  ok
(recording state in git...)

$ git annex addurl --file svgtune_0.2.0.orig.tar.gz http://http.debian.net/debian/pool/main/s/svgtune/svgtune_0.2.0.orig.tar.gz
addurl svgtune_0.2.0.orig.tar.gz (downloading http://http.debian.net/debian/pool/main/s/svgtune/svgtune_0.2.0.orig.tar.gz ...) 
/tmp/123/.git/annex/tmp/URL-s5121--http&c%%http.debian. 100%[===============================================================================================================================>]   5.00K  --.-KB/s    in 0s      
ok
(recording state in git...)

$ ls -l svgtune_0.2.0.orig.tar.gz 
lrwxrwxrwx 1 yoh yoh 198 Jan 19 14:29 svgtune_0.2.0.orig.tar.gz -> .git/annex/objects/K6/j2/SHA256E-s5121--6d8f7d10206a120a42bec2cd29bc2365d09889fdf070ac8c67d1cff0b1539f63.tar.gz/SHA256E-s5121--6d8f7d10206a120a42bec2cd29bc2365d09889fdf070ac8c67d1cff0b1539f63.tar.gz

$ git annex info
repository mode: indirect
trusted repositories: 0
semitrusted repositories: 3
	00000000-0000-0000-0000-000000000001 -- web
 	00000000-0000-0000-0000-000000000002 -- bittorrent
 	1087c63f-e325-41ff-9c45-bbc493aa42f1 -- yoh@hopa:/tmp/123 [here]
untrusted repositories: 0
transfers in progress: none
available local disk space: 1 gigabyte (+1 megabyte reserved)
local annex keys: 1
local annex size: 5.12 kilobytes
annexed files in working tree: 1
size of annexed files in working tree: 5.12 kilobytes
bloom filter size: 32 mebibytes (0% full)
backend usage: 
	SHA256E: 1

$ git annex initremote datalad-archives externaltype=dl+archive type=external autoenable=true encryption=none 
initremote datalad-archives ok
(recording state in git...)

$ echo "dl+archive:SHA256E-s5121--6d8f7d10206a120a42bec2cd29bc2365d09889fdf070ac8c67d1cff0b1539f63.tar.gz/svgtune-0.2.0/README.rst README.rst" | git annex addurl -c annex.largefiles=exclude=*.rst --with-files --json --batch 
{"command":"addurl","file":"README.rst","note":"from datalad-archives","success":true}                                                                                                                                         

$ ls -l README.rst 
lrwxrwxrwx 1 yoh yoh 192 Jan 19 14:33 README.rst -> .git/annex/objects/V4/3p/SHA256E-s2126--76cea2921af6b250b9bcde3a99785d1010d657cbc6781f01cd7a7886708c441f.rst/SHA256E-s2126--76cea2921af6b250b9bcde3a99785d1010d657cbc6781f01cd7a7886708c441f.rst

$ echo "http://www.onerussian.com/tmp/README2.rst README2.rst" | git annex addurl -c annex.largefiles=exclude=*.rst --with-files --json --batch        
{"command":"addurl","file":"README2.rst","note":"downloading http://www.onerussian.com/tmp/README2.rst ...","note":"non-large file; adding content to git repository","success":true}

$ ls -l README2.rst
-rw------- 1 yoh yoh 13 Jan 19 14:34 README2.rst

$ echo "dl+archive:SHA256E-s5121--6d8f7d10206a120a42bec2cd29bc2365d09889fdf070ac8c67d1cff0b1539f63.tar.gz/svgtune-0.2.0/Makefile Makefile" | git annex addurl --debug -c annex.largefiles=exclude=*Makefile --with-files --json --batch                                                                                                                                                                                                    
{"command":"addurl","file":"Makefile","note":"from datalad-archives","note":"non-large file; adding content to git repository","success":true}

$ echo "dl+archive:SHA256E-s5121--6d8f7d10206a120a42bec2cd29bc2365d09889fdf070ac8c67d1cff0b1539f63.tar.gz/svgtune-0.2.0/README.rst README-2.rst" | git annex addurl -c annex.largefiles=exclude=*.rst --with-files --json --batch                                                                                                                                          
{"command":"addurl","file":"README-2.rst","note":"from datalad-archives","note":"non-large file; adding content to git repository","success":true}


"""]]

and to re-confirm  that only for the first file, I am redoing above but first asking to addurl Makefile (goes errorneously to annex) and then README.rst (goes to git as it should)

[[!format sh """
$ chmod a+w -R /tmp/123; rm -rf /tmp/123; mkdir /tmp/123; cd /tmp/123; git init; git annex init;
Initialized empty Git repository in /tmp/123/.git/
init  ok
(recording state in git...)

$ git annex addurl --file svgtune_0.2.0.orig.tar.gz http://http.debian.net/debian/pool/main/s/svgtune/svgtune_0.2.0.orig.tar.gz
addurl svgtune_0.2.0.orig.tar.gz (downloading http://http.debian.net/debian/pool/main/s/svgtune/svgtune_0.2.0.orig.tar.gz ...) 
/tmp/123/.git/annex/tmp/URL-s5121--http&c%%http.debian. 100%[===============================================================================================================================>]   5.00K  --.-KB/s    in 0s      
ok
(recording state in git...)

$ git annex initremote datalad-archives externaltype=dl+archive type=external autoenable=true encryption=none
initremote datalad-archives ok
(recording state in git...)

$ echo "dl+archive:SHA256E-s5121--6d8f7d10206a120a42bec2cd29bc2365d09889fdf070ac8c67d1cff0b1539f63.tar.gz/svgtune-0.2.0/Makefile Makefile" | git annex addurl --debug -c annex.largefiles=exclude=*Makefile --with-files --json --batch                                                                                                                                                                                                                         
{"command":"addurl","file":"Makefile","note":"from datalad-archives","success":true}                                                                   

$ echo "dl+archive:SHA256E-s5121--6d8f7d10206a120a42bec2cd29bc2365d09889fdf070ac8c67d1cff0b1539f63.tar.gz/svgtune-0.2.0/README.rst README.rst" | git annex addurl -c annex.largefiles=exclude=*.rst --with-files --json --batch
{"command":"addurl","file":"README.rst","note":"from datalad-archives","note":"non-large file; adding content to git repository","success":true}

"""]]

### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)