thanks for all your patches!I went with option 4, I agree that's the best solution.
one question though: how did you create the patch files? They have absolute paths (e.g. C:/Users/danie/AppData/Local/Temp/MergeWizardRevRange.cpp) and no context lines at all.
lördag 28 maj 2022 kl. 10:24:21 UTC+2 skrev Stefan:thanks for all your patches!I went with option 4, I agree that's the best solution.(y), LGTM.I realise you reworked the patch a bit and removed GetWindowText altogether (I thought about it but figured there was probably a reason it was used). For the matter of consistency, should the same be applied to MergeWizardTree? Something along the lines of [1]?
TortoiseMerge seems to look at Software\TortoiseMerge\ContextLines (from the settings dialog), which I havn't set, and thus gets a default value of 0 from src/TortoiseMerge/MainFrm.cpp line 2950. I'm attaching a proposed patch [2] to change this to three, which seems a better default. There were a few additional places in the code looking at the above reg key, but with a default value of 1 that I didn't change. I'm not sure if it makes sense to have different default values for the same registry key. The attached patch [3] should change the default setting in the Settings dialog to 3 as well.
On Saturday, May 28, 2022 at 4:18:44 PM UTC+2 daniel.l...@gmail.com wrote:lördag 28 maj 2022 kl. 10:24:21 UTC+2 skrev Stefan:thanks for all your patches!I went with option 4, I agree that's the best solution.(y), LGTM.I realise you reworked the patch a bit and removed GetWindowText altogether (I thought about it but figured there was probably a reason it was used). For the matter of consistency, should the same be applied to MergeWizardTree? Something along the lines of [1]?now that you mention it: yes there was (and is) a reason for using GetWindowText: GetString can return an empty string sometimes (e.g. when using up/down to select from the history without hitting return). Not always, but sometimes.
So I'm going to change this back to using GetWindowText again and then trim the string from newlines.
TortoiseMerge seems to look at Software\TortoiseMerge\ContextLines (from the settings dialog), which I havn't set, and thus gets a default value of 0 from src/TortoiseMerge/MainFrm.cpp line 2950. I'm attaching a proposed patch [2] to change this to three, which seems a better default. There were a few additional places in the code looking at the above reg key, but with a default value of 1 that I didn't change. I'm not sure if it makes sense to have different default values for the same registry key. The attached patch [3] should change the default setting in the Settings dialog to 3 as well.Thanks!I've applied your patches.
If you would register at osdn.net I can give you commit access so you can commit your fixes yourself :)
Just one more thing <tm>. In MergeWizardTree.cpp, you first check the URL using GetWindowText but when setting the m_urlFrom and m_urlTo you still get the URL using GetString(). So I would re-order things as in patch [1].
I will have a second look at TortoiseProc (as mentioned in the previous message) to see if I can make it emit a path base in to WC root instead of just the file name. I guess it might be difficult to do with TortoiseMerge since it basically compares two different files on the computer. It could, possibly, emit a path based in the WC root if either file is in a WC (in the patches in the first message, C:/Devel/tortoisesvn is a WC), but it will be impossible to do with the file from %TEMP%.
If you would register at osdn.net I can give you commit access so you can commit your fixes yourself :)Login: danielsahlbergAppreciate your confidence :-)
Just one more thing <tm>. In MergeWizardTree.cpp, you first check the URL using GetWindowText but when setting the m_urlFrom and m_urlTo you still get the URL using GetString(). So I would re-order things as in patch [1].nice catch!You can commit the patch now yourself.
I will have a second look at TortoiseProc (as mentioned in the previous message) to see if I can make it emit a path base in to WC root instead of just the file name. I guess it might be difficult to do with TortoiseMerge since it basically compares two different files on the computer. It could, possibly, emit a path based in the WC root if either file is in a WC (in the patches in the first message, C:/Devel/tortoisesvn is a WC), but it will be impossible to do with the file from %TEMP%.That would be good, yes.However, it is usually enough to emit the filename: when applying a patch, TMerge automatically searches for a path that matches the paths/names in the patchfile.
If you would register at osdn.net I can give you commit access so you can commit your fixes yourself :)Login: danielsahlbergAppreciate your confidence :-)You now have full access.