Steps:
Use TortoiseSVN's context menu to select "Create Patch"
On another machine do the same but select "Apply Patch" and select the file generated in step 1.
A blank merge window is opened.
It looks like this:
The patch file is valid and I can use unix patch to apply it successfully (with some line-ending tinkering).
I'm on Windows 10 and TortoiseSVN/TortoiseMerge 1.9.5
The problem was that TortoiseMerge was maximized. There's a floating window on the left.
Unmaximize the TortoiseMerge window and you can see the file selector window. You can select files in that window to see them in the diff view and there's buttons for applying the patch.
It should look like this:
I had the same problem and had to select TortoiseMerge for Settings > Diff Viewer > Merge Tool.
I previously configured an external editor here and then it did not show this patch window but only an empty merge tool. Maybe this feature does not work very well with external editors.
Related
I am using Sublime Text editor and I need to change the settings for Sublime 3 to open files that start with a dot like .gitignore. Please let me know where in the settings I need to make the change. I am using Windows OS fyi.
This isn't a Sublime-specific option, but an operating system one, as the OS determines what is displayed in file dialogs as well as the file system explorer. To set the option on Windows, first open Windows Explorer and navigate to the folder containing the dotfile you want to view. Then, in the View tab, click the Options button on the far right, then select Change folder and search options.
You can also find Options under the File menu.
The Options window will now pop up. Select the View tab, then select the option Show hidden files, folders, and drives. Next, click on the Apply to Folders button at the top.
Similar options are also available on macOS and Linux.
I am a huge fan of JetBrains Rider it is really adaptable to the tastes of most devs. I could not find settings to remove an annoyance from a specific navigation function.
Navigating on the tree view of the git changes opens up a new tab to show the selected file differences, this can also be triggered via shortcuts. It is really annoying to have to close it every time I tab out and back into Rider.
The file differences are also displayed besides the git navigation tree, so displaying a new tab just gets in the way.
Is there a configuration to disable the automatic display of this diff on a new tab?
Following this blog post from JetBrains I did what they commended here:
After opening a project, press shift shift (Search Everywhere) and
search for “Registry”. Next, start typing any of the following three
switches to enable or disable things:
show.diff.preview.as.editor.tab – toggles the in-editor diff preview
I then disabled the show.diff.preview.as.editor.tab setting.
The diff tab no longer appeared
For newer versions, the setting is now show.diff.preview.as.editor.tab.with.single.click
It's actually quite easy to do that via the commit settings menu in 2022.2. Just click on the cog wheel and deselect "Show Diff Preview on Single Click".
With other editors I used it was possible to see all local changes in a single diff window showing the unified diffs off all files one after the other, so if I changed 3 files for example then I could simply scroll through the changes in a single window without having to select the files separately for diffs.
Here's an example of what I mean from magit which shows all changes in a single window:
Is there a way to do this is Android studio?
Right-click on your project in project structure on the left.
then Local History -> Show History. If you want to show history only for src folder, click on it.. the same for layout folder etc..
It will open in one separate window and shows diff between changed and file before changes.
Try Version Control on the bottom left of Android Studio:
It lets you choose between the unified viewer and a side-by-side view:
I like using WinMerge instead of TortoiseMerge with TortoiseSVN for comparing changes between separate revisions of a file. I can configure this for most things in the TortoiseSVN settings (context menu > "TortoiseSVN" > "Settings" > "Diff Viewer"):
However, when I want to compare files in a particular revision against the those in the working copy, it uses TortoiseMerge. To see what I mean, go to the TortoiseSVN log viewer from the working copy: right-click in the working copy folder, select "TortoiseSVN" > "Show log", right-click on a prior revision, and select "Compare with working copy". Then, double-click the file of interest in the list of "file patches" that appears.
Is there any way to get it to use WinMerge instead of TortoiseMerge for these cases?
Sorry, no. Because WinMerge is not able to apply patch files.
When you do a "Compare with working copy", TortoiseSVN creates a unified diff (also known as a patch) between the selected revision and the working copy. Then it starts TortoiseMerge, telling it to apply that patch to the working copy. That's why in this case TortoiseMerge is started, not WinMerge: it's not really a diff that is done but a merge.
I'm working on a project where Subversion is used to maintain version control. I use TortoiseSVN to access the project repository.
Some changes were made between two revisions on a project (let's call them rev1 and rev2), and I want to be able to apply these changes to a working copy somewhere that temporarily does not have access to the repository.
I right-clicked on a project folder, clicked 'SVN show log', selected the two revisions and selected 'Show changes as unified diff'.
This causes a window to be shown, displaying output that very much looks like a patch file that I could save. Unfortunately, I find that there is no option in the window that lets me save this as a patch file.
How can I create the patch file?
The next version of TortoiseSVN (1.7.x) will have that save option. In the meantime, you can configure a plain text editor as your unified diff viewer:
Settings dialog->External Programs->Unified Diff Viewer
There you could, for example, specify notepad.exe as your diff viewer.
One way to achieve you goal is to right click on the revision in the TortoiseSVN log and choose "Merge revision to...". Then you select you local working project and click OK.