Commit graph

122 commits

Author SHA1 Message Date
Daniel Colascione
da02eb556a Add autoload cooking for vc-responsible-backend
* lisp/vc/vc.el (vc-responsible-backend): Add autoload cooking for
`vc-responsible-backend'.
2015-03-01 18:31:28 -08:00
Oscar Fuentes
b5a0603eb4 Use vc-switches on vc-*-annotate-command
This also removes switch "-C -C" from vc-git-annotate-command.

Fixes: debbugs:17945

* vc/vc.el (vc-annotate-switches): New defcustom.
* vc/vc-bzr.el (vc-bzr-annotate-switches): New defcustom.
(vc-bzr-annotate-command): Use it.
* vc/vc-cvs.el (vc-cvs-annotate-switches): New defcustom.
(vc-cvs-annotate-command): Use it.
* vc/vc-git.el (vc-git-annotate-switches): New defcustom.
(vc-git-annotate-command): Use it.
* vc/vc-hg.el (vc-hg-annotate-switches): New defcustom.
(vc-hg-annotate-command): Use it.
* vc/vc-mtn.el (vc-mtn-annotate-switches): New defcustom.
(vc-mtn-annotate-command): Use it.
* vc/vc-svn.el (vc-svn-annotate-switches): New defcustom.
(vc-svn-annotate-command): Use it.
2015-02-26 15:50:41 +01:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Dmitry Gutov
863cf6241d * lisp/vc/vc.el: Improve `dir-status-files' description 2014-12-17 06:34:11 +02:00
Dmitry Gutov
01b97f9df2 Move VC diff ASYNC argument to the fifth position
* lisp/vc/vc-svn.el (vc-svn-diff):
* lisp/vc/vc-src.el (vc-src-diff):
* lisp/vc/vc-sccs.el (vc-sccs-diff):
* lisp/vc/vc-rcs.el (vc-rcs-diff):
* lisp/vc/vc-mtn.el (vc-mtn-diff):
* lisp/vc/vc-hg.el (vc-hg-diff):
* lisp/vc/vc-git.el (vc-git-diff):
* lisp/vc/vc-dav.el (vc-dav-diff):
* lisp/vc/vc-cvs.el (vc-cvs-diff):
* lisp/vc/vc-bzr.el (vc-bzr-diff):
* lisp/obsolete/vc-arch.el (vc-arch-diff): Move ASYNC argument to the end.

