Show More
@@ -28,8 +28,9 b' from . import (' | |||
|
28 | 28 | |
|
29 | 29 | def supportedoutgoingversions(orig, repo): |
|
30 | 30 | versions = orig(repo) |
|
31 | versions.discard('01') | |
|
32 |
versions.discard('0 |
|
|
31 | if 'lfs' in repo.requirements: | |
|
32 | versions.discard('01') | |
|
33 | versions.discard('02') | |
|
33 | 34 | versions.add('03') |
|
34 | 35 | return versions |
|
35 | 36 |
@@ -70,21 +70,12 b' non-lfs content, and the extension enabl' | |||
|
70 | 70 | $ grep 'lfs' .hg/requires $SERVER_REQUIRES |
|
71 | 71 | [1] |
|
72 | 72 | |
|
73 | TODO: fail more gracefully, or don't mandate changegroup3 for non-lfs repos. | |
|
74 | ||
|
75 | 73 | $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone |
|
76 | abort: HTTP Error 500: Internal Server Error | |
|
77 | [255] | |
|
78 | 74 | $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES |
|
79 | grep: $TESTTMP/client1_clone/.hg/requires: $ENOENT$ | |
|
80 | [2] | |
|
81 | ||
|
82 | TODO: fail more gracefully, or don't mandate changegroup3 for non-lfs repos. | |
|
75 | [1] | |
|
83 | 76 | |
|
84 | 77 | $ hg init $TESTTMP/client1_pull |
|
85 | 78 | $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT |
|
86 | abort: HTTP Error 500: Internal Server Error | |
|
87 | [255] | |
|
88 | 79 | $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES |
|
89 | 80 | [1] |
|
90 | 81 | |
@@ -104,10 +95,10 b' non-lfs content, and the extension state' | |||
|
104 | 95 | $ echo 'non-lfs' > nonlfs2.txt |
|
105 | 96 | $ hg ci -Aqm 'non-lfs file with lfs client' |
|
106 | 97 | |
|
107 | TODO: fail more gracefully here | |
|
108 | $ hg push -q 2>&1 | grep '^[A-Z]' || true | |
|
109 | Traceback (most recent call last): (lfsremote-off !) | |
|
110 | ValueError: no common changegroup version (lfsremote-off !) | |
|
98 | Since no lfs content has been added yet, the push is allowed, even when the | |
|
99 | extension is not enabled remotely. | |
|
100 | ||
|
101 | $ hg push -q | |
|
111 | 102 |
$ |
|
112 | 103 | [1] |
|
113 | 104 | |
@@ -120,13 +111,8 b' TODO: fail more gracefully here' | |||
|
120 | 111 | $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES |
|
121 | 112 | [1] |
|
122 | 113 | |
|
123 | XXX: The difference here is the push failed above when the extension isn't | |
|
124 | enabled on the server. The extension shouldn't need to mess with changegroup | |
|
125 | versions if there is no lfs content. But the requirement needs to be | |
|
126 | consistently added before that can be ratcheted back. | |
|
127 | 114 | $ hg identify http://localhost:$HGPORT |
|
128 |
1477875038c6 |
|
|
129 | 000000000000 (lfsremote-off !) | |
|
115 | 1477875038c6 | |
|
130 | 116 | |
|
131 | 117 | -------------------------------------------------------------------------------- |
|
132 | 118 |
Case # |
@@ -157,13 +143,11 b' TODO: fail more gracefully here' | |||
|
157 | 143 | $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !) |
|
158 | 144 | $TESTTMP/server/.hg/requires:lfs (lfsremote-on !) |
|
159 | 145 | |
|
160 |
|
|
|
161 | enabled on the server. The extension shouldn't need to mess with changegroup | |
|
162 | versions if there is no lfs content. But the requirement needs to be | |
|
163 | consistently added before that can be ratcheted back. | |
|
146 | The difference here is the push failed above when the extension isn't | |
|
147 | enabled on the server. | |
|
164 | 148 | $ hg identify http://localhost:$HGPORT |
|
165 | 149 | 8374dc4052cb (lfsremote-on !) |
|
166 |
|
|
|
150 | 1477875038c6 (lfsremote-off !) | |
|
167 | 151 | |
|
168 | 152 |
|
|
169 | 153 |
|
@@ -290,10 +274,6 b' Misc: process dies early if a requiremen' | |||
|
290 | 274 |
ValueError: |
|
291 | 275 |
|
|
292 | 276 |
ValueError: |
|
293 | Traceback (most recent call last): | |
|
294 | ValueError: no common changegroup version | |
|
295 | Traceback (most recent call last): | |
|
296 | ValueError: no common changegroup version | |
|
297 | 277 | #else |
|
298 | 278 |
$ |
|
299 | 279 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now