Fix an UnboundLocalError when using --diff-filename.
Fix an UnboundLocalError when using --diff-filename.

The calculation of the changenum/commit ID was trying to reference a variable
that wasn't set using --diff-filename. This change fixes it.

Testing done:
Posted this change using --diff-filename.

Fixes bug 3908.

Reviewed at https://reviews.reviewboard.org/r/7482/

haosdent/rbtools,davidt/rbtools,davidt/rbtools,beol/rbtools,haosdent/rbtools,beol/rbtools,beol/rbtools,davidt/rbtools,haosdent/rbtools,datjwu/rbtools,reviewboard/rbtools,reviewboard/rbtools,datjwu/rbtools,datjwu/rbtools,reviewboard/rbtools