Skip to content

Commit b07223a

Browse files
authored
disable Backup for WinMerge (#368)
1 parent dc3b04b commit b07223a

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/diff-tool.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,17 +566,17 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
566566

567567
#### Notes:
568568

569-
* Ensure that file backups are either [disabled](winmerge-no-backup.png) or changed to use a [Global backup folder](winmerge-backup-directory.png).
570569
* [Command line reference](https://manual.winmerge.org/en/Command_line.html).
571570
* `/u` Prevents WinMerge from adding paths to the Most Recently Used (MRU) list.
572571
* `/wl` Opens the left side as read-only.
573572
* `/dl` and `/dr` Specifies file descriptions in the title bar.
574573
* `/e` Enables close with a single Esc key press.
574+
* `/cfg Backup/EnableFile=0` disable backup files.
575575

576576
#### Windows settings:
577577

578-
* Example target on left arguments: `/u /wr /e "targetFile.txt" "tempFile.txt" /dl "targetFile.txt" /dr "tempFile.txt" `
579-
* Example target on right arguments: `/u /wl /e "tempFile.txt" "targetFile.txt" /dl "tempFile.txt" /dr "targetFile.txt" `
578+
* Example target on left arguments: `/u /wr /e "targetFile.txt" "tempFile.txt" /dl "targetFile.txt" /dr "tempFile.txt" /cfg Backup/EnableFile=0 `
579+
* Example target on right arguments: `/u /wl /e "tempFile.txt" "targetFile.txt" /dl "tempFile.txt" /dr "targetFile.txt" /cfg Backup/EnableFile=0 `
580580
* Scanned paths:
581581
* `%PATH%WinMergeU.exe`
582582
* `%ProgramFiles%\WinMerge\WinMergeU.exe`

docs/winmerge-backup-directory.png

-23.7 KB
Binary file not shown.

docs/winmerge-no-backup.png

-23.2 KB
Binary file not shown.

src/DiffEngine.Tests/diffTools.include.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,17 +453,17 @@ Non-MDI tools are preferred since it allows [DiffEngineTray](tray.md) to track a
453453

454454
#### Notes:
455455

456-
* Ensure that file backups are either [disabled](winmerge-no-backup.png) or changed to use a [Global backup folder](winmerge-backup-directory.png).
457456
* [Command line reference](https://manual.winmerge.org/en/Command_line.html).
458457
* `/u` Prevents WinMerge from adding paths to the Most Recently Used (MRU) list.
459458
* `/wl` Opens the left side as read-only.
460459
* `/dl` and `/dr` Specifies file descriptions in the title bar.
461460
* `/e` Enables close with a single Esc key press.
461+
* `/cfg Backup/EnableFile=0` disable backup files.
462462

463463
#### Windows settings:
464464

465-
* Example target on left arguments: `/u /wr /e "targetFile.txt" "tempFile.txt" /dl "targetFile.txt" /dr "tempFile.txt" `
466-
* Example target on right arguments: `/u /wl /e "tempFile.txt" "targetFile.txt" /dl "tempFile.txt" /dr "targetFile.txt" `
465+
* Example target on left arguments: `/u /wr /e "targetFile.txt" "tempFile.txt" /dl "targetFile.txt" /dr "tempFile.txt" /cfg Backup/EnableFile=0 `
466+
* Example target on right arguments: `/u /wl /e "tempFile.txt" "targetFile.txt" /dl "tempFile.txt" /dr "targetFile.txt" /cfg Backup/EnableFile=0 `
467467
* Scanned paths:
468468
* `%PATH%WinMergeU.exe`
469469
* `%ProgramFiles%\WinMerge\WinMergeU.exe`

src/DiffEngine/Implementation/WinMerge.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ static string LeftArguments(string temp, string target)
66
{
77
var tempTitle = Path.GetFileName(temp);
88
var targetTitle = Path.GetFileName(target);
9-
return $"/u /wr /e \"{target}\" \"{temp}\" /dl \"{targetTitle}\" /dr \"{tempTitle}\"";
9+
return $"/u /wr /e \"{target}\" \"{temp}\" /dl \"{targetTitle}\" /dr \"{tempTitle}\" /cfg Backup/EnableFile=0";
1010
}
1111

1212
static string RightArguments(string temp, string target)
1313
{
1414
var tempTitle = Path.GetFileName(temp);
1515
var targetTitle = Path.GetFileName(target);
16-
return $"/u /wl /e \"{temp}\" \"{target}\" /dl \"{tempTitle}\" /dr \"{targetTitle}\"";
16+
return $"/u /wl /e \"{temp}\" \"{target}\" /dl \"{tempTitle}\" /dr \"{targetTitle}\" /cfg Backup/EnableFile=0";
1717
}
1818

1919
return new(
@@ -85,12 +85,12 @@ static string RightArguments(string temp, string target)
8585
@"%ProgramFiles%\WinMerge\",
8686
@"%LocalAppData%\Programs\WinMerge\")),
8787
Notes: """
88-
* Ensure that file backups are either [disabled](winmerge-no-backup.png) or changed to use a [Global backup folder](winmerge-backup-directory.png).
8988
* [Command line reference](https://manual.winmerge.org/en/Command_line.html).
9089
* `/u` Prevents WinMerge from adding paths to the Most Recently Used (MRU) list.
9190
* `/wl` Opens the left side as read-only.
9291
* `/dl` and `/dr` Specifies file descriptions in the title bar.
9392
* `/e` Enables close with a single Esc key press.
93+
* `/cfg Backup/EnableFile=0` disable backup files.
9494
""");
9595
}
9696
}

0 commit comments

Comments
 (0)