aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve color contrast of refine-related diff faces on dark backgroundsJuri Linkov2025-10-163-6/+6
| | | | | | | * lisp/vc/diff-mode.el (diff-refine-removed, diff-refine-added): * lisp/vc/ediff-init.el (ediff-fine-diff-A, ediff-fine-diff-B): * lisp/vc/smerge-mode.el (smerge-refined-removed, smerge-refined-added): Lower the dominant component of RGB colors from "aa" to "88" (bug#79633).
* Update VC-Dir contents upon revert-bufferSean Whitton2025-10-161-0/+8
| | | | | * lisp/vc/vc-hooks.el (vc-after-revert): New function. (after-revert-hook): Add it.
* vc-auto-revert-mode: Fix an autoload problemSean Whitton2025-10-161-1/+4
| | | | | * lisp/vc/vc-hooks.el (auto-revert-mode): Replace compiler declaration for this variable with a full defvar-local.
* ; * lisp/vc/vc-dir.el (vc-dir-resynch-file): Use cl-nset-difference.Sean Whitton2025-10-131-1/+2
|
* * lisp/vc/vc-dir.el (vc-dir-resynch-file): Use file-in-directory-p.Sean Whitton2025-10-131-1/+1
| | | | For better compatibility with MS-Windows.
* vc-dir-resynch-file: Be more defensive about default-directorySean Whitton2025-10-082-5/+18
| | | | | | * lisp/vc/vc-dir.el (vc-dir-resynch-file): Use both expand-file-name and buffer-local-toplevel-value on default-directory before using the value.
* defvar-keymap: New ':prefix t' abbreviationSean Whitton2025-10-062-4/+5
| | | | | | | | | | * lisp/keymap.el (defvar-keymap): New ':prefix t' abbreviation. * lisp/emacs-lisp/helper.el (Helper-help-map): * lisp/vc/pcvs.el (cvs-mode-diff-map): * lisp/vc/vc-hooks.el (vc-prefix-map): * lisp/vcursor.el (vcursor-map): Use it. * doc/lispref/keymaps.texi (Creating Keymaps): * etc/NEWS: Document it.
* VC: Use symbolic names for the working revisionSean Whitton2025-10-055-52/+114
| | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-hg.el (vc-hg-diff): When OLDVERS is ".", behave the same as if OLDVERS was the actual working revision. (vc-hg-previous-revision): Return ".~1" for input ".", ".~3" for input ".^^" et cetera. Also, when passed non-symbolic revisions, use "REV~1" instead of "REV^" for MS-Windows compatibility. (vc-hg-working-revision-symbol): * lisp/vc/vc-git.el (vc-git-working-revision-symbol): * lisp/vc/vc-hooks.el (vc-symbolic-working-revision): New functions. (vc-default-mode-line-string): * lisp/vc/ediff-vers.el (ediff-vc-merge-internal): * test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch): * lisp/vc/vc.el (vc-diff-build-argument-list-internal) (vc-diff-outgoing, vc-revision-other-window, vc-default-revert): Call vc-symbolic-working-revision. (vc-buffer-revision): Specify that this should always be a revision number/hash, not a symbolic name. * lisp/vc/vc-git.el (vc-git-previous-revision): Return "HEAD~1" for input "HEAD", "HEAD~3" for input "HEAD^^" et cetera.
* VC: New commands for cherry-picking (bug#79408)Sean Whitton2025-10-045-19/+271
| | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-buffer-file-names): New function. * lisp/vc/log-view.el (vc--pick-or-revert) (vc--prompt-other-working-tree): Autoload. (vc-parent-buffer-name, vc-log-short-style) (vc-print-log-internal): Declare. (log-view--pick-or-revert): New function. (log-view-revision-cherry-pick, log-view-revision-revert): New commands. (log-view-mode-map, log-view-mode-menu): Bind them. * lisp/vc/vc-dispatcher.el (vc-start-logentry): If get-file-buffer returns nil, use the current buffer as the parent buffer. * lisp/vc/vc.el (diff-buffer-file-names, diff-reverse-direction): Declare. (vc--pick-or-revert): New function. (vc-revision-cherry-pick, vc-revision-revert): New commands. * lisp/vc/vc-hooks.el (vc-menu-map): Bind them. * doc/emacs/maintaining.texi (VC Change Log, VC Undo) (Copying Between Branches): * etc/NEWS: Document the new commands.
* ; Improve the documentation of the last commitEli Zaretskii2025-10-041-2/+2
| | | | | | * lisp/vc/log-view.el (log-view-copy-revision-as-kill): * doc/emacs/maintaining.texi (VC Change Log): * etc/NEWS: Improve wording of last commit. (Bug#79493)
* Improve log-view-copy-revision-as-killSean Whitton2025-10-041-4/+6
| | | | | | | * lisp/vc/log-view.el (log-view-copy-revision-as-kill): Signal user-error if there is no revision at point. * doc/emacs/maintaining.texi (VC Change Log): * etc/NEWS: Shorten docs for the new command.
* New command log-view-copy-revision-as-killTimo Myyrä2025-10-041-0/+13
| | | | | | | | * lisp/vc/log-view.el (log-view-copy-revision-as-kill): New command. (log-view-mode-map): Bind it. * doc/emacs/maintaining.texi (VC Change Log): * etc/NEWS: Document it.
* New command log-view-unmark-all-entriesSean Whitton2025-10-031-0/+7
| | | | | | | | * lisp/vc/log-view.el (log-view-unmark-all-entries): New command. (log-view-mode-map): Bind it. * doc/emacs/maintaining.texi (VC Change Log): * etc/NEWS: Document it.
* vc--prompt-other-working-tree: Better handle no other working treesSean Whitton2025-10-031-18/+33
| | | | | | * lisp/vc/vc.el (vc--prompt-other-working-tree): If there are no other working trees but ALLOW-EMPTY is non-nil, it is not an error.
* Log View marking: Fix lambda listsSean Whitton2025-10-021-8/+8
| | | | | | | * lisp/vc/log-view.el (log-view-mark-entry) (log-view-unmark-entry): Mark ARG as a required argument, as it in fact is. (log-view-toggle-mark-entry): Call them properly.
* ; * lisp/vc/vc.el (vc-print-root-log): Use plusp.Sean Whitton2025-10-021-3/+2
|
* New command vc-kill-other-working-tree-buffersSean Whitton2025-10-012-0/+19
| | | | | | | | * lisp/vc/vc.el (vc-kill-other-working-tree-buffers): New command. * lisp/vc/vc-hooks.el (vc-prefix-map): Bind it. * doc/emacs/vc1-xtra.texi (Other Working Trees): * etc/NEWS: Document it.
* vc-add-working-tree: Finish by starting DiredSean Whitton2025-10-011-1/+1
| | | | | | | | | | There won't be any uncommitted changes in the new working tree yet, so vc-dir is unlikely to be useful. * lisp/vc/vc.el (vc-add-working-tree): Finish by calling 'dired' not 'vc-dir'. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): Delete stubbing out 'vc-dir'.
* VC: Allow deleting or moving current working treeSean Whitton2025-09-301-27/+65
| | | | | | | | | | | | | | | | * lisp/progmodes/project.el (project-prompter) (project-prompt-project-dir, project-prompt-project-name): * lisp/vc/vc.el (vc--prompt-other-working-tree): New ALLOW-EMPTY optional argument. (delete-working-tree, move-working-tree): Specify that callers must ensure DIRECTORY is not the current working tree. (vc-delete-working-tree, vc-move-working-tree): Pass ALLOW-EMPTY non-nil to vc--prompt-other-working-tree. Bind 'default-directory' to another working tree when operating on the current working tree. (vc-delete-working-tree): Extra prompt when asked to delete the current working tree. When deleting the current working tree, call 'bury-buffer' one or more times at the end.
* VC prepare-patch: New :patch-start & :patch-end plist entriesSean Whitton2025-09-273-38/+57
| | | | | | | | | | | | | | | * lisp/vc/vc.el (prepare-patch): Specify :patch-start and :patch-end plist entries. * lisp/vc/vc-git.el (vc-git-prepare-patch): Use -n1 to avoid passing a revision range to git-format-patch, which is a bit simpler. Catch search-failed errors and signal an error with a more helpful message. Properly handle Subject: header by looking for continuation lines. Return :patch-start and :patch-end entries in the plist. * lisp/vc/vc-hg.el (vc-hg-prepare-patch): Always pass --git to 'hg export' for consistency. Catch search-failed errors and signal an error with a more helpful message. Return a :patch-start entry in the plist.
* ; * lisp/vc/vc-git.el (vc-git-cherry-pick-comment): Fix logic.Sean Whitton2025-09-261-6/+6
|
* vc-git--checkin: Ignore 'git apply --3way' exiting 1Sean Whitton2025-09-251-3/+4
| | | | | | | | | This is expected to happen in some cases. * lisp/vc/vc-git.el (vc-git--with-apply-temp): New OKSTATUS parameter. (vc-git--checkin): Use it to ignore 'git apply --3way' exiting 1.
* vc-git--checkin: Avoid passing --ours to git-applySean Whitton2025-09-251-5/+23
| | | | | * lisp/vc/vc-git.el (vc-git--with-apply-temp): New BUFFER param. (vc-git--checkin): Avoid passing --ours to git-apply.
* VC: New cherry-pick-comment API functionSean Whitton2025-09-243-0/+54
| | | | | | | * lisp/vc/vc-git.el (vc-git-cherry-pick-comment): * lisp/vc/vc-hg.el (vc-hg-cherry-pick-comment): * lisp/vc/vc.el (vc-default-cherry-pick-comment): New functions (bug#79408).
* vc-git--checkin: Apply PATCH-STRING to working treeSean Whitton2025-09-242-23/+52
| | | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git--with-apply-temp-to-staging): Rename ... (vc-git--with-apply-temp): ... to this. New ARGS parameter. All uses changes. (vc-git--checkin): In POST function, apply PATCH-STRING to the working tree with 'git apply --3way --ours'. * lisp/vc/vc-hg.el (vc-hg--checkin): Document what the call to 'hg update' is for. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch): Delete completed FIXME and workaround.
* vc-git--checkin: Restore dropping stash of staged changesSean Whitton2025-09-241-1/+2
| | | | | | * lisp/vc/vc-git.el (vc-git--checkin): Restore dropping stash of staged changes after applying it. This was accidentally lost when factoring out vc-git--with-apply-temp-to-staging.
* ; * lisp/vc/vc-git.el (vc-git--checkin): Fix error message.Sean Whitton2025-09-221-1/+1
|
* Revert "* Clean-up some compilation warnings in vc-hooks.el"Andrea Corallo2025-09-221-6/+0
| | | | | This reverts commit dd622e06e7db8362ecdb69ecbd42b2fb01a5168b as functions are autoloaded.
* VC checkin-patch: Support extracting commit metadata from patchesSean Whitton2025-09-213-22/+120
| | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git--mailinfo): New function. (vc-git-checkin-patch): Use it to extract authorship, date and log message information from patches. (vc-git--call): New INFILE argument. All uses changed. * lisp/vc/vc-hg.el (vc-hg--checkin): When COMMENT is nil, take authorship, date and log message information from the patch. * lisp/vc/vc.el (checkin-patch): Specify to use authorship, date and comment information in PATCH-STRING (bug#79408). (prepare-patch): Specify that patch should include authorship identity, date and log message information for REV if supported. (diff-bounds-of-hunk): Declare. (vc-default-checkin-patch): Warn if it looks like we will ignore patch authorship information. * test/lisp/vc/vc-tests/vc-tests.el (vc-hg-command) (vc-git--out-str): Declare. (vc-test--checkin-patch): New function. (vc-test-git08-checkin-patch, vc-test-hg08-checkin-patch): New tests.
* * lisp/vc/vc-git.el (vc-git--checkin): Validate parameters.Sean Whitton2025-09-211-0/+2
|
* * Clean-up some compilation warnings in vc-hooks.elAndrea Corallo2025-09-181-0/+6
| | | | | | * lisp/vc/vc-hooks.el(vc-diff-outgoing-base) (vc-root-diff-outgoing-base, vc-apply-to-other-working-tree) (vc-apply-root-to-other-working-tree): Declare.
* Refactor vc-git checkin functionsSean Whitton2025-09-181-21/+29
| | | | | | | * lisp/vc/vc-git.el (vc-git-patch-string): Delete. All uses changed. (vc-git--checkin): Rename vc-git-checkin to this. (vc-git-checkin-patch, vc-git-checkin): New wrapper functions.
* vc--prompt-other-working-tree: Fail when no other working treesSean Whitton2025-09-181-9/+12
| | | | | * lisp/vc/vc.el (vc--prompt-other-working-tree): When there are no other working trees, signal an error.
* ; Improve recently-added documentationEli Zaretskii2025-09-161-1/+1
| | | | | | | * etc/NEWS: * lisp/vc/vc.el (vc-apply-root-to-other-working-tree): * doc/emacs/vc1-xtra.texi (Other Working Trees): Fix spelling and wording of documentation of recent changes to VC.
* New commands to apply changes to other working treesSean Whitton2025-09-163-23/+182
| | | | | | | | | | | * lisp/vc/diff-mode.el (diff-apply-buffer): New TEST argument. * lisp/vc/vc.el (diff-apply-buffer): Declare. (vc-no-confirm-moving-changes): New user option. (vc-apply-to-other-working-tree) (vc-apply-root-to-other-working-tree): New commands. * lisp/vc/vc-hooks.el (vc-prefix-map): Bind them. * doc/emacs/vc1-xtra.texi (Other Working Trees): * etc/NEWS: Document them.
* Merge from origin/emacs-30Eli Zaretskii2025-09-131-1/+1
|\ | | | | | | | | | | 47454566772 ; * lisp/dired-x.el (dired-find-subdir): Doc fix (bug#794... 0832e5fec56 ; * lisp/vc/vc.el (vc-print-root-log): Improve docstring ... 2fafcdbf6ac ; Minor copyedits in src/editfns.c
| * ; * lisp/vc/vc.el (vc-print-root-log): Improve docstring (bug#79439).James Thomas2025-09-131-1/+1
| |
* | ; log-edit.el: Insert missing required cl-lib.Sean Whitton2025-09-121-0/+1
| |
* | Delete obsolete log-edit-beginning-of-lineSean Whitton2025-09-121-12/+1
| | | | | | | | | | | | | | | | | | * lisp/vc/log-edit.el (message): No longer require. (log-edit-beginning-of-line): Delete. No longer required now that Log Edit buffers use fields for headers. (In combination with the new fields, this binding led to C-a behaving strangely for summaries with colons in them.) (log-edit-mode-map): Unbind it.
* | ; vc-git--log-edit-summary-check: Use and-let*.Sean Whitton2025-09-121-15/+15
| |
* | ; vc-prepare-patch: Minor code improvementsSean Whitton2025-09-121-13/+16
| | | | | | | | | | * lisp/vc/vc.el (vc-prepare-patch): Use ngettext. Avoid using dolist's RESULT for side-effect.
* | ; vc-diff-outgoing: Fix calling 'working-revision' backend function.Sean Whitton2025-09-122-3/+3
| |
* | ; * lisp/vc/vc-hg.el (vc-hg-diff): Pass `Hg' to vc-working-revision.Sean Whitton2025-09-091-1/+1
| |
* | ; * lisp/vc/vc-hg.el (vc-hg-diff): Tweak 'and' forms.Sean Whitton2025-09-091-2/+2
| |
* | Make C-x v w w work in Log View mode, to change working directorySean Whitton2025-09-082-23/+8
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-find-matching-buffer): Rename ... * lisp/progmodes/project.el (project-change-to-matching-directory): ... to here. All uses changed. * lisp/vc/log-view.el (project-change-to-matching-directory): Declare. (log-view-mode): Use it. * doc/emacs/vc1-xtra.texi (Other Working Trees): Document the change.
* | vc-next-action: Fix a cache invalidation problemSean Whitton2025-09-081-1/+12
| | | | | | | | | | * lisp/vc/vc.el (vc-next-action): Use vc-registered, not vc-backend, to see which files are already registered.
* | vc-deduce-backend: Respect vc-buffer-overriding-filesetSean Whitton2025-09-061-14/+15
| | | | | | | | | | * lisp/vc/vc.el (vc-deduce-backend): Respect vc-buffer-overriding-fileset, if set.
* | Fix log-view--mark-unmark interactive argumentsSean Whitton2025-09-061-10/+20
| | | | | | | | | | | | | | * lisp/vc/log-view.el (log-view--mark-unmark): New BEG and END arguments. Don't call region-beginning and region-end here. (log-view-mark-entry, log-view-unmark-entry): Pass BEG and END to log-view--mark-unmark, non-nil when the region is active.
* | Merge from origin/emacs-30Eli Zaretskii2025-09-061-5/+4
|\ \ | |/ | | | | | | | | aad5b676d1c ; * lisp/emacs-lisp/ring.el (ring-convert-sequence-to-rin... ddd63891a48 ; * doc/misc/flymake.texi (Troubleshooting): Fix typo (bu... 8dcb8020466 ; vc-hooks.el: Standardize terminology in header.
| * ; vc-hooks.el: Standardize terminology in header.Sean Whitton2025-09-021-5/+4
| |