diff options
| author | Sean Whitton | 2025-07-06 13:43:24 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-07-06 14:03:31 +0100 |
| commit | 7a0bfa3ee7fa447a0fe994ac8f64bcb5752cacb2 (patch) | |
| tree | f93da5808cc0e874c543bd7cd352f6a5fbcd3d11 /doc | |
| parent | 67ddf2157659e9cd6fb9b109049da66c7abe4ffb (diff) | |
| download | emacs-7a0bfa3ee7fa447a0fe994ac8f64bcb5752cacb2.tar.gz emacs-7a0bfa3ee7fa447a0fe994ac8f64bcb5752cacb2.zip | |
vc-checkin: Check whether the fileset or patches have changed
* lisp/vc/vc-dispatcher.el (vc-finish-logentry): Delay popping
to vc-parent-buffer until after calling the log operation.
That way if the log operation exits early, the current buffer
remains *vc-log*.
(vc-dir-marked-files, dired-get-marked-files): Declare.
(vc-dispatcher--explicit-marks-p): New function.
* lisp/vc/vc.el (vc-checkin): Check the user isn't likely to be
surprised by what is included in the checkin. Specifically,
check whether the fileset or patches implied by vc-parent-buffer
are unchanged.
* doc/emacs/maintaining.texi (VC With A Merging VCS): Explain
how the fileset or patch string is fixed once *vc-log* pops up.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/maintaining.texi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 12770f218ca..ea7b8794bbc 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -572,6 +572,23 @@ then applies the changes to the respective files and commits the changes | |||
| 572 | after popping up the @file{*vc-log*} buffer to allow you to type a | 572 | after popping up the @file{*vc-log*} buffer to allow you to type a |
| 573 | suitable commit log message. | 573 | suitable commit log message. |
| 574 | 574 | ||
| 575 | Once you type @kbd{C-x v v}, the fileset or patches cannot be changed | ||
| 576 | without first cancelling the commit by typing @kbd{C-c C-k} in the | ||
| 577 | @file{*vc-log*} buffer. For example, if you change which files are | ||
| 578 | marked in the @file{*vc-dir*} buffer after Emacs has already popped up | ||
| 579 | the @file{*vc-log*} buffer, the old fileset will remain in effect for | ||
| 580 | this commit. (This is in contrast to changes made to the | ||
| 581 | @emph{contents} of files in the fileset: all such changes will be | ||
| 582 | included in the commit even if they are made after Emacs has popped up | ||
| 583 | the @file{*vc-dir*} buffer.) | ||
| 584 | |||
| 585 | When you cancel a commit, Emacs saves your log message. This means that | ||
| 586 | if you need to adjust the fileset or patches, it is easy to restart the | ||
| 587 | commit operation again: type @w{@kbd{C-c C-k C-x v v M-p}}. Here | ||
| 588 | @kbd{C-c C-k} cancels the commit, @kbd{C-x v v} initiates another with | ||
| 589 | the new fileset or patches, and finally @kbd{M-p} recalls your previous | ||
| 590 | log message. | ||
| 591 | |||
| 575 | With modern decentralized version control systems (Git, Mercurial, | 592 | With modern decentralized version control systems (Git, Mercurial, |
| 576 | etc.), the changes are committed locally and not automatically | 593 | etc.), the changes are committed locally and not automatically |
| 577 | propagated to the upstream repository (which is usually on a remote | 594 | propagated to the upstream repository (which is usually on a remote |