Commit graph

131 commits

Author SHA1 Message Date
Stefan Monnier
e97a42c15b Make the log-edit comments use RFC822 format throughout.
* vc.el (vc-checkin, vc-modify-change-comment):
Adjust to new vc-start/finish-logentry.
(vc-find-conflicted-file): New command.
(vc-transfer-file): Adjust to new vc-checkin.
(vc-next-action): Improve scoping.

* vc-hg.el (vc-hg-log-edit-mode): Remove.
(vc-hg-checkin): Remove extra arg.  Use log-edit-extract-headers.

* vc-git.el (vc-git-log-edit-mode): Remove.
(vc-git-checkin): Remove extra arg.  Use log-edit-extract-headers.
(vc-git-commits-coding-system): Rename from git-commits-coding-system.

* vc-dispatcher.el (vc-log-edit): Shorten names for log-edit-show-files.
(vc-start-logentry): Remove argument `extra'.
(vc-finish-logentry): Remove extra args.

* vc-bzr.el (vc-bzr-log-edit-mode): Remove.
(vc-bzr-checkin): Remove extra arg.  Use log-edit-extract-headers.
(vc-bzr-conflicted-files): New function.

* log-edit.el (log-edit-extra-flags)
(log-edit-before-checkin-process): Remove.
(log-edit-summary, log-edit-header, log-edit-unknown-header): New faces.
(log-edit-headers-alist): New var.
(log-edit-header-contents-regexp): New const.
(log-edit-match-to-eoh): New function.
(log-edit-font-lock-keywords): Use them.
(log-edit): Insert a "Summary:" header as default.
(log-edit-mode): Mark font-lock rules as case-insensitive.
(log-edit-done): Cleanup headers.
(log-view-process-buffer): Remove.
(log-edit-extract-headers): New function to replace it.
2010-04-20 22:05:24 -04:00
Stefan Monnier
6e104790e7 Merge from emacs-23 2010-04-19 11:07:52 -04:00
Glenn Morris
10a311748b Improve previous change. 2010-04-15 19:45:26 -07:00
Glenn Morris
e9ef97770f * vc-git.el (vc-git-print-log): Doc fix. 2010-04-15 19:39:22 -07:00
Dan Nicolaescu
6aebd58cd2 Add --author support to git commit.
* vc-git.el (vc-git-checkin): Pass extra-args to the commit command.
(vc-git-log-edit-mode): New minor mode.
(log-edit-mode, log-edit-extra-flags, log-edit-mode): New
declarations.
2010-04-09 08:35:30 -07:00
Eric S. Raymond
f6d9077216 Improve documentation comments. 2010-04-09 10:17:52 -04:00
Dan Nicolaescu
31527c5682 Add new VC methods: vc-log-incoming and vc-log-outgoing.
* vc.el (vc-print-log-setup-buttons): New function split out from
vc-print-log-internal.
(vc-log-internal-common): New function, a parametrized version of
vc-print-log-internal.
(vc-print-log-internal): Just call vc-log-internal-common with the
right arguments.
(vc-incoming-outgoing-internal):
(vc-log-incoming, vc-log-outgoing): New functions.
(vc-log-view-type): New permanent local variable.

* vc-hooks.el (vc-menu-map): Bind vc-log-incoming and vc-log-outgoing.

* vc-bzr.el (vc-bzr-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log.
(vc-bzr-log-incoming, vc-bzr-log-outgoing): New functions.

* vc-git.el (vc-git-log-outgoing): New function.
(vc-git-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log.

* vc-hg.el (vc-hg-log-view-mode): Use vc-log-view-type instead
of the dynamic bound vc-short-log.  Highlight the tag.
(vc-hg-log-incoming, vc-hg-log-outgoing): New functions.
(vc-hg-outgoing, vc-hg-incoming, vc-hg-outgoing-mode):
(vc-hg-incoming-mode): Remove.
(vc-hg-extra-menu-map): Do not bind vc-hg-incoming and vc-hg-outgoing.
2010-04-06 22:56:35 -07:00
Dan Nicolaescu
09158997b5 Add special markup processing for commit logs.
* log-edit.el (log-edit-extra-flags): New variable.
(log-edit): Add new argument MODE.  Use that mode when non-nil
instead of the log-view-mode.
(log-view-process-buffer): New function.

* vc.el: Document that the checkin method takes optional
arguments.  Document new backend specific method: log-view-mode.
(vc-default-log-edit-mode): New function.
(vc-checkin): Use a backend specific log-view-mode.
Pass extra arguments to the checkin method.
(vc-modify-change-comment): Pass a dummy extra argument.

* vc-dispatcher.el (vc-log-edit): Add a mode argument, pass it to
log-edit.
(vc-start-logentry): Add a mode argument, pass it to vc-log-edit.
(vc-finish-logentry): Process the log buffer before passing it
down.  Pass log-edit-extra-flags.

* vc-bzr.el (vc-bzr-checkin): Pass extra arguments to the commit
command.
(log-edit-extra-flags, log-edit-before-checkin-process): New declarations.

* vc-hg.el (vc-hg-checkin): Pass extra arguments to the commit
command.
(log-edit-extra-flags, log-edit-before-checkin-process): New declarations.
(vc-hg-log-edit-mode): New derived mode.

* vc-arch.el (vc-arch-checkin):
* vc-cvs.el (vc-cvs-checkin):
* vc-git.el (vc-git-checkin):
* vc-mtn.el (vc-mtn-checkin):
* vc-rcs.el (vc-rcs-checkin):
* vc-sccs.el (vc-sccs-checkin):
* vc-svn.el (vc-svn-checkin): Add an optional ignored argument.
2010-03-19 02:37:41 -07:00
Stefan Monnier
53ef91b163 vc-git.el (vc-git-revision-table): Include remote branches. 2010-03-10 01:32:43 -05:00
Miles Bader
25344b050d (vc-git-print-log): Use "tformat:" for shortlog, instead of "format:"
This ensures that the output is newline-terminated.
2010-03-09 22:24:44 +09:00
Chong Yidong
1c465a6a67 Correct pathname for vc-git-annotate-extract-revision-at-line (Bug#5657)
* vc-git.el (vc-git-annotate-extract-revision-at-line): Use
vc-git-root as default direcotry for revision path (Bug#5657).
2010-03-07 09:45:53 -05:00
Stefan Monnier
4c83ed3d48 * vc-git.el: Re-flow to fit into 80 columns.
(vc-git-after-dir-status-stage, vc-git-dir-status-goto-stage):
Remove spurious `quote' element in each case alternative.
(vc-git-show-log-entry): Use prog1.
(vc-git-after-dir-status-stage): Remove unused var `remaining'.
2010-03-05 23:05:47 -05:00
Eric Hanchrow
504dcc71eb (vc-git-dir-status-goto-stage): Pass --relative to the
diff-index command.  This requires at least git-1.5.5.  (Bug#1589).
2010-01-24 20:46:40 -08:00
Dan Nicolaescu
c2f1d6d81e Remove support for adding --signoff on commit.
Future support will use an incompatible generic mechanism.
* vc-git.el (vc-git-add-signoff): Remove variable.
(vc-git-toggle-signoff): Remove function.
(vc-git-extra-menu-map): Do not bind vc-git-toggle-signoff.
2010-01-24 13:23:17 -08:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Juanma Barranquero
58941d03a5 Supersede color.diff settings in git log (bug#5211). 2009-12-28 03:43:28 +01:00
Dan Nicolaescu
e2f3c6923a Add support for stashing a snapshot of the current tree.
* vc-git.el (vc-git-stash-snapshot): New function.
(vc-git-stash-map, vc-git-extra-menu-map): Add a mapping for it.
2009-12-08 15:56:57 +00:00
Dan Nicolaescu
662c5698fb Support showing a single log entry from vc-annotate.
* vc.el (print-log): Add a new argument: START-REVISION.
(vc-print-log-internal): Add a new optional argument and
pass it to the backend.
(vc-print-log, vc-print-root-log): Adjust callers.
* vc-annotate.el (vc-annotate-show-log-revision-at-line): If a
buffer already displays the requested log entry, use it.
Otherwise display only the log entry in question.
* vc-svn.el (vc-svn-print-log):
* vc-mtn.el (log-view-file-re):
* vc-hg.el (vc-hg-state):
* vc-git.el (vc-git-print-log): Add support for new argument START-REVISION.
(vc-git-show-log-entry): Return t on success.
* vc-bzr.el (vc-bzr-print-log): Add support new argument START-REVISION.
(vc-bzr-show-log-entry): Return t on success.
* vc-rcs.el (vc-rcs-print-log):
* vc-sccs.el (vc-sccs-print-log):
* vc-cvs.el (vc-cvs-print-log): Add new argument, ignore it.
2009-12-07 09:02:11 +00:00
Dan Nicolaescu
0d3f8a7840 * vc-git.el (vc-git-print-log): Handle a limit argument. Display
the short log in graph form and with labels.
(vc-git-log-view-mode): Handle labels.
2009-12-06 22:18:03 +00:00
Dan Nicolaescu
cebf8ec6d9 Make vc-revert change VC state from 'added to 'unregistered.
* vc-git.el (vc-git-revert): Call git reset first.
2009-12-06 21:25:55 +00:00
Dan Nicolaescu
7fa4876f18 Support applying stashes. Improve UI.
* vc-git.el (vc-git-dir-extra-headers): Add tooltips.
(vc-git-stash-apply, vc-git-stash-pop)
(vc-git-stash-apply-at-point, vc-git-stash-pop-at-point)
(vc-git-stash-menu): New functions.
(vc-git-stash-menu-map): New variable.
(vc-git-stash-map): Add bindings to popup a menu and to apply stashes.
2009-12-03 04:08:08 +00:00
Dan Nicolaescu
379241fa2e (vc-git-registered): Call vc-git-root only once. 2009-11-30 21:21:35 +00:00
David Reitter
35179414e4 vc-git-registered: use checkout directory (where .git is)
rather than the file's directory and a relative path spec to work around a bug in git.
2009-11-24 15:31:01 +00:00
Dan Nicolaescu
48b2757534 * vc.el (vc-log-show-limit): Default to 2000.
(vc-print-log-internal): Insert buttons to request more entries
when limiting the output.

* vc-sccs.el (vc-sccs-print-log):
* vc-rcs.el (vc-rcs-print-log):
* vc-cvs.el (vc-cvs-print-log):
* vc-git.el (vc-git-print-log): Return 'limit-unsupported when
LIMIT is non-nil.
2009-11-16 20:36:06 +00:00
Dan Nicolaescu
6616006b02 * vc.el (vc-log-show-limit): New variable.
(vc-print-log, vc-print-root-log): Add new argument LIMIT.  Set it
when using a prefix argument.
(vc-print-log-internal): Add new argument LIMIT.

* vc-svn.el (vc-svn-print-log):
* vc-mtn.el (vc-mtn-print-log):
* vc-hg.el (vc-hg-print-log):
* vc-bzr.el (vc-bzr-print-log): Add new optional argument LIMIT,
pass it to the log command when set. Make the BUFFER argument
non-optional.

* vc-sccs.el (vc-sccs-print-log):
* vc-rcs.el (vc-rcs-print-log):
* vc-git.el (vc-git-print-log):
* vc-cvs.el (vc-cvs-print-log): Add new optional argument LIMIT,
ignore it.  Make the BUFFER argument non-optional
2009-11-15 20:28:58 +00:00
Glenn Morris
881e4184a3 (vc-git-stash-map): Move definition before use. 2009-11-05 03:24:08 +00:00
Dan Nicolaescu
d1e4c4037e Make vc-annotate work through copies and renames.
* vc-annotate.el (vc-annotate-extract-revision-at-line): Return
the file name too.
(vc-annotate-revision-at-line)
(vc-annotate-find-revision-at-line)
(vc-annotate-revision-previous-to-line)
(vc-annotate-show-log-revision-at-line): Update to get the file
name from vc-annotate-extract-revision-at-line.
(vc-annotate-show-diff-revision-at-line-internal): Change the
argument to mean whether to show a file diff or not.  Get the file
name from vc-annotate-extract-revision-at-line.
(vc-annotate-show-diff-revision-at-line): Update
vc-annotate-show-diff-revision-at-line call.
(vc-annotate-warp-revision): Add an optional file argument.

* vc-git.el (vc-git-annotate-command): Pass -C -C to the blame command.
(vc-git-annotate-extract-revision-at-line): Also return the file
name if found.

* vc-hg.el (vc-hg-annotate-command): Pass --follow to the annotate
command.  Remove unused code.
(vc-hg-annotate-re): Update to match --follow output.
(vc-hg-annotate-extract-revision-at-line): Also return the file
name if found.

* vc.el: Update annotate-extract-revision-at-line documentation.
2009-10-19 05:04:22 +00:00
Dan Nicolaescu
52964e5474 (vc-git-dir-extra-headers): Set the branch name
correctly in the detached head case.
(vc-git-print-log): Remove unused binding.
2009-10-14 06:28:00 +00:00
Dan Nicolaescu
0e172cc2c1 (vc-git-dir-extra-headers): Add keymap and mouse-face
properties to the stash strings.
(vc-git-stash-list): Return a list of strings.
(vc-git-stash-get-at-point, vc-git-stash-delete-at-point)
(vc-git-stash-show-at-point): New functions.
(vc-git-stash-map): New keymap.
2009-09-20 19:51:35 +00:00
Dan Nicolaescu
79d316d36d (vc-git-log-view-mode): Undo inadvertent change. 2009-09-15 17:52:42 +00:00
Dan Nicolaescu
60308853c3 (vc-git-dir-extra-headers): Show the remote location. 2009-09-15 00:11:51 +00:00
Dan Nicolaescu
32ba3abcc1 * vc.el (top): print-log method now takes an optional SHORTLOG
argument.  Add a new method: root.

* vc-hooks.el (vc-prefix-map, vc-menu-map): Add bindings for
vc-print-root-log and vc-print-root-diff.

* vc-bzr.el (vc-bzr-log-view-mode, vc-bzr-print-log):
* vc-git.el (vc-git-print-log, vc-git-log-view-mode):
* vc-hg.el (vc-hg-print-log, vc-hg-log-view-mode): Add support for
short logs.

* vc-cvs.el (vc-cvs-print-log):
* vc-mtn.el (vc-mtn-print-log):
* vc-rcs.el (vc-rcs-print-log):
* vc-sccs.el (vc-sccs-print-log):
* vc-svn.el (vc-svn-print-log): Add an optional argument shortlog
that is ignored for now.
2009-09-14 04:38:49 +00:00
Nick Roberts
2f1c4cd068 (vc-git-annotate-command): Use separator to parse
arguments correctly.
2009-09-06 22:08:31 +00:00
Dan Nicolaescu
2ddf440db1 (vc-git-stash, vc-git-stash-show): New functions.
(vc-git-extra-menu-map): Bind them.
2009-08-26 07:01:09 +00:00
Dan Nicolaescu
b91f07620f (vc-git-register): Use "git add" for directories. 2009-08-26 06:48:58 +00:00
Michael Albinus
20c76c553c * vc-git.el (vc-git-registered, vc-git-working-revision)
(vc-git-find-revision, vc-git-diff, vc-git-revision-table)
(vc-git--empty-db-p): Let-bind `process-file-side-effects' with nil.
2009-08-25 09:01:38 +00:00
Dan Nicolaescu
bbe1f50262 (vc-git-annotate-command): Run asynchronously.
Explicitly pass the date format to git blame so that user local
so that the output format can be parsed.
2009-08-21 03:37:33 +00:00
Dan Nicolaescu
76e1446450 (vc-git-checkin): Fix typo. 2009-07-28 08:06:36 +00:00
Dan Nicolaescu
2a0e33798a (vc-git--run-command-string): Accept a nil FILE argument.
(vc-git-stash-list): New function.
(vc-git-dir-extra-headers): Use it.
2009-07-23 06:42:50 +00:00
Dan Nicolaescu
0a2ddfa661 (vc-git-add-signoff): New variable.
(vc-git-checkin): Use it.
(vc-git-toggle-signoff): New function.
(vc-git-extra-menu-map): Bind it to menu.
2009-07-23 05:17:27 +00:00
Dan Nicolaescu
3c3bf6ce8f Remove find-file-not-found-hook VC method. (Bug#2757)
* vc-hooks.el (vc-file-not-found-hook)
(vc-default-find-file-not-found-hook): Remove functions.
(find-file-not-found-functions): Do not add vc-file-not-found-hook.
* vc-rcs.el (vc-rcs-find-file-not-found-hook): Remove function.
* vc.el:
* vc-hg.el:
* vc-git.el: Do not mention find-file-not-found-hook VC method.
2009-06-26 23:53:55 +00:00
Alexandre Julliard
4537363ca5 * vc-git.el (vc-git-previous-revision, vc-git-next-revision):
Fall back to original commit if vc-git-symbolic-commit fails to
find a symbolic name.
(vc-git-symbolic-commit): Don't limit search to tags. Treat
"undefined" as an error. (Bug #2110)
2009-03-13 20:04:11 +00:00
Dan Nicolaescu
c7f9e44060 * vc-dir.el (vc-dir-filename-mouse-map): Rename from vc-dir-mouse-map.
(vc-default-dir-printer): Add a comment about updating this function.

* vc-git.el (vc-git-dir-printer): Use vc-dir-filename-mouse-map
for the file name.
2009-02-11 06:36:32 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Andreas Schwab
7f4a3168c8 (vc-git-dir-printer): Fix filename column. 2008-12-27 22:24:31 +00:00
Glenn Morris
b6889b6553 (vc-git-diff-switches): Doc fix. 2008-12-03 07:36:53 +00:00
Glenn Morris
68159bc533 (vc-git-diff): No need to duplicate vc-switches logic. 2008-11-30 01:44:33 +00:00
Glenn Morris
a0bea999ea (vc-git-diff-switches): New option.
(vc-git-diff): Apply diff switches.  (Bug#1386)
Give it a basic doc string.
2008-11-26 02:55:28 +00:00
Dan Nicolaescu
13ad745788 * vc.el: Rename VC methods that were missed when vc-status was
renamed to vc-dir.
* vc-svn.el (vc-svn-dir-extra-headers): Rename from
vc-svn-status-extra-headers.
* vc-hg.el (vc-hg-dir-printer): Rename from vc-hg-status-printer.
(vc-hg-dir-extra-header): Rename from vc-hg-status-extra-headers.
* vc-git.el (vc-git-dir-printer): Rename from vc-dir-status-printer.
(vc-git-dir-extra-headers): Rename from vc-git-status-extra-headers.
* vc-dir.el (vc-dir-mode): Use vc-dir-printer instead of
vc-dir-status-printer.
(vc-dir-headers): Use `dir-extra-headers' instead of
`status-extra-headers'
(vc-dir-printer): Rename from vc-dir-status-printer.
(vc-default-dir-extra-headers): Rename from
vc-default-status-extra-headers.
* vc-cvs.el (vc-cvs-dir-extra-headers): Rename from
vc-cvs-status-extra-headers.
2008-10-27 07:21:43 +00:00
Dan Nicolaescu
07ebab6658 * vc-git.el (vc-git-show-log-entry): Include the revision in the
search string.
2008-10-14 07:05:07 +00:00