1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00
Commit Graph

82 Commits

Author SHA1 Message Date
Dmitry Gutov
06083cf41c Don't pass DIR to 'hg status'
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
Don't pass DIR to 'hg status' (bug#22481).
2016-01-30 06:56:08 +03:00
Dmitry Gutov
cca0f93359 ; Account for spaces before the filename 2016-01-10 04:38:34 +03:00
Dmitry Gutov
c71e1e86df Use short date for 'hg annotate', and output the author
* 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.
2016-01-10 04:13:01 +03:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Dmitry Gutov
f4747f6c51 Use 'hg id' in vc-hg-previous-revision
* lisp/vc/vc-hg.el (vc-hg-previous-revision):
Use 'hg id' to retrieve it (bug#22032).
2015-12-18 06:59:03 +02:00
Dmitry Gutov
2a4362ba62 Work around the asynchronous-empty-diff problem
* 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): Ignore the ASYNC argument,
do a synchronous process call (bug#21969).
2015-11-22 07:00:31 +02:00
Karl Fogel
3c3aad7335 When VC detects a conflict, specify which 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.
2015-11-09 15:57:29 -06:00
Dmitry Gutov
9db11fa2d6 ; Revert "Don't declare vc-exec-after anymore"
This reverts commit 5e4395544c.

(http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02009.html)
2015-10-28 02:43:14 +02:00
Dmitry Gutov
b1d39288e5 Pipe Hg commit descriptions through 'tabindent'
* lisp/vc/vc-hg.el (vc-hg-log-format): Pipe commit description
through 'tabindent'.
(vc-hg-log-view-mode): Set tab-width to 2 locally.
(http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02259.html)
2015-10-28 02:42:51 +02:00
Dmitry Gutov
99ded6be7a Show full commit messages in 'hg log' when appropriate
* lisp/vc/vc-hg.el (vc-hg-log-format): New variable.
(vc-hg-print-log, vc-hg-expanded-log-entry): Use it.
(http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02191.html)
2015-10-27 14:55:06 +02:00
Dmitry Gutov
5e4395544c Don't declare vc-exec-after anymore
* lisp/vc/vc-svn.el:
* lisp/vc/vc-mtn.el:
* lisp/vc/vc-hg.el:
* lisp/vc/vc-cvs.el:
* lisp/vc/vc-git.el:
* lisp/vc/vc-bzr.el: Don't declare vc-exec-after anymore.  Its
usages have been replaced with vc-run-delayed.
2015-10-20 22:07:20 +03:00
Eli Zaretskii
9ea6c4df44 Resurrect the ability to specify a revision in vc-next-action
* 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.
2015-09-19 13:31:38 +03:00
Dmitry Gutov
a215fe8a8d vc-hg: Perform the print-log call asynchronously
* lisp/vc/vc-hg.el (vc-hg-print-log): Perform the call
asynchronously (bug#21067).
2015-07-19 20:51:28 +03:00
Glenn Morris
660c30cc8c Add basic VC push support.
* lisp/vc/vc.el (vc-push): New autoloaded command.
* lisp/vc/vc-hooks.el (vc-prefix-map, vc-menu-map): Add vc-push.
* lisp/vc/vc-bzr.el (vc-bzr--pushpull): New, factored from vc-bzr-pull.
(vc-bzr-pull): Reimplement using vc-bzr--pushpull.
(vc-bzr-push): New.
* lisp/vc/vc-git.el (vc-git--pushpull): New, factored from vc-git-pull.
(vc-git-pull): Reimplement using vc-git--pushpull.
(vc-git-push): New.
* lisp/vc/vc-hg.el (vc-hg--pushpull): New, factored from vc-hg-pull.
(vc-hg-pull, vc-hg-push): Reimplement using vc-hg--pushpull.
* doc/emacs/maintaining.texi (Pulling / Pushing):
Rename from "VC Pull".  Mention pushing.
(VC With A Merging VCS, VC Change Log): Update xrefs.
(Branches): Update menu.
* doc/emacs/emacs.texi: Update menu.
* etc/NEWS: Mention this.
2015-05-12 20:42:42 -04:00
Glenn Morris
ce7ff436ff Function declaration updates prompted by 'make check-declare'
* lisp/emacs-lisp/package.el (lm-homepage):
* lisp/gnus/gnus-util.el (iswitchb-read-buffer):
* lisp/gnus/mm-decode.el (libxml-parse-html-region):
* lisp/gnus/mml.el (libxml-parse-html-region):
* lisp/gnus/nnrss.el (libxml-parse-html-region):
* lisp/net/eww.el (libxml-parse-html-region):
* lisp/net/shr.el (libxml-parse-html-region):
* lisp/vc/vc-bzr.el (vc-annotate-convert-time):
* lisp/vc/vc-cvs.el (vc-annotate-convert-time):
* lisp/vc/vc-git.el (vc-annotate-convert-time):
* lisp/vc/vc-hg.el (vc-annotate-convert-time):
* lisp/vc/vc-mtn.el (vc-annotate-convert-time):
* lisp/vc/vc-rcs.el (vc-annotate-convert-time):
Update declaration.
2015-04-30 20:06:15 -04: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
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
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
Michael Albinus
452921cfc1 * vc/vc-hg.el (vc-hg-state): Make FILE absolute. Handle the case
that there is empty output.
2014-12-11 11:12:13 +01:00
Dmitry Gutov
5872f843ff Fix bug#19304
Fixes: debbugs:19304

* lisp/vc/vc-hg.el (vc-hg-dir-status-files): Only include ignores files
when FILES is non-nil.
2014-12-08 18:24:07 +02: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
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
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
Eric S. Raymond
4893831f69 Update some documentation changes and todo items. 2014-12-01 10:57:09 -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
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
Dmitry Gutov
5ceb233b2d Fixes: debbugs:18579
* lisp/vc/vc-hg.el (vc-hg-dir-status-files): Include ignored files.
2014-11-24 04:11:36 +02:00
Michael Albinus
cd22fd754b Propagate remote process environment.
* net/tramp-sh.el (tramp-sh-handle-start-file-process)
(tramp-sh-handle-process-file): Propagate `process-environment'.

* vc/vc-hg.el (vc-hg-state): No special handling for remote files;
Tramp propagates environment variables now.
2014-11-22 12:37:04 +01: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
Michael Albinus
260cedec96 Backport: Fixes: debbugs:18940
* vc/vc-hg.el (vc-hg-state): Disable pager.

Conflicts:
	lisp/ChangeLog
2014-11-15 17:52:14 +01:00
Michael Albinus
a85cf0d9fe Fixes: debbugs:18940
* vc/vc-hg.el (vc-hg-state): Disable pager.
2014-11-13 16:26:51 +01:00
Santiago Payà i Miralta
739ba4636b * lisp/vc/vc-hg.el (vc-hg-log-graph): New var.
(vc-hg-print-log): Use it.
(vc-hg-root-log-format): Include branch name and bookmarks; ignore
graph output.

Fixes: debbugs:17515
2014-10-20 20:14:07 -04:00
Glenn Morris
36cf8493af Merge from emacs-24; up to 2014-06-01T23:37:59Z!eggert@cs.ucla.edu 2014-06-07 17:35:27 -07:00
Santiago Payà i Miralta
3112e4002c * lisp/vc/vc-hg.el (vc-hg-create-tag, vc-hg-retrieve-tag): New functions.
Fixes: debbugs:17586
2014-06-06 12:38:44 -04:00
Santiago Payà i Miralta
f4be80b783 * lisp/vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
vc-hg-command.

Fixes: debbugs:17570
2014-06-06 12:29:55 -04:00
Santiago Payà i Miralta
90b15d9159 * lisp/vc/vc-hg.el (vc-hg-log-graph): New var.
(vc-hg-print-log): Use it.
(vc-hg-root-log-format): Include branch name and bookmarks; ignore
graph output.

Fixes: debbugs:17515
2014-06-06 12:11:53 -04:00
Santiago Payà i Miralta
0add095990 * lisp/vc/vc-hg.el (vc-hg-unregister): New function (tiny change)
Fixes: debbugs:17454
2014-05-10 19:01:08 -07:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Stefan Monnier
9c750ebae6 * lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
(vc-do-command, vc-set-async-update):
* lisp/vc/vc-mtn.el (vc-mtn-dir-status):
* lisp/vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
(vc-hg-pull, vc-hg-merge-branch):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
(vc-git-merge-branch):
* lisp/vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
(vc-cvs-dir-status-files):
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
(vc-bzr-dir-status-files):
* lisp/vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
* lisp/vc/vc-annotate.el: Use lexical-binding.
(vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
(vc-annotate): Don't use `goto-line'.
* lisp/vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
(vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
* lisp/vc/vc-svn.el: Use lexical-binding.
(vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
* lisp/vc/vc-sccs.el:
* lisp/vc/vc-rcs.el: Use lexical-binding.
2013-09-04 17:09:42 -04:00
Xue Fuqiao
63191d9f20 Some fixes for vc-ignore.
* lisp/vc/vc.el (vc-ignore): Rewrite.
(vc-default-ignore): New function.
(vc-default-ignore-completion-table): Use find-ignore-file.

* lisp/vc/vc-bzr.el (vc-bzr-ignore, vc-bzr-ignore-completion-table):
* lisp/vc/vc-git.el (vc-git-ignore, vc-git-ignore-completion-table):
* lisp/vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table):
Remove.  Most code moved to vc.el.

* doc/emacs/maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument.
2013-09-04 08:31:13 +08:00
Xue Fuqiao
ab419665ca Cleanup for vc-ignore.
* vc/vc.el (vc-ignore): Rewrite.
(vc-default-ignore-completion-table):
(vc--read-lines):
(vc--add-line, vc--remove-regexp): New functions.

* vc/vc-svn.el (vc-svn-ignore): Doc fix.
(vc-svn-ignore-completion-table): New function.

* vc/vc-hg.el (vc-hg-ignore): Rewrite.
(vc-hg-ignore-completion-table):
(vc-hg-find-ignore-file): New functions.

* vc/vc-git.el (vc-git-ignore): Rewrite.
(vc-git-ignore-completion-table):
(vc-git-find-ignore-file): New functions.

* vc/vc-dir.el (vc-dir-menu-map): Add menu for vc-dir-ignore.

* vc/vc-bzr.el (vc-bzr-ignore): Rewrite.
(vc-bzr-ignore-completion-table):
(vc-bzr-find-ignore-file): New functions.
2013-08-04 10:55:45 +08:00
Xue Fuqiao
5c09de04ca vc-ignore fixes.
* vc/vc-svn.el (vc-svn-ignore): Remove `interactive'.  Use `*vc*'
buffer for output.

* vc/vc-hg.el (vc-hg-ignore): Remove `interactive'; do not assume
point-min==1; fix search string; fix parentheses missing.

* vc/vc-git.el (vc-git-ignore): Remove `interactive'; do not
assume point-min==1; fix search string; fix parentheses missing.

* vc/vc-cvs.el (vc-cvs-ignore): Remove `interactive'.

* vc/vc-bzr.el (vc-bzr-ignore): Remove `interactive'.  Use `*vc*'
buffer for output.
2013-07-30 11:46:06 +08:00