Mercurial / extdiff does not change to temp dir (as I think it should)

Using Windows, Mercurial, and the extdiff extension (for Mercurial). I tried to configure extdiff to use WinDiff as an external validation tool, but I think I narrowed down the problem enough to say that the problem is before I get to this.

From what I understand in extdiff, it just calls your program cmd.winmerge and passes the directories it needs. I am also working on some of the assumptions outlined here (which may or may not be accurate, I'm just learning Mercurial):

http://bitbucket.org/tortoisehg/stable/issue/457/multiple-extdiff-threads-in-one-process-causes-side#comment-36216

which reads:

The extdiff (visual diff) extension works like this:

1-Generate temporary directory(ies) for older changesets 
2-run util.system( cwd=tempdir, "yourdiff tool dir1 dir2" ) 
    util.system does: 
        2.1 store cwd; 
        2.2 cd tempdir 
3-run your diff tool, wait for it to exit 
4-cd oldcwd 
5-Then finally extdiff deletes the temp directories. 

, , , extdiff, , temp, , , , 2.1 .

, , cd, . :

@echo off
echo %cd%
echo %1
echo %2
D:\Documents\apps\WinMergePortable\App\WinMerge\WinMergeU.exe %1 %2

extdiff extdiff. , , % cd%, c: \, c:\temp, . , extdiff ( 1, - c:\temp\extdiff.xxxxxx\someFolder.someChangesetID\file.ext), . WinMerge, , WinMerge , ( ).

, . , .

cd %tmp%

, extdiff.xxxxx \, extdiff .

:: - (


EDIT:

@echo off
echo %cd%\extdiff*
echo %1
echo %2
D:\Documents\apps\WinMergePortable\App\WinMerge\WinMergeU.exe %1 %2

, ( ), , , .: -\

EDIT: Mercurial.ini:

[ui]
username = Tim Skoch <my_real@email.address>
editor = D:\Documents\apps\Notepad++\notepad++.exe -multiInst

[extensions]
hgext.graphlog = 
hgext.extdiff = 

[extdiff]
cmd.winmerge = d:\Documents\apps\mercurial\diff_winmerge.bat
+3
1

, extdiff diff. --debug, . true diff ( ):

$ hg extdiff -p true --debug
making snapshot of 2 files from rev 18480437f81b
  a
  b
making snapshot of 2 files from working directory
  a
  b
running "'true'  'foo.18480437f81b' 'foo'" in /tmp/extdiff.IJ9clg
cleaning up temp directory

diff - : . /tmp/extdiff.IJ9clg.

, diff . . , a ,

$ hg extdiff -p true --debug
making snapshot of 1 files from rev 18480437f81b
  a
running "'true'  '/tmp/extdiff.mUlnP_/foo.18480437f81b/a' '/home/mg/tmp/foo/a'"
in /tmp/extdiff.mUlnP_
cleaning up temp directory

diff . hg help -e extdiff, . $parent $child.

, WinMerge " ". SO WinMerge, , , . , .

+2

Source: https://habr.com/ru/post/1755581/


All Articles