Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
* lisp/vc/vc-bzr.el, lisp/vc/vc-cvs.el, lisp/vc/vc-hg.el:
* lisp/vc/vc-rcs.el, lisp/vc/vc-src.el:
Declare functions defined elsewhere, to forestall “might not
be defined at runtime” warnings.
Teach vc-hg how to read some Mercurial internal data structures,
allowing us to avoid the need to run hg status -A, which is very slow
for large repositories. Fall back to running hg if anything looks
funny. vc-hg now puts the _working directory_ revision in the
modeline instead of the file revision, which greatly improves
performance and which allows us to again skip running hg in the case
that we have an active bookmark.
* lisp/vc/vc-hg.el (vc-hg-state): Try calling `vc-hg-statefast'
(vc-hg-symbolic-revision-styles)
(vc-hg-use-file-version-for-mode-line-version)
(vc-hg-parse-hg-data-structures): New user preferences
(vc-hg--active-bookmark-internal, vc-hg--run-log)
(vc-hg--symbolic-revision, vc-hg-mode-line-string)
(vc-hg--read-u8, vc-hg--read-u32-be)
(vc-hg--raw-dirstate-search, vc-hg--cached-dirstate-search)
(vc-hg--parts-to-string, vc-hg--pcre-to-elisp-re)
(vc-hg--glob-to-pcre, vc-hg--hgignore-add-pcre)
(vc-hg--hgignore-add-glob, vc-hg--hgignore-add-path)
(vc-hg--slurp-hgignore-1, vc-hg--slurp-hgignore)
(vc-hg--ignore-patterns-valid-p)
(vc-hg--ignore-patterns-ignored-p, vc-hg--time-to-fixnum)
(vc-hg--file-ignored-p, vc-hg--read-repo-requirements)
(vc-hg--requirements-understood-p, vc-hg--dirstate-scan-cache)
(vc-hg-state-fast): New functions.
(vc-hg--hgignore-patterns, vc-hg--hgignore-filenames)
(vc-hg--cached-ignore-patterns, vc-hg--dirstate-scan-cache)
(vc-hg--dirstate-scan-cache): New internal variables.
* lisp/vc/vc-hooks.el (vc-refresh-state): Invoke vc find-file-hook
before updating modeline.
* lisp/vc/vc-hg.el (vc-hg-annotate-command):
Change '-d' to '-dq'. (Bug#21805)
(vc-hg-annotate-switches): Default to "-u" "--follow".
(vc-hg-annotate-re): Update to recognize the short date format
and the optional username.
(vc-hg-annotate-time)
(vc-hg-annotate-extract-revision-at-line): Update accordingly.
* test/automated/vc-hg.el: New file.
* lisp/vc/vc.el (vc-message-unresolved-conflicts): New function.
* lisp/vc/vc-svn.el (vc-svn-find-file-hook):
* lisp/vc/vc-hg.el (vc-hg-find-file-hook):
* lisp/vc/vc-bzr.el (vc-bzr-find-file-hook):
* lisp/vc/vc-git.el (vc-git-find-file-hook): Use above new function
to display a standard message that specifies the conflicted file.
Before this change, the message VC used for indicating a conflicted
file was just "There are unresolved conflicts in this file" without
naming the file (and this language was duplicated in several places).
After this change, it's "There are unresolved conflicts in file FOO"
(and this language is now centralized in one function in vc.el).
Justification: It's important for the message to name the conflicted
file because the moment when VC realizes a file is conflicted does not
always come interactively. For example, some people automatically
find a set of Org Mode files on startup, and may keep those .org files
under version control. If any of the files are conflicted, the user
just sees some messages fly by, and might later check the "*Messages*"
buffer to find out what files were conflicted. I'm not saying this
happened to me or anything; it's a purely hypothetical example.
* lisp/vc/vc-bzr.el (vc-bzr-checkin):
* lisp/vc/vc-dav.el (vc-dav-checkin):
* lisp/vc/vc-git.el (vc-git-checkin):
* lisp/vc/vc-hg.el (vc-hg-checkin):
* lisp/vc/vc-mtn.el (vc-mtn-checkin): Accept and silently ignore
an additional optional argument, the revision to checkin.
* lisp/vc/vc-sccs.el (vc-sccs-checkin):
* lisp/vc/vc-cvs.el (vc-cvs-checkin):
* lisp/vc/vc-rcs.el (vc-rcs-checkin): Allow to optionally specify
a revision to checkin.
* lisp/vc/vc.el (vc-next-action): Allow to optionally specify the
revision when checking in files.
See http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00688.html
for the details.
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.
* 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.
* 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.
* 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.
* 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.
* 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.
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.