* lisp/vc/vc.el (vc-diff-internal): Pass `async' argument to the
backend `diff' command in the last position.
2014-12-14 12:49:08 +02:00
Paul Eggert
d19bf72ac9 Spelling fixes 2014-12-12 18:42:57 -08:00
Eric S. Raymond
be6dff68be latest-on-branch-p is no longer a public method
* vc/vc-dav.el, vc/vc-git.el, vc/vc-hg.el, vc/vc-src.el, vc/vc.el:
latest-on-branch-p is no longer a public method.
2014-12-11 23:29:41 -05:00
Eric S. Raymond
ea8b9df12e Remove VC rollback method.
* vc/vc.el, vc/vc-hg.el, vc/vc-git.el, vc/vc-hooks.el,
vc/vc-mtn.el, vc/vc-rcs.el, vc/vc-sccs.el, vc/vc-src.el: rrollback
method removed, to be replaced in the future by uncommit.
2014-12-11 22:44:32 -05:00
Eric S. Raymond
8bc7ac5c25 Righteous featurectomy of vc-keep-workfiles - always do it.
* vc/vc-dispatcher.el, vc/vc-hooks.el, vc/vc-rcs.el, vc/vc-sccs.el,
vc/vc.el: Righteous featurectomy of vc-keep-workfiles, it's a
shoot-self-in-foot archaism.  Workfiles are always kept.
2014-12-10 12:33:26 -05:00
Eric S. Raymond
b1a765b3a8 In vc, abolish the dir-status method. 2014-12-02 10:11:48 -05:00
Eric S. Raymond
d4767877ac Eliminate an unuted function argument.
* vc.el, all backends: API simplification: Remove 4th 'default-state'
argument from vc-dir-status files and its backend methods - no backend
method ever set it.  It was used only in the fallback method to to set
a default of 'up-to-date, though a convoluted call chain obscured
this.
2014-12-02 08:01:46 -05:00
Eric S. Raymond
e6fe301afe Another longstanding to-do: bind vc-delete-file. 2014-12-02 05:31:04 -05:00
Eric S. Raymond
92411a0d2e Clean up a longstanding to-do item.
* vc.el (vc-expand-dirs): Now takes a second BACKEND argument,
improving behavior on directories using multiple file-oriented VCSEs.
2014-12-02 04:38:08 -05:00
Eric S. Raymond
2fb8b146f7 Remove clear-headers from VC's public method set.
* vc/vc.el and all backends: API simplification; clear-headers is no
longer a public method.  It is now local to the one place it's used,
in the RCS steal-lock method.
2014-12-01 23:49:35 -05:00
Eric S. Raymond
ea99f8c1ab Fix minor bug introduced in 'Terminate vc-disable-async-diff' 2014-12-01 22:56:01 -05:00
Eric S. Raymond
b7fd432d56 Remove could-register from the set of public VC backend methods,
* vc/vc.el and all backends: API simplification; could-register
is no longer a public method.  (vc-cvs.el still has a private
implementation.)
2014-12-01 18:54:28 -05:00
Eric S. Raymond
ed6ce56e23 Terminate vc-disable-async-diff with extreme prejudice.
* vc/vc.el, and all backends: API cleanup; the backend diff method
takes an explicit async flag.  This eliminates a particularly ugly
global.
2014-12-01 17:56:41 -05:00
Stefan Monnier
b34578dd88 * lisp/vc: Fix use of find-conflicted-file in Git.
* lisp/vc/vc.el (vc-find-conflicted-file): Look for conflicted files in the
current "project" rather than just the current directory.
* lisp/vc/vc-git.el (vc-git-conflicted-files): Clarify in which directory
the file names make sense.
2014-12-01 13:16:54 -05:00
Eric S. Raymond
d17bae9039 Refactor VC merging to fix a layer violation.
* vc/vc.el, vc/vc-cvs.el, vc/vc-rcs.el, vc/vc-svn.el: The 'merge'
backend method of RCS/CVS/SVN is now 'merge-file', to contrast with
'merge-branch'. Prompting for merge revisions is pushed down to the
back ends; this fixes a layering violation that caused bad behavior
with SVN.
2014-12-01 11:43:10 -05:00
Eric S. Raymond
cb8ed25555 Small but crucial change for new VC registration API. 2014-12-01 10:59:05 -05:00
Eric S. Raymond
4893831f69 Update some documentation changes and todo items. 2014-12-01 10:57:09 -05:00
Eric S. Raymond
185320a5fe Finish vc-stay-local containment.
* vc/vc.el, vc-hooks.el, and all backends: API simplification;
vc-stay-local-p and repository-hostname are no longer public
methods. Only the CVS and SVN backends used these, and the SVN
support was conditioned out because svn status -v is too slow.
The CVS back end retaiin this machibery and the vc-stay-local
configuration variable now only affects it.
2014-12-01 10:47:27 -05:00
Eric S. Raymond
2a81c5d94d Confine vc-stay-local to CVS, because it was unusable in SVN. 2014-12-01 10:11:42 -05:00
Eric S. Raymond
578d91ac50 Remove vc-state-heuristic from the set of public methods.
* vc/vc.el, vc-hooks.el, and all backends: API simplification;
vc-state-heuristic is no longer a public method, having been removed
where it is redundant, unnecessary, or known buggy. This eliminated
all backends except CVS.  Eliminates bug#7850.
2014-12-01 09:41:54 -05:00
Eric S. Raymond
33b4235db6 The vc-mistrust-permissions configuration variable is gone.
* vc/vc-cvs.el, vc/vc-hooks.el, vc/vc-rcs.el, vc/vc-sccs.el: Eliminate
vc-mistrust-permissions.  It was only relevant to the RCS and SCCS
back ends and defaulted to t. Code now always mistrusts permissions -
by actual measurement the effect on performance is negligible. As a
side effect bug#11490 is now irrelevant.
2014-12-01 09:08:26 -05:00
Eric S. Raymond
f82f3f1f17 API simplification: remove vc-workfile-unchanged-p from pubic methods.
* vc/vc.el, vc-hooks.el, and all backends: API simplification;
vc-workfile-unchanged-p is no longer a public method (but the RCS and
SCCS back ends retain it as a private method used in state
computation). This method was redundant with vc-state and usually
implemented as a trivial call to same. Fixes the failure mode
described in bug#694.
2014-12-01 08:24:27 -05:00
Eric S. Raymond
2f4f920079 VC API simplification: remove ability to set initial revision.
This hasn't made any sense since RCS, and was a dumb stunt then.

* vc/vc.el and all backends: API simplification; init-revision is
gone, and vc-registered functions no longer take an initial-revision
argument.
2014-12-01 06:23:10 -05:00
Paul Eggert
0cce3623b1 Merge branch 'emacs-24'. 2014-11-28 23:07:16 -08:00
Eric S. Raymond
354a07b570 Isolating support code for the file-granularity back ends: the easy part.
* vc-filewise.el: New file to isolate code used only by the
file-oriented back ends (SCCS/RCS/CVS/SRC) which should not live in
vc.el and certainly not in vc-hooks.el.
2014-11-22 00:31:20 -05:00
Eli Zaretskii
a131037e97 Fix bug #19084 with 'C-x v +' in *vc-change-log* buffers.
lisp/vc/vc.el (vc-deduce-fileset): Support invocation from
 *vc-change-log* buffer.
2014-11-21 12:14:32 +02:00
Ulrich Mueller
a2c0a14c32 Fix bug #19136 with a typo in a vc.el comment.
lisp/vc/vc.el: Fix a typo in the commentary.
2014-11-21 11:21:50 +02:00
Eric S. Raymond
1e81f67690 Support for SRC in VC mode. 2014-11-20 17:57:22 -05:00
Eric S. Raymond
e7e9dbccb0 Remove editable argument from VC's backend checkout methods.
Alters vc/vc-bzr.el, vc/vc-cvs.el, vc/vc-dav.el, vc/vc-git.el,
vc/vc-hg.el, vc/vc-mtn.el, vc/vc-rcs.el, vc/vc-sccs.el,
vc/vc-svn.el, vc/vc.el.

