Allow to correct upgrade repos (bnc#889791)

Old style client. Writing proper tests would mean quite a big refactoring (believe me, I started doing it), which looks like a too big change for maintenance (most likely to be distributed as DUD for SLE12). I agreed with @kobliha that in order to merge it should be manually tested by me (already done) and another person.

So I'm not only looking for code review but also for manual testing.
The parameter name (`url`) is misleading, it's not an URL. It's a repository `Hash`, it should be named `repo` or `repo_hash`...