sapling/edenscm
Zeyi Fan 6aa90444ab fix used before assignment error
Summary:
I'm getting reports on Eden failed to import data from Mercurial. One of the error message I have seen is `local variable 'rcvd' referenced before assignment` (unfortunately we don't have the backtrace to locate the exact problem), and this is the only place in our codebase has a variable named `rcvd`.

The log contains this error: P62827869$210-217

So if there is any exception raised in `self._connect`, `rcvd` and `total` will not be initialized, and these variables are being used to log the error message in the `except` block:

diffusion/FBS/browse/master/fbcode/scm/hg/edenscm/hgext/remotefilelog/fileserverclient.py;18aa2052b752f1255dd53474d541c4a4177bfef5$732-737

Reviewed By: quark-zju

Differential Revision: D15069162

fbshipit-source-id: 16ec56820107fbbb24d426ce309b38a88d7eae5b
2019-04-25 10:25:44 -07:00
..
hgdemandimport codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
hgext fix used before assignment error 2019-04-25 10:25:44 -07:00
mercurial revset: use path instead of relpath in follow() 2019-04-24 17:33:43 -07:00
__init__.py codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00