Support negative ref filter syntax (similar to log filter)

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
Remove variable reassignments

Based on TortoiseSVN revision 25878

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
Fix typo

Based on TortoiseSVN revision 25874

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>