-
Manuel Jacob authored
(folded with intermediate revision with new message by Georges Racinet) The previous conditional was wrong: in current Mercurial, 'co' is in principle not an integer. The condition on integer has been introduced for the port to py3, but does not change the fact that changelog.__contains__ is for integers. The original intent in a90fe3e8a8c3 was probably to exclude local repositories, but this had the side effect of setting `co=None` in all cases, hence affecting pulls having nothing to do with hg-git, as the new test demontstrates. What we really want is to force `co=None` only for remote Git repositories, for the reasons explained in the comment. Previous intermediate commit was cleanup: eliminate if statement with condition that is always true 'co' is never an integer. It’s always None or of type bytes. Apparently 'co' was of type int some years ago. A proper fix would require to fix the lookup() remote command or change hg to not require it e.g. when pulling with -r. For now, let’s remove the broken code and be honest about that we give up.
Manuel Jacob authored(folded with intermediate revision with new message by Georges Racinet) The previous conditional was wrong: in current Mercurial, 'co' is in principle not an integer. The condition on integer has been introduced for the port to py3, but does not change the fact that changelog.__contains__ is for integers. The original intent in a90fe3e8a8c3 was probably to exclude local repositories, but this had the side effect of setting `co=None` in all cases, hence affecting pulls having nothing to do with hg-git, as the new test demontstrates. What we really want is to force `co=None` only for remote Git repositories, for the reasons explained in the comment. Previous intermediate commit was cleanup: eliminate if statement with condition that is always true 'co' is never an integer. It’s always None or of type bytes. Apparently 'co' was of type int some years ago. A proper fix would require to fix the lookup() remote command or change hg to not require it e.g. when pulling with -r. For now, let’s remove the broken code and be honest about that we give up.