On Thu, Sep 16, 2010 at 4:38 PM, Steve Borho <[email protected]> wrote: > On Wed, Sep 15, 2010 at 5:25 PM, Martin Geisler <[email protected]> wrote: >> 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. > > I had a look at the test failure and I believe it has exposed a bug in > the test outputs. > > The test is doing a backward update to a revision with an .hgeol file > with contents: > > [patterns] > **.txt = LF > > In the previous test outputs, the eol extension was using the contents > of .hgeol from when the update began (the old working parent, where > EOL was CRLF). In the new test results, the eol extension is reading > the contents of .hgeol from the revision being update to. Which I > believe is more correct. After the update, the file's EOL is > consistent with the new parent's EOLN configuration, and diff only > shows textual changes.
And my final comment on this issue: the latest nightly stable builds have this eol fix in them. -- Steve Borho ------------------------------------------------------------------------------ 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

