5 # this is hardcoded; change it if needed
9 # test script for partial copy feature
10 # ----------------------------------------------------------------------
13 try
"DEF POK = !/DENIED/; !/failed to push/";
18 perl s/GIT_CONFIG_KEYS.*/GIT_CONFIG_KEYS => '.*',/
19 perl s/# 'partial-copy'/'partial-copy'/
32 RW refs/tags/USER/ = u4
34 - VREF/partial-copy = @all
35 config gitolite.partialCopyOf = foo
38 try
"ADMIN_PUSH set1; !/FATAL/" or die text
();
41 /Init.*empty.*foo\\.git/
42 /Init.*empty.*foo-pc\\.git/
48 ## populate repo foo, by user u1
49 # create foo with a bunch of branches and tags
54 checkout -b dev/u1/foo; tc f1 f2
55 checkout master; tc m1 m2
56 checkout master; checkout -b next; tc n1 n2; tag nt1
57 checkout -b secret-1; tc s11 s12; tag s1t1
58 checkout next; checkout -b secret-2; tc s21 s22; tag s2t1
60 /new branch/; /secret-1/; /secret-2/
62 /new tag/; /s1t1/; /s2t1/
64 ## user u4 tries foo, fails, tries foo-pc
66 CLONE u4 foo foo4; !ok
67 /R any foo u4 DENIED by fallthru/
69 /Cloning into 'foo-pc'/
70 /new branch.* dev/u1/foo .* dev/u1/foo/
71 /new branch.* master .* master/
72 /new branch.* next .* next/
73 /new branch.* secret-2 .* secret-2/
74 !/new branch.* secret-1 .* secret-1/
75 /new tag.* nt1 .* nt1/
76 /new tag.* s2t1 .* s2t1/
77 !/new tag.* s1t1 .* s1t1/
79 ## user u4 pushes to foo-pc
82 tc u4m1 u4m2; PUSH u4; !ok
83 /W refs/heads/master foo-pc u4 DENIED by fallthru/
84 /hook declined to update refs/heads/master/
87 /failed to push some refs to 'file:///foo-pc'/
93 /new reference\\] ca3787119b7e8b9914bc22c939cefc443bc308da -> refs/partial/br-\\d+/
95 /52c7716..ca37871 next -> next/
96 tag u4/nexttag; glt push u4 --tags
98 /\\[new tag\\] u4/nexttag +-> +u4/nexttag/
99 /\\[new reference\\] ca3787119b7e8b9914bc22c939cefc443bc308da -> refs/partial/br-\\d+/
102 checkout -b dev/u4/u4master
106 /new reference\\] 228353950557ed1eb13679c1fce4d2b4718a2060 -> refs/partial/br-\\d+/
108 /new branch.* HEAD -> dev/u4/u4master/
110 ## user u1 gets u4's updates, makes some more
114 /new branch\\] dev/u4/u4master -> origin/dev/u4/u4master/
115 /new tag\\] u4/nexttag +-> +u4/nexttag/
116 /52c7716..ca37871 next +-> +origin/next/
117 checkout master; tc u1ma1 u1ma2;
118 /\\[master 8ab1ff5\\] u1ma2 at Thu Jul 7 06:23:20 2011/
119 tag mt2; PUSH u1 master; ok
120 checkout secret-1; tc u1s1b1 u1s1b2
121 /\\[secret-1 5f96cb5\\] u1s1b2 at Thu Jul 7 06:23:20 2011/
122 tag s1t2; PUSH u1 HEAD; ok
123 checkout secret-2; tc u1s2b1 u1s2b2
124 /\\[secret-2 1ede682\\] u1s2b2 at Thu Jul 7 06:23:20 2011/
125 tag s2t2; PUSH u1 HEAD; ok
126 glt push u1 --tags; ok
128 glt ls-remote u1 origin
129 /8ab1ff512faf5935dc0fbff357b6f453b66bb98b\trefs/tags/mt2/
130 /5f96cb5ff73c730fb040eb2d01981f7677ca6dba\trefs/tags/s1t2/
131 /1ede6829ec7b75a53cd6acb7da64e5a8011e6050\trefs/tags/s2t2/
133 ## u4 gets updates but without the tag in secret-1
135 glt ls-remote u4 origin
136 !/ refs/heads/secret-1/; !/s1t1/; !/s1t2/
137 /8ab1ff512faf5935dc0fbff357b6f453b66bb98b\tHEAD/
138 /8ced4a374b3935bac1a5ba27ef8dd950bd867d47\trefs/heads/dev/u1/foo/
139 /228353950557ed1eb13679c1fce4d2b4718a2060\trefs/heads/dev/u4/u4master/
140 /8ab1ff512faf5935dc0fbff357b6f453b66bb98b\trefs/heads/master/
141 /ca3787119b7e8b9914bc22c939cefc443bc308da\trefs/heads/next/
142 /1ede6829ec7b75a53cd6acb7da64e5a8011e6050\trefs/heads/secret-2/
143 /8ab1ff512faf5935dc0fbff357b6f453b66bb98b\trefs/tags/mt2/
144 /52c7716c6b029963dd167c647c1ff6222a366499\trefs/tags/nt1/
145 /01f04ece6519e7c0e6aea3d26c7e75e9c4e4b06d\trefs/tags/s2t1/
146 /1ede6829ec7b75a53cd6acb7da64e5a8011e6050\trefs/tags/s2t2/
149 /3ea704d..8ab1ff5 master -> origin/master/
150 /01f04ec..1ede682 secret-2 -> origin/secret-2/
151 /\\[new tag\\] mt2 -> mt2/
152 /\\[new tag\\] s2t2 -> s2t2/
153 !/ refs/heads/secret-1/; !/s1t1/; !/s1t2/
158 glt ls
-remote u4 file
:///foo
-pc
161 cat conf
/gitolite
.conf
162 perl
s/.*marker 01.*//;
163 put conf
/gitolite
.conf
164 add conf
; commit
-m erdel
; ok
; PUSH admin
; ok
166 glt ls
-remote u4 file
:///foo
-pc
167 # see rant below at this point
169 cd
$h/repositories/foo
-pc
.git
170 git branch
-D secret
-2
173 glt ls
-remote u4 file
:///foo
-pc
174 # only *now* does the rant get addressed
180 This is where things go all screwy
. Because we still have the
*objects
*
181 pointed to by tags s2t1
and s2t2
, we still get them back from the main repo
.