My intervention into the diff system seems to have come undone.  I 
upgraded thg (now at 2.7) and it overwrote the changes I made to 
MergeTools.rc.  I think I have restored the changes (details in the 
quoted message below), but diff's are no longer running through my 
custom script.

Any ideas what's going on?

BTW, it's fair enough my changes were overwritten since they are under 
program files.  But is there a way to make them persistent? It didn't 
look to me as if I could insert the rules in my Mercurial.ini, but 
perhaps I'm wrong.

I tried shutting down the workbench (to assure a reload of the config 
files), but it didn't help

Ross Boylan
On 10/11/2012 4:50 PM, Ross Boylan wrote:
> On 10/5/2012 1:52 PM, Ross Boylan wrote:
>> On 10/5/2012 1:12 PM, Steve Borho wrote:
>>> On Fri, Oct 5, 2012 at 2:32 PM, Ross Boylan <[email protected]> 
>>> wrote:
>>>> I have output files that tend to differ in ways I don't care about
>>>> between runs; in particular there is date stamp at the top of every 
>>>> page.
>>>> I would like to be able to avoid having those differences detected, so
>>>> that it is easier to tell if anything has changed.
>>>>
>>>> If I could process the file before the diff tools get it, that would
>>>> solve the problem.  I think doing this extra processing based on the
>>>> file extension would suffice, though it might be nice to have some 
>>>> other
>>>> way to control it.
>>>>
>>>> How can I do this?  I can write a little python script to do the
>>>> transform, but I don't know how to hook it up.
>>>>
>>>> The GUI seems to permit only the tools that tortoisehg autodetects. 
>>>> If I
>>>> could tell it to run my script I think I'd have a solution.
>>> You need to register your script as a diff/merge tool.  See
>>> contrib/mergetools.rc in the TortoiseHg repo
>>>
>>> https://bitbucket.org/tortoisehg/thg/src/tip/contrib/mergetools.rc
> For the record, here's how I did it, along with some general 
> discoveries about MergeTools.rc.
> I used a lot of hard-coded paths and catered to the one case I cared 
> about (2 way diff).  I also made no effort to clean up the temp files; 
> on the other hand, the basic machinery seems to leave them around 
> anyway--which was quite convenient for testing.
>
> Releasing this under GPL 2 or 3.
>
> 1)  c:/Program Files/TortoiseHg/hgrc.d/MergeTools.rc
> add these lines (modified from kdiff3 entries)
> wrapper.priority=10
> wrapper.args=--auto --L1 base --L2 parent1 --L3 parent2 $base $local 
> $other -o $output
> wrapper.executable=c:/Program Files/TortoiseHg/wrapper.bat
> wrapper.fixeol=False
> wrapper.premerge=False
> wrapper.gui=True
> wrapper.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
>
> 2) wrapper.bat is
> C:/Python27/python.exe I:/LAMOC/Ross/diffwrapper.py %*
> There is probably a way to combine 2 (just above) and 3 (below), but I 
> didn't bother.  I guess I could have made the python executable
> wrapper.executable and stuck diffwrapper.py at the start of the diffargs.
BTW, current wrapper.bat is
echo %* > C:/Users/rdboylan/capture
C:/Python27/python.exe I:/LAMOC/Ross/diffwrapper.py %*
and the capture file was last updated 4/4, the day before I upgraded 
tortoisehg.  I also added hg-git that day, modified my mercurial.ini to 
match, updated my paths to include python 3.2.  python 2.7 remains 
installed.
>
> 3) diffwrapper.py is
> #! /usr/bin/python
> # python script to suppress unintersting difference in sas output
> import os.path, re, subprocess, sys, tempfile
[snip]

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to