Steve Borho <[email protected]> writes:

> This patch works for me.  I'm waiting to hear from Martin whether this
> is a good idea or not.  FWIW, this is what the progress extension also
> does:
>
> diff -r a424fa60e742 hgext/eol.py
> --- a/hgext/eol.py
> +++ b/hgext/eol.py
> @@ -145,6 +145,7 @@
>
>
>  def reposetup(ui, repo):
> +    uisetup(repo.ui)
>      #print "reposetup for", repo.root
>
>      if not repo.local():

Oh, interesting :) My first reaction was that calling uisetup from
reposetup is a bit funky... uisetup is just a single line:

  def uisetup(ui):
      ui.setconfig('hooks', 'preupdate.eol', preupdate)

so why not inline it in reposetup?

One reason is that it breaks the tests -- test-eol-update fails, though
I am not sure exactly why. It is strange since merge.update calls
repo.hook on line 519:

  if not partial:
      repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2)

and repo.hook uses repo.ui to look for the hooks. So one would expect it
to be enough to set the hooks on the repo.ui object, which is passed in
as the ui argument to reposetup.

I'm afraid I don't have time to trace it further right now, so please
put in the patch.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/

Attachment: pgpeQuaGaWoqC.pgp
Description: PGP signature

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to