Juri Linkov
733cdeabfb
Don't use diff-mode buffer as a patch when it's visiting a file (bug#59962)
...
* 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'.
2022-12-11 19:24:34 +02:00
Sean Whitton
17d40c163e
vc-git-print-log: Don't assume vc-git-log-switches is a list
...
* 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.
2022-12-02 23:58:30 -07:00
Stefan Kangas
70ecdebc92
; Fix typos (don't abbreviate "with" or "without")
2022-12-01 16:36:09 +01:00
Stefan Kangas
5e8c62ffca
; Fix typos
2022-11-23 05:49:22 +01:00
Stefan Kangas
16318bfb51
; Fix typos
2022-11-20 12:59:39 +01:00
Eli Zaretskii
d46d67bef1
; Avoid "Local Variables" popups in Emacs tree
...
* lisp/vc/vc.el (vc-prepare-patches-separately): Add an autoloaded
form for the 'safe-local-variable' property. (Bug#59384)
2022-11-20 12:10:38 +02:00
Stefan Kangas
ba485eb949
; Fix typos
2022-11-18 16:02:19 +01:00
Stefan Kangas
f7ee6609ae
; Fix typos (prefer US spelling)
2022-11-18 13:06:55 +01:00
Philip Kaludercic
fd4da9151f
* lisp/vc/vc.el (vc-default-last-change): Use 'vc-call'
2022-11-17 20:55:04 +01:00
Philip Kaludercic
d0ea38b5fe
Have 'vc-prepare-patch' handle prefix arguments.
...
* 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'.
2022-11-17 20:55:04 +01:00
Olivier Certner
c8b9922e26
ediff: Merges with ancestor: Fix computation of hunks and proposed merge
...
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)
2022-11-17 11:40:09 +02:00
Juanma Barranquero
623db40dd1
; * lisp/*.el: Fix typos in docstrings
...
* 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.
2022-11-17 08:48:02 +01:00
Morgan Smith
4ccc385ab1
vc-git: Ensure git doesn't try to colorize stashes
...
* lisp/vc/vc-git.el (vc-git-stash-show): Add --color=never to git
flags. (Bug#59158)
2022-11-12 20:34:50 +01:00
Stefan Kangas
0f53523775
Remove redundant library installation instructions
...
* 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.
2022-11-11 04:29:29 +01:00
Philip Kaludercic
8fe62b2ab5
Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"
...
This reverts commit 307ad21004
.
2022-11-06 22:50:59 +01:00
Philip Kaludercic
5fa2f11679
Merge branch 'feature/package+vc'
2022-11-04 18:57:45 +01:00
Dmitry Gutov
0f5bf1dbb9
vc-svn-ignore-completion-table: Ignore empty lines
...
* lisp/vc/vc-svn.el (vc-svn-ignore-completion-table):
Make sure to ignore empty lines (bug#58889).
2022-11-02 00:46:21 +02:00
Dmitry Gutov
1712dec0c0
Speed up vc-default-checkin-patch a little
...
* lisp/vc/vc.el (vc-default-checkin-patch): Drop some
'revert-buffer' calls to speed up the process a little (bug#52349).
2022-10-31 02:51:49 +02:00
Philip Kaludercic
2a4f37fe52
Merge remote-tracking branch 'origin/master' into feature/package+vc
2022-10-30 18:45:37 +01:00
Philip Kaludercic
d33998ed3b
Have 'last-change' accept a line number instead of a range
...
* 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'.
2022-10-30 16:52:08 +01:00
Philip Kaludercic
30f1e7c1e9
Extract last source package release from local VCS data
...
* 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".
2022-10-30 14:04:52 +01:00
Dmitry Gutov
d062482c3f
vc-hg-checkin-patch: Add implementation for Hg
...
* lisp/vc/vc-hg.el (vc-hg-checkin-patch): Add Hg-specific
implementation (bug#52349), like suggested in
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01533.html .
(vc-hg--extract-headers): Extract from vc-hg-checkin.
2022-10-26 00:09:29 +03:00
Philip Kaludercic
dbcd663715
; Update 'clone' documentation in header
2022-10-23 18:26:17 +02:00
Philip Kaludercic
2154219059
Immediately check out the right branch or revision
...
* 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.
2022-10-23 18:04:55 +02:00
Philip Kaludercic
65fa87329c
Merge remote-tracking branch 'origin/master' into feature/package+vc
2022-10-18 21:53:25 +02:00
Philip Kaludercic
5ceb88e6eb
Have 'vc-clone' return a directory
...
* 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.
2022-10-18 21:21:49 +02:00
Dmitry Gutov
be3d9f717d
; Fix comment
2022-10-18 02:49:21 +03:00
Dmitry Gutov
5e77265523
Follow-up fixes for vc-default-checkin-patch
...
* lisp/vc/vc.el (vc-default-checkin-patch):
Call vc-revert-file on buffer-file-name (vc-backend failed on
relative name sometimes). Delete the tmp dir after copying all
files back, not just the first one. Bug#52349,
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01446.html .
2022-10-18 02:35:05 +03:00
Dmitry Gutov
4a6ad6e18f
Add default implementation for 'checkin-patch'
...
* lisp/vc/vc.el (vc-default-checkin-patch):
Add default implementation for 'checkin-patch' (bug#52349).
The first attempt was here:
https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg01464.html
2022-10-17 02:46:02 +03:00
Philip Kaludercic
cb968b48cb
; * lisp/vc/vc.el (vc-prepare-patch): Fix pluralisation
2022-10-16 11:37:51 +02:00
Philip Kaludercic
d8624ad519
; * lisp/vc/vc.el (vc-prepare-patch): Remove 'exit-recursive-edit'
2022-10-16 11:37:50 +02:00
Philip Kaludercic
01e45efcd4
Merge branch 'master' into feature/package+vc
2022-10-15 17:38:30 +02:00
Philip Kaludercic
5933055a3e
* lisp/vc/vc-git.el (vc-git-symbolic-commit): Use --no-undefined
2022-10-15 17:22:49 +02:00
Philip Kaludercic
1f4b234a5c
* lisp/vc/vc-git.el (vc-git-symbolic-commit): Add argument FORCE
...
(Bug#57400)
2022-10-15 17:22:49 +02:00
Philip Kaludercic
307ad21004
* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits
...
* lisp/vc/vc-git.el (vc-git-working-revision): Use abbreviated comment
references. (Bug#57400)
2022-10-15 17:22:49 +02:00
Philip Kaludercic
000cd5f9f6
; * lisp/vc/vc.el (vc-default-prepare-patch): Add missing argument
2022-10-14 18:07:52 +02:00
Philip Kaludercic
60f46b45d9
Prepare all inline patches at once
...
* lisp/vc/vc.el (vc-prepare-patch): Remove the usage of
'recursive-edit' when 'vc-prepare-patches-separately' is non-nil.
2022-10-14 18:07:52 +02:00
Philip Kaludercic
5426b4d7bf
Allow reordering commits in 'vc-prepare-patch' prompt
...
* lisp/vc/vc.el (vc-prepare-patch): Use marked log-view commits as
initial input.
2022-10-14 18:07:52 +02:00
Philip Kaludercic
1a5e705dda
; * lisp/vc/vc-cvs.el (vc-cvs-clone): Remove function
2022-10-12 17:11:21 +02:00
Robert Pluim
e25bdd7946
Fix `vc-prepare-patch' docstring
...
* lisp/vc/vc.el (vc-prepare-patch): Correct description of
`vc-prepare-patches-separately'.
2022-10-10 12:45:45 +02:00
Eli Zaretskii
b8ab4f018b
; * lisp/vc/vc.el (vc-prepare-patches-separately): Doc fix.
2022-10-08 17:40:25 +03:00
Philip Kaludercic
84945e86be
; * lisp/vc/vc.el (vc-prepare-patches-separately): Fix docstring
...
Noticed by German Pacenza.
2022-10-08 15:43:11 +02:00
Philip Kaludercic
aa350ba275
; Add missing documentation strings
...
* lisp/vc/vc.el (vc-read-revision): Add a docstring.
(vc-read-multiple-revisions): Add a docstring.
2022-10-08 15:43:11 +02:00
Visuwesh
e3fac2be04
Fix misleading prompt in vc-git-create-tag
...
* lisp/vc/vc-git.el (vc-git-create-tag): Actually pass the DEFAULT
argument to vc-read-revision (bug#58378).
2022-10-08 15:13:48 +02:00
Philip Kaludercic
8cfeb8a9e0
Merge branch 'master' into feature/package+vc
2022-10-08 11:56:23 +02:00
Philip Kaludercic
59df0a7bd9
Add a VC command to prepare patches
...
* doc/emacs/vc1-xtra.texi (Miscellaneous VC): Add new node.
(Editing VC Commands): Document new feature.
* etc/NEWS: Mention 'vc-prepare-patch'.
* lisp/vc/log-view.el: Autoload 'log-view-get-marked'.
* lisp/vc/vc-git.el (vc-git-prepare-patch): Add Git implementation.
* lisp/vc/vc-hg.el (vc-git-prepare-patch): Add Mercurial implementation.
* lisp/vc/vc-bzr.el (vc-git-prepare-patch): Add Bazaar implementation.
* lisp/vc/vc.el (vc-read-revision): Add a MULTIPLE argument.
(vc-read-multiple-revisions): Add an auxiliary function that always
calls 'vc-read-revision' with a non-nil value for MULTIPLE.
(vc-prepare-patches-separately): Add user option.
(message-goto-body): Declare function.
(message--name-table): Declare function.
(vc-default-prepare-patch): Add a default implementation.
(vc-prepare-patch): Add command. (Bug#57400)
2022-10-08 11:51:38 +02:00
Philip Kaludercic
bb2bd2ed91
; * vc-svn.el (vc-svn-clone): Fix typo
2022-10-07 16:44:28 +02:00
Philip Kaludercic
b6132d84e9
* lisp/vc/vc-svn.el (vc-svn-clone): Add 'clone' implementation
2022-10-06 22:03:15 +02:00
Philip Kaludercic
132e4fbbcb
* lisp/vc/vc-cvs.el (vc-cvs-clone): Add 'clone' implementation
2022-10-06 22:03:15 +02:00
Philip Kaludercic
3d0ab51826
* lisp/vc/vc-bzr.el (vc-bzr-clone): Add 'clone' implementation
2022-10-06 22:03:15 +02:00