Fix handling of empty files in SVN in some cases.
Review Request #7002 — Created March 3, 2015 and submitted — Latest diff uploaded
We ensure that the
base
andtip
variables are defined before they
are referenced. Static analysis (via PyCharm) determines that the
variables are now always assigned before referencing.
Ran unit tests.
Before applying this patch, running
rbt diff
in an SVN repo against
two changesets that add an empty file and delete an empty file would
cause rbt to crash with the message:
CRITICAL: local variable 'base' referenced before assignment
.
After applying this patch, this problem no longer persists. The output
ofrbt diff
has the correct revision numbers in this case.