summaryrefslogtreecommitdiff
path: root/lisp/vc
Commit message (Collapse)AuthorAgeFilesLines
* Fix minor bugs in vc-git and vc-hg on Windows uncovered by vc-testsEli Zaretskii2023-09-012-2/+6
| | | | | | | | | | | | * lisp/vc/vc-hg.el (vc-hg-state-slow): Non-existing files emit a different message on MS-Windows; support that. * lisp/vc/vc-git.el (vc-git-checkin): Make sure 'default-directory' is not nil when calling 'make-nearby-temp-file' on MS-Windows. * test/lisp/vc/vc-tests.el (vc-test--version-diff): Run 'default-directory' through 'file-truename', otherwise the 'vc-test-cvs06-version-diff' test might fail on MS-Windows.
* Fix applying patches with Git on MS-WindowsEli Zaretskii2023-08-272-5/+26
| | | | | | | * lisp/vc/vc.el (vc-diff-internal): For Git, always suppress EOL conversion when reading the diffs into a buffer. Doc fix. * lisp/vc/vc-git.el (vc-git-checkin): Make sure to suppress EOL conversion when the patch file is written. (Bug#65049)
* Fix "vc-print-log does not erase buffer" and associated problemsDmitry Gutov2023-06-241-4/+9
| | | | | * lisp/vc/vc.el (vc-deduce-fileset): Make sure to retain the buffer switch (if it did), bug#63949.
* ; Minor fixes in documentation of recently-changed VC commandsEli Zaretskii2023-05-262-14/+37
| | | | | | | | | | * lisp/vc/vc.el (vc-print-branch-log, vc-create-branch) (vc-create-tag, vc-retrieve-tag, vc-switch-branch): Doc fixes. * lisp/vc/vc-hooks.el (vc-menu-map): Minor wording change in :help text. * doc/emacs/maintaining.texi (VC Change Log, Creating Branches): Minor wording and markup changes.
* * lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote vc-annotate-backend.Juri Linkov2023-05-251-1/+1
| | | | | When unquoted it might get the nil value when vc-annotate.el is loaded in non-vc-controlled buffer (bug#63689).
* Add vc-create/switch/print-branch to menu and update documentation (bug#63690)Juri Linkov2023-05-252-1/+11
| | | | | | | | | | | | | * doc/emacs/maintaining.texi (VC Change Log): Add 'C-x v b l' (vc-print-branch-log). (Creating Branches): Add @kindex and @findex for vc-create-branch. (Switching Branches): Add @kindex and @findex for vc-switch-branch. * lisp/vc/vc-hooks.el (vc-menu-map): Add menu items for new commands vc-create-branch and vc-switch-branch, and also vc-print-branch-log. * lisp/vc/vc.el (vc-print-branch-log): Improve docstring.
* ; vc-checkout: Wrap var lookup in 'bound-and-true-p'Dmitry Gutov2023-04-121-1/+1
|
* vc-checkout: Try to use the vc-dir's backend firstDmitry Gutov2023-04-111-1/+1
| | | | | | * lisp/vc/vc.el (vc-checkout): Try to use the vc-dir's backend before looking for the file's one. The latter doesn't work when the file doesn't exist on disk yet (bug#62674).
* ; Add a doc string for 'ediff-window-display-p' obsolescenceEli Zaretskii2023-02-281-1/+4
| | | | | | * lisp/vc/ediff-init.el (ediff-window-display-p): Document how to prevent Ediff from creating additional frames, now that this function can no longer be used or advised for that. (Bug#61850)
* Improve documentation of VC commands, including in DiredEli Zaretskii2023-02-231-16/+38
| | | | | | | | | | | | * doc/emacs/dired.texi (Operating on Files): * doc/emacs/maintaining.texi (VC Change Log, VC Directory Mode) (Version Control, Basic VC Editing): Document VC command invocation from Dired buffers. Improve documentation of vc-log commands. * lisp/dired-aux.el (dired-vc-next-action): * lisp/vc/vc.el (vc-print-log, vc-log-search, vc-log-mergebase) (vc-log-view-type, vc-print-root-log, vc-next-action): Doc fixes.
* * lisp/vc/vc.el (vc-find-revision-no-save): Fix parens (bug#61256).Juri Linkov2023-02-051-2/+2
| | | | Move '(setq failed nil)' from UNWINDFORMS of 'unwind-protect' to BODYFORM.
* Handle relative file names in vc-resynch-window and vc-resynch-bufferJuri Linkov2023-01-241-2/+8
| | | | | | | * lisp/vc/vc-dispatcher.el (vc-resynch-window, vc-resynch-buffer): While comparing with `buffer-file-name' if `file' is not absolute use `expand-file-name' in `vc-root-dir'. This fixes the case of refreshing the buffers after typing `C-x v = C-x v u' (bug#60897).
* * lisp/vc/vc-bzr.el (vc-bzr--pushpull): Return buffer's process.Juri Linkov2023-01-243-2/+6
| | | | | | | * lisp/vc/vc-git.el (vc-git--pushpull): Add comment. * lisp/vc/vc.el (vc-pull-and-push): Expand docstring about prerequisites for backend to support this command (bug#60569).
* Generalize vc-pull-and-push to support more backends (bug#60569)Juri Linkov2023-01-222-22/+14
| | | | | | | * lisp/vc/vc-git.el (vc-git-pull-and-push): Remove and move its logic to vc-pull-and-push. * lisp/vc/vc.el (vc-pull-and-push): Add code from vc-git-pull-and-push.
* * lisp/vc/vc-dir.el: Make keys ‘% m’ and ‘* %’ compatible with DiredJuri Linkov2023-01-181-2/+6
| | | | | | | | (vc-dir-mode-map): Replace ‘%’ for vc-dir-mark-by-regexp with ‘% m’ in regexp-map and ‘* %’ in mark-map (bug#60887). * doc/emacs/maintaining.texi (VC Directory Commands): Replace ‘%’ with ‘% m’ and ‘* %’. Mention vc-dir-mark-registered-files.
* * lisp/vc/diff-mode.el (diff-font-lock-keywords): Check for limit.Juri Linkov2023-01-091-6/+8
| | | | | This check is necessary since 'diff-beginning-of-hunk' can move not only backwards, but also forwards (bug#60660).
* * lisp/vc/vc-git.el (vc-git-checkin): Pass vc-git-diff-switches.Sean Whitton2023-01-021-3/+10
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-0139-39/+39
|
* ; Fix typosStefan Kangas2022-12-311-1/+1
|
* * lisp/vc/diff-mode.el (diff-minor-mode-prefix): Replace "ESC" with "\e".Juri Linkov2022-12-281-2/+1
| | | | | | "ESC" looks like an attempt to use kbd syntax in customization. But actually now 'key-description' is used in 'diff-minor-mode-map' to convert "\e" to "ESC".
* vc-git-checkin: Don't try to apply an empty patchSean Whitton2022-12-221-6/+7
| | | | | | | * lisp/vc/vc-git.el (vc-git-checkin): Don't try to apply an empty patch to the index, because in that case 'git apply' fails. (cherry picked from commit 1424342225ef5b18c630364dd88e004f4ebb1c7f)
* Revert "Use equal and member instead of eq and memq"Eli Zaretskii2022-12-161-2/+1
| | | | | | | This reverts commit f4b430140f0866f98bbf18b7094348dc64032813. Please don't install anything on the release branch that is not strictly necessary fro Emacs 29.
* Use equal and member instead of eq and memqMattias Engdegård2022-12-161-1/+2
| | | | | | | | | | | | | | | | * lisp/cedet/semantic/complete.el (semantic-displayer-show-request): * lisp/descr-text.el (describe-char-categories): * lisp/mh-e/mh-identity.el (mh-select-identity): * lisp/transient.el (transient--delay-post-command) (transient--post-command): * lisp/vc/vc-git.el (vc-git-create-tag): * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-nth-value-test-multiple-values): * lisp/emulation/viper-cmd.el (viper-preserve-cursor-color): Use `equal` instead of `eq` and `member` instead of `memq` where the comparison is with literals without guaranteed identity. In some cases this change corrects evident bugs, in others it is mostly cosmetic.
* * lisp/vc/vc-git.el (vc-git-checkin): Use make-nearby-temp-file (bug#60011)Juri Linkov2022-12-141-1/+1
|
* Don't use diff-mode buffer as a patch when it's visiting a file (bug#59962)Juri Linkov2022-12-111-1/+1
| | | | | | | * lisp/vc/vc.el (vc-deduce-fileset-1): Don't call diff-vc-deduce-fileset for diff-mode when buffer-file-name is non-nil. This is because in this case a file with a diff might be committed to VCS. So don't use it as a patch to commit with 'C-x v v'.
* vc-git-print-log: Don't assume vc-git-log-switches is a listSean Whitton2022-12-021-1/+1
| | | | | * lisp/vc/vc-git.el (vc-git-print-log): Call ensure-list on vc-git-log-switches to handle the case where it's a singular string.
* ; Fix typos (don't abbreviate "with" or "without")Stefan Kangas2022-12-011-2/+2
|
* ; Fix typosStefan Kangas2022-11-231-1/+1
|
* ; Fix typosStefan Kangas2022-11-201-1/+1
|
* ; Avoid "Local Variables" popups in Emacs treeEli Zaretskii2022-11-201-0/+2
| | | | | * lisp/vc/vc.el (vc-prepare-patches-separately): Add an autoloaded form for the 'safe-local-variable' property. (Bug#59384)
* ; Fix typosStefan Kangas2022-11-183-3/+3
|
* ; Fix typos (prefer US spelling)Stefan Kangas2022-11-181-1/+1
|
* * lisp/vc/vc.el (vc-default-last-change): Use 'vc-call'Philip Kaludercic2022-11-171-3/+1
|
* Have 'vc-prepare-patch' handle prefix arguments.Philip Kaludercic2022-11-171-15/+33
| | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-prepare-patch): Use 'vc-prepare-patch-prompt-revisions'. * lisp/vc/vc.el (vc-prepare-patch-prompt-revisions): Extract common function and handle prefix arguments. (vc-prepare-patch): Pull logic out to 'vc-prepare-patch-prompt-revisions'.
* ediff: Merges with ancestor: Fix computation of hunks and proposed mergeOlivier Certner2022-11-171-14/+21
| | | | | | | | | | | | | | | | | | | | | | Hunks were not computed correctly because the diff3 command was invoked with arguments in an incorrect order. The correct order is the local file first, the base (or "ancestor") second and the other file third. This erroneous behavior had two consequences. First, the output of diff3 would change, since it tries to merge chunks according to maximal matches between the second and first files, and the second and third files. Second, ediff, more precisely, `ediff-do-merge', would consequently try to merge the reverse of the changes from the base to the other file. * lisp/vc/ediff-diff.el (ediff-setup-diff-regions3): In the arguments to `ediff-exec-process', swap the other file with the ancestor (only when merging with an ancestor). (ediff-extract-diffs3): Match the hunk data for the ancestor and the other file correctly. The local variable `three-way-comp' indicates this is a merge with ancestors when it is nil. (Bug#59182)
* ; * lisp/*.el: Fix typos in docstringsJuanma Barranquero2022-11-171-1/+1
| | | | | | | | | | * lisp/gnus/nnrss.el (nnrss-use-local, nnrss-fetch, nnrss-find-el): * lisp/leim/quail/japanese.el ("japanese"): * lisp/org/ol.el (org-link-search-must-match-exact-headline): * lisp/org/org-faces.el (org-column): * lisp/progmodes/eglot.el (eglot--stay-out-of-p) (eglot-workspace-configuration, eglot--read-execute-code-action): * lisp/vc/vc.el (vc-clone): Fix typos in docstrings.
* vc-git: Ensure git doesn't try to colorize stashesMorgan Smith2022-11-121-1/+2
| | | | | * lisp/vc/vc-git.el (vc-git-stash-show): Add --color=never to git flags. (Bug#59158)
* Remove redundant library installation instructionsStefan Kangas2022-11-111-3/+2
| | | | | | | | | | | | | | | * lisp/apropos.el: * lisp/mail/feedmail.el: * lisp/mail/mail-hist.el: * lisp/org/org-ctags.el: * lisp/org/org-protocol.el: * lisp/progmodes/ebnf2ps.el: * lisp/progmodes/mixal-mode.el: * lisp/progmodes/perl-mode.el: * lisp/savehist.el: * lisp/textmodes/table.el: * lisp/vc/smerge-mode.el: Remove redundant installation instructions for packages bundled with Emacs.
* Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"Philip Kaludercic2022-11-061-10/+5
| | | | This reverts commit 307ad210040251ea0de2e7f453350c4497bda874.
* Merge branch 'feature/package+vc'Philip Kaludercic2022-11-045-0/+89
|\
| * Merge remote-tracking branch 'origin/master' into feature/package+vcPhilip Kaludercic2022-10-301-10/+26
| |\
| * | Have 'last-change' accept a line number instead of a rangePhilip Kaludercic2022-10-302-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-release-rev): Use new signature. * lisp/vc/vc-git.el (vc-git-last-change): Update signature * lisp/vc/vc.el (vc-default-last-change): Update signature and use 'annotate-command'.
| * | Extract last source package release from local VCS dataPhilip Kaludercic2022-10-302-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-archive-spec-alist): Unmention :release-rev (package-vc-desc->spec): Fall back on other archives if a specification is missing. (package-vc-main-file): Add new function, copying the behaviour of elpa-admin.el. (package-vc-generate-description-file): Use 'package-vc-main-file'. (package-vc-unpack): Handle special value ':last-release'. (package-vc-release-rev): Add new function using 'last-change'. (package-vc-install): Pass ':last-release' as REV instead of a release. * lisp/vc/vc-git.el (vc-git-last-change): Add Git 'last-change' implementation. * lisp/vc/vc.el (vc-default-last-change): Add default 'last-change' implementation. This attempts to replicate the behaviour of elpa-admin.el's "elpaa--get-last-release-commit".
| * | ; Update 'clone' documentation in headerPhilip Kaludercic2022-10-231-2/+5
| | |
| * | Immediately check out the right branch or revisionPhilip Kaludercic2022-10-235-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-unpack) Use REV to avoid checking out the wrong branch/revision first. * lisp/vc/vc-bzr.el: Handle REV. * lisp/vc/vc-git.el: Handle REV. * lisp/vc/vc-hg.el: Handle REV. * lisp/vc/vc-svn.el: Handle REV. * lisp/vc/vc.el: Make BACKEND optional and add REV.
| * | Merge remote-tracking branch 'origin/master' into feature/package+vcPhilip Kaludercic2022-10-181-3/+47
| |\ \
| * | | Have 'vc-clone' return a directoryPhilip Kaludercic2022-10-185-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-bzr.el (vc-bzr-clone): Return directory. * lisp/vc/vc-git.el (vc-git-clone): Return directory. * lisp/vc/vc-hg.el (vc-hg-clone): Return directory. * lisp/vc/vc-svn.el (vc-svn-clone): Return directory. * lisp/vc/vc.el (vc-clone): Ensure the backend returns directory.
| * | | Merge branch 'master' into feature/package+vcPhilip Kaludercic2022-10-152-32/+59
| |\ \ \
| * | | | ; * lisp/vc/vc-cvs.el (vc-cvs-clone): Remove functionPhilip Kaludercic2022-10-121-3/+0
| | | | |
| * | | | Merge branch 'master' into feature/package+vcPhilip Kaludercic2022-10-0816-219/+775
| |\ \ \ \