pretxnchangegroup hook fails for Mercurial 1.4

Issue #20 on hold
Michael Rapson
created an issue

I realise that Mercurial 1.4 was released in 2010 and is now fairly old, but noted that pretxnchangegroup hook fails for this version of Mercurial. My investigations into the issue showed:

line 474 "for rev in revrange(repo, ['%s::' % node]):" fails due to the second ':'. (Does revrange accept this notation for newer Mercurial versions? I have not been able to find good documentation about the notation that revrange accepts.)

If the second ':' on line 474, discussed above, is removed, then line 355 fails. This is because patch.diffui is not available in Mercurial 1.4. Is there a suitable substitute available in Mercurial 1.4? I have not been able to get beyond this error.

Comments (3)

  1. Marcus Lindblom Sonestedt repo owner

    If you can provide a workaround as a pull-request, I'll be happy to accept it.

    I haven't been on 1.4 for quite a while, and the Mercurial API is rather tricky to dig through, so I don't have a ready solution myself.

  2. Michael Rapson reporter

    Thanks for your reply. Currently the "workaround" we are using is to simply not enable the pretxnchangegroup hook on the machine running Mercurial 1.4. (Ubuntu 10.04 LTS still uses Mercurial 1.4 as the standard version.) This is working for the moment because I am on a small development team so we can ensure the commit hook is used consistently. I don't have any experience with the Mercurial API, and fairly limited experience with Python even, but if you can refer me to the best sites to look at (ones that you have used and can recommend) about the Mercurial API, I will try to find a replacement for the diffui command. Thanks again.

  3. Log in to comment