gpush: revamp initialize_get_changes()


try to extract the branch from the $from revspec prior to trying to
resolve it. this has roughly the same cost in case of expected failure
(that is, when the revspec uses a Change-Id), but it is a lot cleaner,
as we need only a little more code in determine_local_branch() (and by
extension branch_for_commit()), while parse_local_rev_id() disappears,
which enables a massive consolidation of parse_local_rev().

Change-Id: If864848c302809e3ba444be9f4ac2a4133e26111
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commit01777414c134c81794039002a069a3cd6be12e54
parent653cc89b49e81a4c349fcdf31031f2642d66d0c6
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>
commit timeTue, 9 Jan 2024 16:39:14 +0000