Hi,
This patch series adds a "partial commit" functionality to the commit dialog,
similar to the line staging in Git clients. The patches are against trunk r29830.
The commit dialog shows the diff of the selected file at the right of the
file list. A check box in front of each added or removed line selects the
line for the commit. The check box in front of a "@@" line selects the
whole change. When the user clicks OK, TortoiseSVN writes only the selected
changes to the file, commits, and restores the full file after the commit.
This uses the existing "Restore after commit" mechanism.
Files in the series:
0001-commit-restore-touch.patch
Commit: fixed restored files not detected as modified
- the final restore in CommitCommand touches the file, like the other restore paths
0002-commit-dialog-partial-commit-code.patch
0003-commit-dialog-partial-commit-new-files.patch
0004-commit-dialog-partial-commit-resources-doc.patch
Commit dialog: commit selected lines of a file
- diff panel at the right of the file list, check box for each changed line and each change
- splitter between the file list and the diff panel, "Show changes" hides the panel
- Space toggles the selected lines, the context menu selects or deselects a change or all changes
- unselected changes stay in the working copy after the commit, also after a failed commit
- available for modified text files only (no binary, UTF-16/32, symlinks, files over 10 MB)
The feature is in three patches, for review:
- 0002: changes to existing source files and the project files
- 0003: new files PartialDiff.cpp/.h and DiffSelectCtrl.cpp/.h
- 0004: dialog layout and strings (TortoiseProcENG.rc, resource.h)
and the user guide
Implementation notes:
- PartialDiff reads BASE with svn_client_cat3 (keywords expanded, working copy
eol style), diffs it with svn_diff_mem_string_diff and builds the partial
file from raw byte ranges, so BOM, line endings and encoding stay unchanged.
- DiffSelectCtrl is a read-only Scintilla control with RGBA check box markers
in a sensitive margin.
- CSVNStatusListCtrl::CreateRestoreCopy() is the "Restore after commit" code,
moved into a public method so that the commit dialog can use it.
Preview:

Kind regards,
Mitja