This is an archive of the discontinued Mercurial Phabricator instance.

remotefilelog: actually fix (and test this time) a bytes vs str issue
ClosedPublic

Authored by spectral on Jan 2 2020, 10:56 PM.

Details

Summary

I attempted this in 94670e124d29 but we didn't actually have any tests for this
function it seems, and I mistook "it works now" for it being fixed (when what
had actually happened was that my cache had populated enough that I didn't
trigger the minimum threshold on my reattempts).

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

spectral created this revision.Jan 2 2020, 10:56 PM

D7729 was my attempt at fixing it. Your patch is clearly better since it includes a test. I'll abandon mine.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
pulkit added a subscriber: pulkit.Jan 8 2020, 6:59 AM
pulkit added inline comments.
tests/test-remotefilelog-prefetch.t
253

test-check-code.t fails now:

--- /home/pulkitg/repo/hgpush/tests/test-check-code.t
+++ /home/pulkitg/repo/hgpush/tests/test-check-code.t.err
@@ -32,6 +32,10 @@
   Skipping i18n/polib.py it has no-che?k-code (glob)
   Skipping mercurial/statprof.py it has no-che?k-code (glob)
   Skipping tests/badserverext.py it has no-che?k-code (glob)
+  tests/test-remotefilelog-prefetch.t:253:
+   >         except:
+   naked except clause
+  [1]
 
 @commands in debugcommands.py should be in alphabetical order.
 

ERROR: test-check-code.t output changed

Can you send a followup?