##// END OF EJS Templates
phabricator: fix a phabsend crash when processing a renamed binary...
Matt Harbison -
r44848:d1177d39 stable
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
@@ -892,7 +892,7 b' def addadded(pdiff, ctx, added, removed)'
892 if fctx.isbinary() or notutf8(fctx):
892 if fctx.isbinary() or notutf8(fctx):
893 makebinary(pchange, fctx)
893 makebinary(pchange, fctx)
894 if renamed:
894 if renamed:
895 addoldbinary(pchange, fctx, originalfname)
895 addoldbinary(pchange, fctx)
896 else:
896 else:
897 maketext(pchange, ctx, fname)
897 maketext(pchange, ctx, fname)
898
898
@@ -156,6 +156,54 b' Phabesending a new binary, a modified bi'
156 D8009 - created - af55645b2e29: remove binary
156 D8009 - created - af55645b2e29: remove binary
157 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/aa24a81f55de-a3a0cf24-phabsend.hg
157 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/aa24a81f55de-a3a0cf24-phabsend.hg
158
158
159 Phabsend a renamed binary and a copied binary, with and without content changes
160 to src and dest
161
162 >>> open('bin2', 'wb').write(b'\0c') and None
163 $ hg ci -Am 'add another binary'
164 adding bin2
165
166 TODO: "bin2" can't be viewed in this commit (left or right side), and the URL
167 looks much different than when viewing "bin2_moved". No idea if this is a phab
168 bug, or phabsend bug. The patch (as printed by phabread) look reasonable
169 though.
170
171 $ hg mv bin2 bin2_moved
172 $ hg ci -m "moved binary"
173
174 Note: "bin2_moved" is also not viewable in phabricator with this review
175
176 $ hg cp bin2_moved bin2_copied
177 $ hg ci -m "copied binary"
178
179 Note: "bin2_moved_again" is marked binary in phabricator, and both sides of it
180 are viewable in their proper state. "bin2_copied" is not viewable, and not
181 listed as binary in phabricator.
182
183 >>> open('bin2_copied', 'wb').write(b'\0move+mod') and None
184 $ hg mv bin2_copied bin2_moved_again
185 $ hg ci -m "move+mod copied binary"
186
187 Note: "bin2_moved" and "bin2_moved_copy" are both marked binary, and both
188 viewable on each side.
189
190 >>> open('bin2_moved', 'wb').write(b'\0precopy mod') and None
191 $ hg cp bin2_moved bin2_moved_copied
192 >>> open('bin2_moved', 'wb').write(b'\0copy src+mod') and None
193 $ hg ci -m "copy+mod moved binary"
194
195 $ hg phabsend -r .~4:: --test-vcr "$VCR/phabsend-binary-renames.json"
196 uploading bin2@f42f9195e00c
197 D8128 - created - f42f9195e00c: add another binary
198 D8129 - created - 834ab31d80ae: moved binary
199 D8130 - created - 494b750e5194: copied binary
200 uploading bin2_moved_again@25f766b50cc2
201 D8131 - created - 25f766b50cc2: move+mod copied binary
202 uploading bin2_moved_copied@1b87b363a5e4
203 uploading bin2_moved@1b87b363a5e4
204 D8132 - created - 1b87b363a5e4: copy+mod moved binary
205 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/f42f9195e00c-e82a0769-phabsend.hg
206
159 Phabreading a DREV with a local:commits time as a string:
207 Phabreading a DREV with a local:commits time as a string:
160 $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285
208 $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285
161 # HG changeset patch
209 # HG changeset patch
General Comments 0
You need to be logged in to leave comments. Login now