where this matters (which is only in SCCS and RCS) files are now always
checked out editable. This may actually have been dynamically true
already - it looks like the vc-next-action code evolved past visiting
the other case. Tested with RCS.
2014-11-20 03:52:24 -05:00
Eric S. Raymond
f83109f0fa Remove never-used rev argument from VC's backend checkin methods.
Alters vc/vc-arch.el, vc/vc-bzr.el, vc/vc-cvs.el, vc/vc-dav.el,
vc/vc-git.el, vc/vc-hg.el, vc/vc-mtn.el, vc/vc-rcs.el,
vc/vc-sccs.el, vc/vc-svn.el, vc/vc.el.

Only the RCS, SCCS, and CVS back ends tried to do anything with it,
and that code was never exercised. Chiseling away the cruft of
decades...
2014-11-20 02:37:06 -05:00
Eli Zaretskii
2fa082c003 Fix VC documentation related to switching branches.
lisp/vc/vc.el (vc-retrieve-tag): Doc fix.

 doc/emacs/maintaining.texi (Switching Branches): Mention "C-x v r".
 Correct commands for switching branches in various VCSs.
2014-11-19 20:35:17 +02:00
Eli Zaretskii
e9917c08dc Fix bug #19101 with log-view-mode set in the wrong buffer.
lisp/vc/vc.el (vc-log-internal-common): Turn on log-view-mode in the
 correct buffer.  (Bug#19101)
2014-11-19 18:11:05 +02:00
Stefan Monnier
8b86268b69 * lisp/vc/vc.el (vc-region-history): New command.
(vc-print-log-internal): Use cl-some.
* lisp/vc/vc-git.el (vc-git-region-history): New function.
(vc-git-region-history-mode-map)
(vc-git--log-view-long-font-lock-keywords)
(vc-git-region-history-font-lock-keywords): New vars.
(vc-git-region-history-font-lock): New function.
(vc-git-region-history-mode): New major mode.
2014-11-05 14:59:31 -05:00
Glenn Morris
ddce73d32f Revert previous accidental commit 2014-11-04 21:08:12 -08:00
Glenn Morris
6a278b64f7 Merge from emacs-24; up to 117669 2014-11-04 21:04:30 -08:00
Daniel Colascione
e8a77f2423 Provide function for asking vc about project root 2014-04-20 16:24:04 -07:00
Juanma Barranquero
835af71957 lisp/vc/vc.el (vc-rollback): Use set-buffer-modified-p. 2014-03-23 19:13:35 +01:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Xue Fuqiao
3bc1e1880f Some fixes for vc-ignore (Bug#15754).
Inspired by Andreas Politz and Dmitry Gutov.
2013-12-26 06:24:37 +08:00
Eli Zaretskii
0e2c793ffe Fix ugly ^M characters in Diff output shown by "C-x v u".
lisp/vc/vc.el (vc-diff-internal): Use *-dos coding-system when
 reading output from Diff on MS-Windows and MS-DOS.
2013-11-26 21:17:55 +02:00
Glenn Morris
75f777b647 * lisp/vc/vc.el (vc-diff-knows-L): Remove; unused since 2007-10-10. 2013-11-13 15:06:37 -05:00
Glenn Morris
f5bf77dfae * lisp/vc/vc.el (vc-print-log): Don't use a working revision unless
one was explicitly specified.

Fixes: debbugs:15322
2013-10-24 19:33:42 -07:00
Dmitry Gutov
8297b2cfdd * lisp/vc/vc.el (vc-print-root-log): Always set `default-directory'
value, whether we could auto-deduce `backend', or not.
2013-10-24 05:27:29 +04:00
João Távora
db1386987b * vc/vc.el (vc-diff-build-argument-list-internal): If the file is
not locked, use last revision and current source as
defaults.  (Bug#15569)
2013-10-10 10:59:09 -04:00
Xue Fuqiao
34ca0f4c79 New functions for finding the administrative directory in VC.
* vc/vc-svn.el (vc-svn-find-admin-dir):
* vc/vc-rcs.el (vc-rcs-find-admin-dir):
* vc/vc-mtn.el (vc-mtn-find-admin-dir):
* vc/vc-cvs.el (vc-cvs-find-admin-dir):
* vc/vc-arch.el (vc-arch-find-admin-dir): New functions.
2013-10-05 07:47:00 +08:00
Xue Fuqiao
d052d3bdf3 Add keybinding for vc-log-incoming in vc-dir.
* doc/emacs/maintaining.texi (VC Directory Commands): Add keybinding for
vc-log-incoming in vc-dir.
* lisp/vc/vc-dir.el (vc-dir-mode-map): Add keybinding for vc-log-incoming.
2013-09-21 16:16:13 +08:00