* bug#881: patch for bug #881
@ 2010-01-05 1:21 Tom Tromey
0 siblings, 0 replies; 37+ messages in thread
From: Tom Tromey @ 2010-01-05 1:21 UTC (permalink / raw)
To: 881
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
I think this patch fixes bug #881.
It is against the emacs-23 branch, because I could not check out the
trunk today.
Tom
[-- Attachment #2: bzr bundle --]
[-- Type: application/octet-stream, Size: 3453 bytes --]
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: tromey@parfait-20100104234027-y3gkd6f482s7cquv
# target_branch: http://bzr.savannah.gnu.org/r/emacs/emacs-23
# testament_sha1: 634f8a0038f082a2c3461bf9a39d77cb1dcc42ea
# timestamp: 2010-01-04 16:41:31 -0700
# base_revision_id: monnier@iro.umontreal.ca-20100104181838-\
# wm58d3xythe6k8qz
#
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2010-01-04 06:40:30 +0000
+++ lisp/ChangeLog 2010-01-04 23:40:27 +0000
@@ -1,3 +1,9 @@
+2010-01-04 Tom Tromey <tromey@redhat.com>
+
+ Bug #881:
+ * progmodes/python.el (python-font-lock-keywords): Handle
+ qualified decorators.
+
2010-01-04 Dan Nicolaescu <dann@ics.uci.edu>
* vc-bzr.el (vc-bzr-state-heuristic): Make it work for lightweight
=== modified file 'lisp/progmodes/python.el'
--- lisp/progmodes/python.el 2009-12-14 16:19:24 +0000
+++ lisp/progmodes/python.el 2010-01-04 23:40:27 +0000
@@ -1,6 +1,6 @@
;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*-
-;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
;; Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
@@ -112,7 +112,8 @@
;; Top-level assignments are worth highlighting.
(,(rx line-start (group (1+ (or word ?_))) (0+ space) "=")
(1 font-lock-variable-name-face))
- (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)))) ; decorators
+ (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_))
+ (0+ "." (1+ (or word ?_))))) ; decorators
(1 font-lock-type-face))
;; Built-ins. (The next three blocks are from
;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWX3vqOAAAmTfgGAwWH///9tE
BAS/7//wUAS4k9ys2b3nr2y3Y9e4SUQTEp+VP0xTaYqfqemE0JqeU8UDE00Akpok08jJqn6CT1TQ
bUDQNAAAASggip+JT8E1D0aoZpqGjI0bSaYI9QMSJpJ+plMjCB+oJkZGTTTTJpptCaBJIjTJT0NG
EamyAKaPUaAANNBAehUiDczdnutvg/ko/hlt9TPQhpsDR7YWAkWWEZRgsZtC8RseMVz8uB65i6W6
pnjI4ZKCqL5+Iex6N7a8YK8lr3IjSyoeSwhjhl4Hz538zDjGW49KXjI/imaojHbndTJfjtuq2GJP
7XRdUPNagYvIYgu2kbPqz11tby6c5cyanduqk7RQw/wrPnJYZveysA8nAi5TMe4M95RccJ1QBbsr
e5K6vawT7U950OsLLDZyzEGbmVnYE6UHFEO5REtBITI5AQWTRBJCSH2u2JPQphcqTBQJWnmRB6jO
70Zw7oTPWgga2QvawLPsPGuUo94npPV3Ct1sMMs1KbhYL6w8ANHYbnTjqQyfpyPQy5KHqeK6ECZG
tN8yJn/ZG93HXFzOS0Sxb4vBQFTpvNKAPthIj8osWKczASotpaKKB5WOJOAgUytc5iyV/cbEcgvA
obvr1TVm6q8NcO8BhNSh0OdTUCT5CVIiQGAlAirOI5EJoxcAuyJfQXpEumaywklF97QFWqYqS+Kb
7tX44ibxM6JXM9lmJgVEoRGGOD7cBiZd95rHStfQmVUL3gUmZQwwoqIDIJD639BdY0eQpMMqHkAt
juLE1dNZFYJ0AeA9UaD/oWhSGTRzVSpx3XCcROSyZrjAY122hrkWvKqXbKcQjVKt8KVWd83EoYFo
WKUoTpWfCznBTqxKhcCl6BYMO4T1g6HkcYIrV4pFJVac/RGEmZMjUHUhUsRj0dC9NEzJhUP7P90c
2XaaUZoHlF15ykuj31KumeUA0WvsIDfgsFPRXX2FcljrO2cFbTq44dFTBd9Hy28y3eHSmG6UCou4
mkCbKbEnL+XaxRyNhYHiBEHPygjjHW54lFBUcpslHRC7oYLmrX2mB4Dpw70d3XWFilNJA7BtDzOa
UxyNI2XMz8r+cRPMu7iLpq6m0Q7JcneHycWHCtUJg1XZ7FzynH7ChFCHApNja2FfgBzGMRRINkZX
EoBOSB+ywwLOLTI27zcp9DEMIt4DpyyPkL8NJc7VJC84i/VMLB7S+VEs/rD+UYNrfUGpcInhTGHN
E9d+25+lFa6oo2oOnnAmvXNYAOu1otwDuTgiiLBt3xXGva1uvScSXWvSnUUS/GAJ2jWILAwYwmEU
TJWBCYhJyY0zFnmgGdkQjBgEXypURZzOP/jxx/S8cCbhSwMHaKpZQOm84okaVQnnJlqj2141a9jD
BxQPUYUtjRR7oV++DNiLr87QK1lI3CZHwZFysnS0cdKegjz1RksU643DhEH8oEqWyVM90GwbqAq2
venSuoyuQYmFTzJzQ1rX0W/6gDaPHOP0GgbNsDrgBG6rMSRMUiubeb0xDsRnD4w5Gtgfpv2v++9x
avCGADNLuJkatRjB4qMVZVKKa1eiRpKoTzEAMCO+303iiHytCgJO/xdyRThQkH3vqOA=
^ permalink raw reply [flat|nested] 37+ messages in thread
* bug#881: patch for bug #881
@ 2010-01-05 22:11 Chong Yidong
2010-01-06 0:43 ` Juanma Barranquero
0 siblings, 1 reply; 37+ messages in thread
From: Chong Yidong @ 2010-01-05 22:11 UTC (permalink / raw)
To: Tom Tromey; +Cc: 881, Torsten Bronger
> I think this patch fixes bug #881.
>
> It is against the emacs-23 branch, because I could not check out the
> trunk today.
Applied, thanks.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-05 22:11 bug#881: patch for bug #881 Chong Yidong
@ 2010-01-06 0:43 ` Juanma Barranquero
2010-01-06 3:35 ` Karl Fogel
` (2 more replies)
0 siblings, 3 replies; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-06 0:43 UTC (permalink / raw)
To: Chong Yidong; +Cc: Emacs developers
On Tue, Jan 5, 2010 at 23:11, Chong Yidong <cyd@stupidchicken.com> wrote:
>> It is against the emacs-23 branch, because I could not check out the
>> trunk today.
>
> Applied, thanks.
When applying changes by non-committers, should we use the --author
option of commit? If so, is that supported by VC?
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 0:43 ` Juanma Barranquero
@ 2010-01-06 3:35 ` Karl Fogel
2010-01-06 4:12 ` Juanma Barranquero
2010-01-06 4:13 ` Eli Zaretskii
2010-01-06 4:34 ` Stefan Monnier
2 siblings, 1 reply; 37+ messages in thread
From: Karl Fogel @ 2010-01-06 3:35 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Chong Yidong, Emacs developers
Juanma Barranquero <lekktu@gmail.com> writes:
>On Tue, Jan 5, 2010 at 23:11, Chong Yidong <cyd@stupidchicken.com> wrote:
>>> It is against the emacs-23 branch, because I could not check out the
>>> trunk today.
>>
>> Applied, thanks.
>
>When applying changes by non-committers, should we use the --author
>option of commit? If so, is that supported by VC?
That's a really good question, and I don't know the answer (either on
the bzr end or the VC side). I recommend asking on the Bazaar list;
they have experience with this and will have good advice.
-K
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 3:35 ` Karl Fogel
@ 2010-01-06 4:12 ` Juanma Barranquero
2010-01-06 4:19 ` Karl Fogel
0 siblings, 1 reply; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-06 4:12 UTC (permalink / raw)
To: Karl Fogel; +Cc: Chong Yidong, Emacs developers
On Wed, Jan 6, 2010 at 04:35, Karl Fogel <kfogel@red-bean.com> wrote:
> That's a really good question, and I don't know the answer (either on
> the bzr end or the VC side). I recommend asking on the Bazaar list;
> they have experience with this and will have good advice.
Umm, ask what? The --author option exists; whether to use it or not
should be a matter of policy. And if we need the Bazaar people (no
offense intended, of course) to explain us VC's functionality, that'd
be quite funny.
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 0:43 ` Juanma Barranquero
2010-01-06 3:35 ` Karl Fogel
@ 2010-01-06 4:13 ` Eli Zaretskii
2010-01-06 4:34 ` Stefan Monnier
2 siblings, 0 replies; 37+ messages in thread
From: Eli Zaretskii @ 2010-01-06 4:13 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: cyd, emacs-devel
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Wed, 6 Jan 2010 01:43:35 +0100
> Cc: Emacs developers <emacs-devel@gnu.org>
>
> When applying changes by non-committers, should we use the --author
> option of commit?
I think we should, and I'm doing that.
> If so, is that supported by VC?
No idea, I'm doing that from the command line.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 4:12 ` Juanma Barranquero
@ 2010-01-06 4:19 ` Karl Fogel
2010-01-06 10:12 ` Juanma Barranquero
0 siblings, 1 reply; 37+ messages in thread
From: Karl Fogel @ 2010-01-06 4:19 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Chong Yidong, Emacs developers
Juanma Barranquero <lekktu@gmail.com> writes:
>On Wed, Jan 6, 2010 at 04:35, Karl Fogel <kfogel@red-bean.com> wrote:
>> That's a really good question, and I don't know the answer (either on
>> the bzr end or the VC side). I recommend asking on the Bazaar list;
>> they have experience with this and will have good advice.
>
>Umm, ask what? The --author option exists; whether to use it or not
>should be a matter of policy. And if we need the Bazaar people (no
>offense intended, of course) to explain us VC's functionality, that'd
>be quite funny.
I didn't realize that you'd already established that the semantics of
'--author' are what you want, and that the only question is how to
access that via VC. If that's the case, then there is no reason to ask
on the Bazaar list, I agree.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 0:43 ` Juanma Barranquero
2010-01-06 3:35 ` Karl Fogel
2010-01-06 4:13 ` Eli Zaretskii
@ 2010-01-06 4:34 ` Stefan Monnier
2010-01-06 7:00 ` Dan Nicolaescu
2010-01-16 21:50 ` bug#881: patch for bug #881 Chong Yidong
2 siblings, 2 replies; 37+ messages in thread
From: Stefan Monnier @ 2010-01-06 4:34 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Chong Yidong, Emacs developers
>>> It is against the emacs-23 branch, because I could not check out the
>>> trunk today.
>> Applied, thanks.
> When applying changes by non-committers, should we use the --author
> option of commit?
Yes, that would be good. We will even have to require it if/when we
decide to auto-generate the ChangeLog file.
> If so, is that supported by VC?
I don't think so,
Stefan
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 4:34 ` Stefan Monnier
@ 2010-01-06 7:00 ` Dan Nicolaescu
2010-01-06 7:22 ` Óscar Fuentes
2010-01-06 14:20 ` Stefan Monnier
2010-01-16 21:50 ` bug#881: patch for bug #881 Chong Yidong
1 sibling, 2 replies; 37+ messages in thread
From: Dan Nicolaescu @ 2010-01-06 7:00 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Juanma Barranquero, Chong Yidong, Emacs developers
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >>> It is against the emacs-23 branch, because I could not check out the
> >>> trunk today.
> >> Applied, thanks.
> > When applying changes by non-committers, should we use the --author
> > option of commit?
>
> Yes, that would be good. We will even have to require it if/when we
> decide to auto-generate the ChangeLog file.
>
> > If so, is that supported by VC?
>
> I don't think so,
How should it work? We don't have any nice generic mechanism/UI for
doing VC backend specific things in the commit buffer.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 7:00 ` Dan Nicolaescu
@ 2010-01-06 7:22 ` Óscar Fuentes
2010-01-06 9:34 ` Stephen J. Turnbull
2010-01-06 14:20 ` Stefan Monnier
1 sibling, 1 reply; 37+ messages in thread
From: Óscar Fuentes @ 2010-01-06 7:22 UTC (permalink / raw)
To: emacs-devel
Dan Nicolaescu <dann@ics.uci.edu> writes:
> > > When applying changes by non-committers, should we use the --author
> > > option of commit?
> >
> > Yes, that would be good. We will even have to require it if/when we
> > decide to auto-generate the ChangeLog file.
> >
> > > If so, is that supported by VC?
> >
> > I don't think so,
>
> How should it work? We don't have any nice generic mechanism/UI for
> doing VC backend specific things in the commit buffer.
Maybe something like
##--author="John Doe <joe@doe.com>"
<<rest of commit message here>>
BTW, psvn and similar packages put some explicative text on top of the
buffer plus the list of files to be committed:
## Lines starting with '## ' will be removed from the log message.
## File(s) to commit recursively:
## foo/bar.org
I think this would be useful specially now that it is important to
commit all files at once. So VC would show:
## Lines starting with '## ' will be removed from the log message.
## Lines starting with '##-' indicate extra arguments for the command.
## File(s) to commit recursively:
## foo/bar.org
--
Óscar
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 7:22 ` Óscar Fuentes
@ 2010-01-06 9:34 ` Stephen J. Turnbull
0 siblings, 0 replies; 37+ messages in thread
From: Stephen J. Turnbull @ 2010-01-06 9:34 UTC (permalink / raw)
To: Óscar Fuentes; +Cc: emacs-devel
Óscar Fuentes writes:
> Maybe something like
>
> ##--author="John Doe <joe@doe.com>"
> <<rest of commit message here>>
That's one possibility.
Another would be a vc-commit-mode (or vc-commit-minor-mode?) which
would provide a keymap you could use to either specify individual
commit options (--amend comes immediately to mind) or enter a dialog.
The advantage to doing this would be that the commit mode could use
history (applying several commits from the same author, for example).
In both cases it would be nice to have hooks to scarf author (and
maybe commit message) out of a ChangeLog, or mail headers for that
matter.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 4:19 ` Karl Fogel
@ 2010-01-06 10:12 ` Juanma Barranquero
2010-01-06 18:15 ` Eli Zaretskii
0 siblings, 1 reply; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-06 10:12 UTC (permalink / raw)
To: Karl Fogel; +Cc: Chong Yidong, Emacs developers
On Wed, Jan 6, 2010 at 05:19, Karl Fogel <kfogel@red-bean.com> wrote:
> I didn't realize that you'd already established that the semantics of
> '--author' are what you want
It's difficult to know, because the help for commit talks a bit about
author, and other than that there seems to be not much documentation
about setting the author vs. the committer (or likely, there is a lot
such documentation but I haven't found it). But the semantics would
have to be very weird to make incorrect to set the real author of the
committed code :-)
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 7:00 ` Dan Nicolaescu
2010-01-06 7:22 ` Óscar Fuentes
@ 2010-01-06 14:20 ` Stefan Monnier
2010-01-06 18:29 ` Dan Nicolaescu
` (2 more replies)
1 sibling, 3 replies; 37+ messages in thread
From: Stefan Monnier @ 2010-01-06 14:20 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Juanma Barranquero, Chong Yidong, Emacs developers
> How should it work? We don't have any nice generic mechanism/UI for
> doing VC backend specific things in the commit buffer.
It's a general concept, although it's not supported by all backends.
I'd imagine some log-edit-mode command that set log-edit-author and is
then somehow passed to VC via the log-edit-callback which then passes it
to the backend as an additional argument to the `commit' operation.
Maybe the easiest way is to store the info directly in the text in the
form of a "Author: ..." line somewhere.
Along similar lines, we'd like a way to pass the "--fixes" arg to Bzr,
so maybe we should let log-edit-mode use a buffer in a RFC822-like format,
where backends may recognize some headers ("Subject", "Author",
"Fixes", ...) and discard others.
Stefan
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 10:12 ` Juanma Barranquero
@ 2010-01-06 18:15 ` Eli Zaretskii
2010-01-06 20:43 ` Juanma Barranquero
0 siblings, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2010-01-06 18:15 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: kfogel, cyd, emacs-devel
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Wed, 6 Jan 2010 11:12:29 +0100
> Cc: Chong Yidong <cyd@stupidchicken.com>,
> Emacs developers <emacs-devel@gnu.org>
>
> On Wed, Jan 6, 2010 at 05:19, Karl Fogel <kfogel@red-bean.com> wrote:
>
> > I didn't realize that you'd already established that the semantics of
> > '--author' are what you want
>
> It's difficult to know, because the help for commit talks a bit about
> author, and other than that there seems to be not much documentation
> about setting the author vs. the committer (or likely, there is a lot
> such documentation but I haven't found it). But the semantics would
> have to be very weird to make incorrect to set the real author of the
> committed code :-)
Type
bzr log -r "revid:eliz@gnu.org-20100102213336-hnnaav0wq0al1gni"
and see there what syntax I used.
It's the same syntax as in "bzr whoami", I simply submitted the string
you see in the log of the above revision, enclosed in quotes.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 14:20 ` Stefan Monnier
@ 2010-01-06 18:29 ` Dan Nicolaescu
2010-01-06 20:19 ` Stefan Monnier
2010-01-06 18:29 ` Eli Zaretskii
2010-01-06 20:00 ` Committing other people's changes (was: bug#881: patch for bug #881) Reiner Steib
2 siblings, 1 reply; 37+ messages in thread
From: Dan Nicolaescu @ 2010-01-06 18:29 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Juanma Barranquero, Chong Yidong, Emacs developers
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > How should it work? We don't have any nice generic mechanism/UI for
> > doing VC backend specific things in the commit buffer.
>
> It's a general concept, although it's not supported by all backends.
The general concept is that backends want to do backend specific things :-)
For example git might want to add "--signoff"
Or might want to add "--amend", in which case the log for the latest
commit should be inserted in the log-edit buffer for further editing.
> I'd imagine some log-edit-mode command that set log-edit-author and is
> then somehow passed to VC via the log-edit-callback which then passes it
> to the backend as an additional argument to the `commit' operation.
>
> Maybe the easiest way is to store the info directly in the text in the
> form of a "Author: ..." line somewhere.
>
> Along similar lines, we'd like a way to pass the "--fixes" arg to Bzr,
> so maybe we should let log-edit-mode use a buffer in a RFC822-like format,
> where backends may recognize some headers ("Subject", "Author",
> "Fixes", ...) and discard others.
This would be helpful, but not enough, we also want to have some key
bindings, menu entries for backend specific things.
So how about starting by replacing the call to `log-edit' in
`vc-log-edit' with (vc-call-backend backend 'log-edit)
and then each backend that so desires can implement a mode derived from
log-edit and do whatever it wants (like we do for log-view).
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 14:20 ` Stefan Monnier
2010-01-06 18:29 ` Dan Nicolaescu
@ 2010-01-06 18:29 ` Eli Zaretskii
2010-01-06 18:52 ` Óscar Fuentes
2010-01-06 20:00 ` Committing other people's changes (was: bug#881: patch for bug #881) Reiner Steib
2 siblings, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2010-01-06 18:29 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 06 Jan 2010 09:20:04 -0500
> Cc: Juanma Barranquero <lekktu@gmail.com>, Chong Yidong <cyd@stupidchicken.com>,
> Emacs developers <emacs-devel@gnu.org>
>
> Along similar lines, we'd like a way to pass the "--fixes" arg to Bzr,
But that needs some setup, doesn't it? Or does the `deb:1234' syntax
shown by "bzr help bugs" supports already debbugs?
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 18:29 ` Eli Zaretskii
@ 2010-01-06 18:52 ` Óscar Fuentes
2010-01-06 20:20 ` Stefan Monnier
0 siblings, 1 reply; 37+ messages in thread
From: Óscar Fuentes @ 2010-01-06 18:52 UTC (permalink / raw)
To: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> Along similar lines, we'd like a way to pass the "--fixes" arg to Bzr,
>
> But that needs some setup, doesn't it? Or does the `deb:1234' syntax
> shown by "bzr help bugs" supports already debbugs?
It supports Debian's debbugs but not Emacs' debbugs. That means that
writing "--fixes deb:1000" will mark bug #1000 as fixed on
http://bugs.debian.org
I don't know if it is hardcoded or we can add support for it on Bazaar's
configuration file. The documentation is not clear at all for me. This
is a good reason for asking on Bazaar's ml or for browsing the source
code :-)
--
Óscar
^ permalink raw reply [flat|nested] 37+ messages in thread
* Committing other people's changes (was: bug#881: patch for bug #881)
2010-01-06 14:20 ` Stefan Monnier
2010-01-06 18:29 ` Dan Nicolaescu
2010-01-06 18:29 ` Eli Zaretskii
@ 2010-01-06 20:00 ` Reiner Steib
2 siblings, 0 replies; 37+ messages in thread
From: Reiner Steib @ 2010-01-06 20:00 UTC (permalink / raw)
To: emacs-devel
On Wed, Jan 06 2010, Stefan Monnier wrote:
> It's a general concept, although it's not supported by all backends.
> I'd imagine some log-edit-mode command that set log-edit-author and is
> then somehow passed to VC via the log-edit-callback which then passes it
> to the backend as an additional argument to the `commit' operation.
>
> Maybe the easiest way is to store the info directly in the text in the
> form of a "Author: ..." line somewhere.
>
> Along similar lines, we'd like a way to pass the "--fixes" arg to Bzr,
> so maybe we should let log-edit-mode use a buffer in a RFC822-like format,
> where backends may recognize some headers ("Subject", "Author",
> "Fixes", ...) and discard others.
Also with CVS (in VC and PCL-CVS) it would be useful to switch to the
"role" of a different user: When installing other people's changes it
would be nice if `add-change-log-entry' and friends use the other name
and address.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 18:29 ` Dan Nicolaescu
@ 2010-01-06 20:19 ` Stefan Monnier
2010-01-07 17:09 ` Dan Nicolaescu
0 siblings, 1 reply; 37+ messages in thread
From: Stefan Monnier @ 2010-01-06 20:19 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Juanma Barranquero, Chong Yidong, Emacs developers
>> > How should it work? We don't have any nice generic mechanism/UI for
>> > doing VC backend specific things in the commit buffer.
>> It's a general concept, although it's not supported by all backends.
> The general concept is that backends want to do backend specific things :-)
That's another part. But for "author", I think we should support it in
the generic part of the VC code. After all, it's a concept we've been
using in ChangeLog for ages: the fact that only recent VCS support it is
no excuse ;-)
> This would be helpful, but not enough, we also want to have some key
> bindings, menu entries for backend specific things.
> So how about starting by replacing the call to `log-edit' in
> `vc-log-edit' with (vc-call-backend backend 'log-edit)
> and then each backend that so desires can implement a mode derived from
> log-edit and do whatever it wants (like we do for log-view).
Fine by me. But please remember that whenever possible and meaningful,
it's better to add features to vc.el than to particular backends.
Stefan
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 18:52 ` Óscar Fuentes
@ 2010-01-06 20:20 ` Stefan Monnier
2010-01-06 20:40 ` Eli Zaretskii
0 siblings, 1 reply; 37+ messages in thread
From: Stefan Monnier @ 2010-01-06 20:20 UTC (permalink / raw)
To: Óscar Fuentes; +Cc: emacs-devel
> I don't know if it is hardcoded or we can add support for it on Bazaar's
> configuration file.
IIRC you can add support for it via the configuration file.
Stefan
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 20:20 ` Stefan Monnier
@ 2010-01-06 20:40 ` Eli Zaretskii
2010-01-07 15:33 ` Juanma Barranquero
0 siblings, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2010-01-06 20:40 UTC (permalink / raw)
To: Stefan Monnier; +Cc: ofv, emacs-devel
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Wed, 06 Jan 2010 15:20:26 -0500
> Cc: emacs-devel@gnu.org
>
> > I don't know if it is hardcoded or we can add support for it on Bazaar's
> > configuration file.
>
> IIRC you can add support for it via the configuration file.
Yes, but how exactly? "bzr help bugs" tries to explain something, but
I'd need to try that to see if I understand what it says. If you
already tried, please tell what to put in the configuration file.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 18:15 ` Eli Zaretskii
@ 2010-01-06 20:43 ` Juanma Barranquero
2010-01-07 4:14 ` Eli Zaretskii
0 siblings, 1 reply; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-06 20:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: kfogel, cyd, emacs-devel
On Wed, Jan 6, 2010 at 19:15, Eli Zaretskii <eliz@gnu.org> wrote:
> Type
>
> bzr log -r "revid:eliz@gnu.org-20100102213336-hnnaav0wq0al1gni"
>
> and see there what syntax I used.
>
> It's the same syntax as in "bzr whoami", I simply submitted the string
> you see in the log of the above revision, enclosed in quotes.
The syntax was clear, I was asking about semantics. I see that a bzr
log and qlog show the author and not the committer; surely that's all?
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 20:43 ` Juanma Barranquero
@ 2010-01-07 4:14 ` Eli Zaretskii
2010-01-07 9:13 ` Juanma Barranquero
0 siblings, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2010-01-07 4:14 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: kfogel, cyd, emacs-devel
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Wed, 6 Jan 2010 21:43:44 +0100
> Cc: kfogel@red-bean.com, cyd@stupidchicken.com, emacs-devel@gnu.org
>
> On Wed, Jan 6, 2010 at 19:15, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Type
> >
> > bzr log -r "revid:eliz@gnu.org-20100102213336-hnnaav0wq0al1gni"
> >
> > and see there what syntax I used.
> >
> > It's the same syntax as in "bzr whoami", I simply submitted the string
> > you see in the log of the above revision, enclosed in quotes.
>
> The syntax was clear
Sorry for my misunderstanding.
> I was asking about semantics. I see that a bzr log and qlog show the
> author and not the committer; surely that's all?
For me, it shows both the author and the committer:
revno: 99248
revision-id: eliz@gnu.org-20100102213336-hnnaav0wq0al1gni
parent: eliz@gnu.org-20100102203141-u7k63n409g6mylfm
author: Kevin Ryde <user42@zip.com.au>
committer: Eli Zaretskii <eliz@gnu.org>
branch nick: trunk
timestamp: Sat 2010-01-02 23:33:36 +0200
message:
eieio.texi (Naming Conventions): Correction to xref on elisp
coding conventions, is "Tips" node not "Standards".
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-07 4:14 ` Eli Zaretskii
@ 2010-01-07 9:13 ` Juanma Barranquero
0 siblings, 0 replies; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-07 9:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: kfogel, cyd, emacs-devel
On Thu, Jan 7, 2010 at 05:14, Eli Zaretskii <eliz@gnu.org> wrote:
> For me, it shows both the author and the committer:
Sorry, my mistake; I was talking about "log --line".
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 20:40 ` Eli Zaretskii
@ 2010-01-07 15:33 ` Juanma Barranquero
2010-01-07 17:15 ` bzr --fixes [was Re: bug#881: patch for bug #881] Glenn Morris
0 siblings, 1 reply; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-07 15:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: ofv, Stefan Monnier, emacs-devel
On Wed, Jan 6, 2010 at 21:40, Eli Zaretskii <eliz@gnu.org> wrote:
> Yes, but how exactly? "bzr help bugs" tries to explain something, but
> I'd need to try that to see if I understand what it says.
Well, that document says
Support for generating the URLs for any project using Bugzilla or Trac
is built in, along with a template mechanism for other bugtrackers with
simple URL schemes. If your bug tracker can't be described by one
of the schemes described below then you can write a plugin to support
it.
so presumably, to use the --fixed facility, debbugs.gnu.org should
have a way to mark a bug as fixed through the web interface (a "simple
URL scheme") so we can build an appropriate
bugtracker_<tracker_abbrevation>_url. Does it have it?
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 20:19 ` Stefan Monnier
@ 2010-01-07 17:09 ` Dan Nicolaescu
2010-01-07 20:07 ` Stefan Monnier
0 siblings, 1 reply; 37+ messages in thread
From: Dan Nicolaescu @ 2010-01-07 17:09 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Juanma Barranquero, Chong Yidong, Emacs developers
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> >> > How should it work? We don't have any nice generic mechanism/UI for
> >> > doing VC backend specific things in the commit buffer.
> >> It's a general concept, although it's not supported by all backends.
> > The general concept is that backends want to do backend specific things :-)
>
> That's another part. But for "author", I think we should support it in
> the generic part of the VC code. After all, it's a concept we've been
> using in ChangeLog for ages: the fact that only recent VCS support it is
> no excuse ;-)
>
> > This would be helpful, but not enough, we also want to have some key
> > bindings, menu entries for backend specific things.
>
> > So how about starting by replacing the call to `log-edit' in
> > `vc-log-edit' with (vc-call-backend backend 'log-edit)
>
> > and then each backend that so desires can implement a mode derived from
> > log-edit and do whatever it wants (like we do for log-view).
>
> Fine by me. But please remember that whenever possible and meaningful,
> it's better to add features to vc.el than to particular backends.
Here's a 100% untested version of this. It serves all the needs I can
think off at the moment.
git can add "--amend" and "--signoff" to `log-edit-extra-flags'.
Author: "foo bar" foo@bar.baz
can be dealt with using `log-edit-before-checkin-process'.
We can add a key binding to log-edit.el to insert Author: in the buffer.
The part that removes the extra markup (i.e. Author: ) from the buffer
is not implemented, but it should not be too hard.
What do you think?
Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.746
diff -u -3 -p -r1.746 vc.el
--- vc.el 7 Dec 2009 09:02:16 -0000 1.746
+++ vc.el 7 Jan 2010 16:56:25 -0000
@@ -261,7 +261,7 @@
;; Unregister FILE from this backend. This is only needed if this
;; backend may be used as a "more local" backend for temporary editing.
;;
-;; * checkin (files rev comment)
+;; * checkin (files rev comment &rest args)
;;
;; Commit changes in FILES to this backend. If REV is non-nil, that
;; should become the new revision number (not all backends do
@@ -269,6 +269,7 @@
;; implementation should pass the value of vc-checkin-switches to
;; the backend command. (Note: in older versions of VC, this
;; command took a single file argument and not a list.)
+;; ARGS should be passed to the backend command.
;;
;; * find-revision (file rev buffer)
;;
@@ -477,6 +478,12 @@
;; Return the revision number that follows REV for FILE, or nil if no such
;; revision exists.
;;
+;; - log-edit-mode ()
+;;
+;; Return a symbol that is the mode to use for editing the check in
+;; log. This defaults to `log-edit-mode' and is expected to be
+;; changed (if at all) to a derived mode of `log-edit-mode'.
+;;
;; - check-headers ()
;;
;; Return non-nil if the current buffer contains any version headers.
@@ -1348,7 +1365,7 @@ Runs the normal hooks `vc-before-checkin
files rev comment initial-contents
"Enter a change comment."
"*VC-log*"
- (lambda (files rev comment)
+ (lambda (files rev comment extra-flags)
(message "Checking in %s..." (vc-delistify files))
;; "This log message intentionally left almost blank".
;; RCS 5.7 gripes about white-space-only comments too.
@@ -1359,7 +1376,7 @@ Runs the normal hooks `vc-before-checkin
;; We used to change buffers to get local value of vc-checkin-switches,
;; but 'the' local buffer is not a well-defined concept for filesets.
(progn
- (vc-call-backend backend 'checkin files rev comment)
+ (vc-call-backend backend 'checkin files rev comment extra-flags)
(mapc 'vc-delete-automatic-version-backups files))
`((vc-state . up-to-date)
(vc-checkout-time . ,(nth 5 (file-attributes file)))
@@ -1729,7 +1746,7 @@ The headers are reset to their non-expan
files rev oldcomment t
"Enter a replacement change comment."
"*VC-log*"
- (lambda (files rev comment)
+ (lambda (files rev comment ignored)
(vc-call-backend
;; Less of a kluge than it looks like; log-view mode only passes
;; this function a singleton list. Arguments left in this form in
@@ -2414,6 +2431,8 @@ to provide the `find-revision' operation
(defalias 'vc-default-check-headers 'ignore)
+(defun vc-default-log-edit-mode (backend) 'log-edit-mode)
+
(defun vc-default-log-view-mode (backend) (log-view-mode))
(defun vc-default-show-log-entry (backend rev)
Index: vc-dispatcher.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-dispatcher.el,v
retrieving revision 1.71
diff -u -3 -p -r1.71 vc-dispatcher.el
--- vc-dispatcher.el 1 Oct 2009 03:32:27 -0000 1.71
+++ vc-dispatcher.el 7 Jan 2010 16:56:26 -0000
@@ -526,7 +526,9 @@ NOT-URGENT means it is ok to continue if
(log-edit 'vc-finish-logentry
nil
`((log-edit-listfun . (lambda () ',fileset))
- (log-edit-diff-function . (lambda () (vc-diff nil)))))
+ (log-edit-diff-function . (lambda () (vc-diff nil))))
+ nil
+ (vc-call-backend (car fileset) 'log-edit-mode))
(set (make-local-variable 'vc-log-fileset) fileset)
(make-local-variable 'vc-log-extra)
(set-buffer-modified-p nil)
@@ -587,6 +589,15 @@ the buffer contents as a comment."
(or (vc-dispatcher-browsing) (vc-buffer-sync)))
(unless vc-log-operation
(error "No log operation is pending"))
+
+ ;; FIXME: this should be a function in log-edit.el
+ (when log-edit-before-checkin-process
+ (dolist (crt log-edit-before-checkin-process)
+ ;; Remove all lines matching (car crt)
+ ;; Append to `log-edit-extra-flags' the results of (cdr crt).
+ )
+ )
+
;; save the parameters held in buffer-local variables
(let ((logbuf (current-buffer))
(log-operation vc-log-operation)
@@ -601,7 +612,8 @@ the buffer contents as a comment."
(funcall log-operation
log-fileset
log-extra
- log-entry))
+ log-entry
+ log-edit-extra-flags))
;; Remove checkin window (after the checkin so that if that fails
;; we don't zap the log buffer and the typing therein).
;; -- IMO this should be replaced with quit-window
Index: log-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/log-edit.el,v
retrieving revision 1.56
diff -u -3 -p -r1.56 log-edit.el
--- log-edit.el 2 Oct 2009 03:48:41 -0000 1.56
+++ log-edit.el 7 Jan 2010 16:56:26 -0000
@@ -185,6 +185,25 @@ when this variable is set to nil.")
(defvar log-edit-callback nil)
(defvar log-edit-diff-function nil)
(defvar log-edit-listfun nil)
+(defvar log-edit-extra-flags nil
+ "List of extra flags to pass to the check in command.")
+(defvar log-edit-before-checkin-process nil
+ "Alist that contains instructions for processing the commit message before check in.
+
+The format is: (REGEXP . INSTRUCTIONS).
+
+All lines matching REGEXP are removed.
+
+For example:
+
+(\"^#.*\" . nil)
+means: just remove all lines starting with #. This can be used
+to insert lines in the commit buffer that contain for example the
+list of files to be committed.
+
+(\"Author: \\(.*\\)\" . (list \"--author\" (match-string 1)))
+means: append (list \"--author\" (match-string 1)) to
+`log-edit-extra-flags'.")
(defvar log-edit-parent-buffer nil)
;;; Originally taken from VC-Log mode
@@ -315,9 +334,10 @@ automatically."
(2 font-lock-function-name-face))))
;;;###autoload
-(defun log-edit (callback &optional setup params buffer &rest ignore)
+(defun log-edit (callback &optional setup params buffer mode &rest ignore)
"Setup a buffer to enter a log message.
-\\<log-edit-mode-map>The buffer will be put in `log-edit-mode'.
+\\<log-edit-mode-map>The buffer will be put in mode MODE or `log-edit-mode'
+if MODE is nil.
If SETUP is non-nil, the buffer is then erased and `log-edit-hook' is run.
Mark and point will be set around the entire contents of the buffer so
that it is easy to kill the contents of the buffer with \\[kill-region].
@@ -338,7 +358,9 @@ uses the current buffer."
(when (and log-edit-setup-invert (not (eq setup 'force)))
(setq setup (not setup)))
(when setup (erase-buffer))
- (log-edit-mode)
+ (if mode
+ (funcall mode)
+ (log-edit-mode))
(set (make-local-variable 'log-edit-callback) callback)
(if (listp params)
(dolist (crt params)
^ permalink raw reply [flat|nested] 37+ messages in thread
* bzr --fixes [was Re: bug#881: patch for bug #881]
2010-01-07 15:33 ` Juanma Barranquero
@ 2010-01-07 17:15 ` Glenn Morris
2010-01-07 20:12 ` Juanma Barranquero
0 siblings, 1 reply; 37+ messages in thread
From: Glenn Morris @ 2010-01-07 17:15 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: ofv, Eli Zaretskii, Stefan Monnier, emacs-devel
Juanma Barranquero wrote:
> so presumably, to use the --fixed facility, debbugs.gnu.org should
> have a way to mark a bug as fixed through the web interface (a "simple
> URL scheme") so we can build an appropriate
> bugtracker_<tracker_abbrevation>_url. Does it have it?
If bugs.debian.org can do it, debbugs.gnu.org should be able to,
although some configuration might be needed. Can bugs.debian.org do
such a thing, mark a bug as closed via a url? I have never heard of
it.
It sounds like a bit of a nightmare, if random web-links can close
bugs.
Is this feature actually indented to close bugs, or just provide a
link to the report? The latter would just be
http://debbugs.gnu.org/1234.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-07 17:09 ` Dan Nicolaescu
@ 2010-01-07 20:07 ` Stefan Monnier
0 siblings, 0 replies; 37+ messages in thread
From: Stefan Monnier @ 2010-01-07 20:07 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Juanma Barranquero, Chong Yidong, Emacs developers
> Here's a 100% untested version of this. It serves all the needs I can
> think off at the moment.
> git can add "--amend" and "--signoff" to `log-edit-extra-flags'.
> Author: "foo bar" foo@bar.baz
> can be dealt with using `log-edit-before-checkin-process'.
> We can add a key binding to log-edit.el to insert Author: in the buffer.
> The part that removes the extra markup (i.e. Author: ) from the buffer
> is not implemented, but it should not be too hard.
> What do you think?
I dislike the `log-edit-mode' which returns a function rather that
running the code directly. And of course the "FIXME: this should be
a function in log-edit.el" would need to be fixed.
This said, I was thinking of something simpler: let the RFC822-like
message go unchanged to the backend, so if the backend doesn't support
"Author:" that line will just end up staying in the commit message,
which doesn't seem like a bad way to handle this case.
Of course, vc.el should provide some generic function(s) to parse the
RFC822-like format, so backends don't have to do it all by hand.
Stefan
> Index: vc.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
> retrieving revision 1.746
> diff -u -3 -p -r1.746 vc.el
> --- vc.el 7 Dec 2009 09:02:16 -0000 1.746
> +++ vc.el 7 Jan 2010 16:56:25 -0000
> @@ -261,7 +261,7 @@
> ;; Unregister FILE from this backend. This is only needed if this
> ;; backend may be used as a "more local" backend for temporary editing.
> ;;
> -;; * checkin (files rev comment)
> +;; * checkin (files rev comment &rest args)
> ;;
> ;; Commit changes in FILES to this backend. If REV is non-nil, that
> ;; should become the new revision number (not all backends do
> @@ -269,6 +269,7 @@
> ;; implementation should pass the value of vc-checkin-switches to
> ;; the backend command. (Note: in older versions of VC, this
> ;; command took a single file argument and not a list.)
> +;; ARGS should be passed to the backend command.
> ;;
> ;; * find-revision (file rev buffer)
> ;;
> @@ -477,6 +478,12 @@
> ;; Return the revision number that follows REV for FILE, or nil if no such
> ;; revision exists.
> ;;
> +;; - log-edit-mode ()
> +;;
> +;; Return a symbol that is the mode to use for editing the check in
> +;; log. This defaults to `log-edit-mode' and is expected to be
> +;; changed (if at all) to a derived mode of `log-edit-mode'.
> +;;
> ;; - check-headers ()
> ;;
> ;; Return non-nil if the current buffer contains any version headers.
> @@ -1348,7 +1365,7 @@ Runs the normal hooks `vc-before-checkin
> files rev comment initial-contents
> "Enter a change comment."
> "*VC-log*"
> - (lambda (files rev comment)
> + (lambda (files rev comment extra-flags)
> (message "Checking in %s..." (vc-delistify files))
> ;; "This log message intentionally left almost blank".
> ;; RCS 5.7 gripes about white-space-only comments too.
> @@ -1359,7 +1376,7 @@ Runs the normal hooks `vc-before-checkin
> ;; We used to change buffers to get local value of vc-checkin-switches,
> ;; but 'the' local buffer is not a well-defined concept for filesets.
> (progn
> - (vc-call-backend backend 'checkin files rev comment)
> + (vc-call-backend backend 'checkin files rev comment extra-flags)
> (mapc 'vc-delete-automatic-version-backups files))
> `((vc-state . up-to-date)
> (vc-checkout-time . ,(nth 5 (file-attributes file)))
> @@ -1729,7 +1746,7 @@ The headers are reset to their non-expan
> files rev oldcomment t
> "Enter a replacement change comment."
> "*VC-log*"
> - (lambda (files rev comment)
> + (lambda (files rev comment ignored)
> (vc-call-backend
> ;; Less of a kluge than it looks like; log-view mode only passes
> ;; this function a singleton list. Arguments left in this form in
> @@ -2414,6 +2431,8 @@ to provide the `find-revision' operation
> (defalias 'vc-default-check-headers 'ignore)
> +(defun vc-default-log-edit-mode (backend) 'log-edit-mode)
> +
> (defun vc-default-log-view-mode (backend) (log-view-mode))
> (defun vc-default-show-log-entry (backend rev)
> Index: vc-dispatcher.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/vc-dispatcher.el,v
> retrieving revision 1.71
> diff -u -3 -p -r1.71 vc-dispatcher.el
> --- vc-dispatcher.el 1 Oct 2009 03:32:27 -0000 1.71
> +++ vc-dispatcher.el 7 Jan 2010 16:56:26 -0000
> @@ -526,7 +526,9 @@ NOT-URGENT means it is ok to continue if
> (log-edit 'vc-finish-logentry
> nil
> `((log-edit-listfun . (lambda () ',fileset))
> - (log-edit-diff-function . (lambda () (vc-diff nil)))))
> + (log-edit-diff-function . (lambda () (vc-diff nil))))
> + nil
> + (vc-call-backend (car fileset) 'log-edit-mode))
> (set (make-local-variable 'vc-log-fileset) fileset)
> (make-local-variable 'vc-log-extra)
> (set-buffer-modified-p nil)
> @@ -587,6 +589,15 @@ the buffer contents as a comment."
> (or (vc-dispatcher-browsing) (vc-buffer-sync)))
> (unless vc-log-operation
> (error "No log operation is pending"))
> +
> + ;; FIXME: this should be a function in log-edit.el
> + (when log-edit-before-checkin-process
> + (dolist (crt log-edit-before-checkin-process)
> + ;; Remove all lines matching (car crt)
> + ;; Append to `log-edit-extra-flags' the results of (cdr crt).
> + )
> + )
> +
> ;; save the parameters held in buffer-local variables
> (let ((logbuf (current-buffer))
> (log-operation vc-log-operation)
> @@ -601,7 +612,8 @@ the buffer contents as a comment."
> (funcall log-operation
> log-fileset
> log-extra
> - log-entry))
> + log-entry
> + log-edit-extra-flags))
> ;; Remove checkin window (after the checkin so that if that fails
> ;; we don't zap the log buffer and the typing therein).
> ;; -- IMO this should be replaced with quit-window
> Index: log-edit.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/log-edit.el,v
> retrieving revision 1.56
> diff -u -3 -p -r1.56 log-edit.el
> --- log-edit.el 2 Oct 2009 03:48:41 -0000 1.56
> +++ log-edit.el 7 Jan 2010 16:56:26 -0000
> @@ -185,6 +185,25 @@ when this variable is set to nil.")
> (defvar log-edit-callback nil)
> (defvar log-edit-diff-function nil)
> (defvar log-edit-listfun nil)
> +(defvar log-edit-extra-flags nil
> + "List of extra flags to pass to the check in command.")
> +(defvar log-edit-before-checkin-process nil
> + "Alist that contains instructions for processing the commit message before check in.
> +
> +The format is: (REGEXP . INSTRUCTIONS).
> +
> +All lines matching REGEXP are removed.
> +
> +For example:
> +
> +(\"^#.*\" . nil)
> +means: just remove all lines starting with #. This can be used
> +to insert lines in the commit buffer that contain for example the
> +list of files to be committed.
> +
> +(\"Author: \\(.*\\)\" . (list \"--author\" (match-string 1)))
> +means: append (list \"--author\" (match-string 1)) to
> +`log-edit-extra-flags'.")
> (defvar log-edit-parent-buffer nil)
> ;;; Originally taken from VC-Log mode
> @@ -315,9 +334,10 @@ automatically."
> (2 font-lock-function-name-face))))
> ;;;###autoload
> -(defun log-edit (callback &optional setup params buffer &rest ignore)
> +(defun log-edit (callback &optional setup params buffer mode &rest ignore)
> "Setup a buffer to enter a log message.
> -\\<log-edit-mode-map>The buffer will be put in `log-edit-mode'.
> +\\<log-edit-mode-map>The buffer will be put in mode MODE or `log-edit-mode'
> +if MODE is nil.
> If SETUP is non-nil, the buffer is then erased and `log-edit-hook' is run.
> Mark and point will be set around the entire contents of the buffer so
> that it is easy to kill the contents of the buffer with \\[kill-region].
> @@ -338,7 +358,9 @@ uses the current buffer."
> (when (and log-edit-setup-invert (not (eq setup 'force)))
> (setq setup (not setup)))
> (when setup (erase-buffer))
> - (log-edit-mode)
> + (if mode
> + (funcall mode)
> + (log-edit-mode))
> (set (make-local-variable 'log-edit-callback) callback)
> (if (listp params)
> (dolist (crt params)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bzr --fixes [was Re: bug#881: patch for bug #881]
2010-01-07 17:15 ` bzr --fixes [was Re: bug#881: patch for bug #881] Glenn Morris
@ 2010-01-07 20:12 ` Juanma Barranquero
2010-01-07 20:34 ` bzr --fixes Glenn Morris
0 siblings, 1 reply; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-07 20:12 UTC (permalink / raw)
To: Glenn Morris; +Cc: ofv, Eli Zaretskii, Stefan Monnier, emacs-devel
On Thu, Jan 7, 2010 at 18:15, Glenn Morris <rgm@gnu.org> wrote:
> If bugs.debian.org can do it, debbugs.gnu.org should be able to,
> although some configuration might be needed. Can bugs.debian.org do
> such a thing, mark a bug as closed via a url? I have never heard of
> it.
Well, Bazaar documentation is as always a bit short on details.
However, bzr help bugs clearly states that "[t]his option can then be
used together with ``bzr commit --fixes`` to mark bugs in that tracker
as being fixed by that commit" in the description of
(bugzilla|trac|bugtracker)_<tracker_abbreviation>_url.
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bzr --fixes
2010-01-07 20:12 ` Juanma Barranquero
@ 2010-01-07 20:34 ` Glenn Morris
2010-01-07 22:35 ` Juanma Barranquero
2010-01-08 8:27 ` Eli Zaretskii
0 siblings, 2 replies; 37+ messages in thread
From: Glenn Morris @ 2010-01-07 20:34 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: ofv, Eli Zaretskii, Stefan Monnier, emacs-devel
Juanma Barranquero wrote:
> Well, Bazaar documentation is as always a bit short on details.
I just found this:
http://doc.bazaar.canonical.com/latest/en/user-guide/bug_trackers.html
It seems all the --fixes thing does is record some metadata. I guess a
Savannah hook would be needed to then use that metadata to generate an
actual debbugs -done email that would really close the bug. It doesn't
seem worth the effort to me; seems fine to continue putting a bug
reference in the ChangeLog entry and sending a more friendly email to
the bug submitter by hand.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bzr --fixes
2010-01-07 20:34 ` bzr --fixes Glenn Morris
@ 2010-01-07 22:35 ` Juanma Barranquero
2010-01-08 9:01 ` Eli Zaretskii
2010-01-08 8:27 ` Eli Zaretskii
1 sibling, 1 reply; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-07 22:35 UTC (permalink / raw)
To: Glenn Morris; +Cc: ofv, Eli Zaretskii, Stefan Monnier, emacs-devel
On Thu, Jan 7, 2010 at 21:34, Glenn Morris <rgm@gnu.org> wrote:
> http://doc.bazaar.canonical.com/latest/en/user-guide/bug_trackers.html
>
> It seems all the --fixes thing does is record some metadata.
That seems to contradict what the bugs help topic says.
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bzr --fixes
2010-01-07 20:34 ` bzr --fixes Glenn Morris
2010-01-07 22:35 ` Juanma Barranquero
@ 2010-01-08 8:27 ` Eli Zaretskii
1 sibling, 0 replies; 37+ messages in thread
From: Eli Zaretskii @ 2010-01-08 8:27 UTC (permalink / raw)
To: Glenn Morris; +Cc: ofv, lekktu, monnier, emacs-devel
> From: Glenn Morris <rgm@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, ofv@wanadoo.es, Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
> Date: Thu, 07 Jan 2010 15:34:12 -0500
>
> It doesn't seem worth the effort to me; seems fine to continue
> putting a bug reference in the ChangeLog entry and sending a more
> friendly email to the bug submitter by hand.
I tend to agree.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bzr --fixes
2010-01-07 22:35 ` Juanma Barranquero
@ 2010-01-08 9:01 ` Eli Zaretskii
0 siblings, 0 replies; 37+ messages in thread
From: Eli Zaretskii @ 2010-01-08 9:01 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: emacs-devel
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Thu, 7 Jan 2010 23:35:55 +0100
> Cc: ofv@wanadoo.es, Eli Zaretskii <eliz@gnu.org>,
> Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
>
> On Thu, Jan 7, 2010 at 21:34, Glenn Morris <rgm@gnu.org> wrote:
>
> > http://doc.bazaar.canonical.com/latest/en/user-guide/bug_trackers.html
> >
> > It seems all the --fixes thing does is record some metadata.
>
> That seems to contradict what the bugs help topic says.
It's probably "use the source, Luc" time.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-06 4:34 ` Stefan Monnier
2010-01-06 7:00 ` Dan Nicolaescu
@ 2010-01-16 21:50 ` Chong Yidong
2010-01-16 21:52 ` Juanma Barranquero
1 sibling, 1 reply; 37+ messages in thread
From: Chong Yidong @ 2010-01-16 21:50 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Juanma Barranquero, Emacs developers
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> It is against the emacs-23 branch, because I could not check out the
>>>> trunk today.
>>> Applied, thanks.
>> When applying changes by non-committers, should we use the --author
>> option of commit?
>
> Yes, that would be good. We will even have to require it if/when we
> decide to auto-generate the ChangeLog file.
>
>> If so, is that supported by VC?
>
> I don't think so,
I don't think we should require --author until VC supports it.
It's a major inconvenience.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-16 21:50 ` bug#881: patch for bug #881 Chong Yidong
@ 2010-01-16 21:52 ` Juanma Barranquero
2010-01-16 22:30 ` Chong Yidong
0 siblings, 1 reply; 37+ messages in thread
From: Juanma Barranquero @ 2010-01-16 21:52 UTC (permalink / raw)
To: Chong Yidong; +Cc: Stefan Monnier, Emacs developers
On Sat, Jan 16, 2010 at 22:50, Chong Yidong <cyd@stupidchicken.com> wrote:
> I don't think we should require --author until VC supports it.
> It's a major inconvenience.
I think giving proper credit and keeping logs honest trumps over
inconvenience. But that's just MHO, of course.
Juanma
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-16 21:52 ` Juanma Barranquero
@ 2010-01-16 22:30 ` Chong Yidong
2010-01-17 9:38 ` Dan Nicolaescu
0 siblings, 1 reply; 37+ messages in thread
From: Chong Yidong @ 2010-01-16 22:30 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Stefan Monnier, Emacs developers
Juanma Barranquero <lekktu@gmail.com> writes:
> On Sat, Jan 16, 2010 at 22:50, Chong Yidong <cyd@stupidchicken.com> wrote:
>
>> I don't think we should require --author until VC supports it.
>> It's a major inconvenience.
>
> I think giving proper credit and keeping logs honest trumps over
> inconvenience. But that's just MHO, of course.
Our acknowledgements are generated from the ChangeLogs, so I don't think
that's the issue. Sure, it would be nice to use the --author flag,
because that's what the flag is intended for. But it is too
inconvenient unless VC can handle it.
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: bug#881: patch for bug #881
2010-01-16 22:30 ` Chong Yidong
@ 2010-01-17 9:38 ` Dan Nicolaescu
0 siblings, 0 replies; 37+ messages in thread
From: Dan Nicolaescu @ 2010-01-17 9:38 UTC (permalink / raw)
To: Chong Yidong; +Cc: Juanma Barranquero, Stefan Monnier, Emacs developers
Chong Yidong <cyd@stupidchicken.com> writes:
> Juanma Barranquero <lekktu@gmail.com> writes:
>
> > On Sat, Jan 16, 2010 at 22:50, Chong Yidong <cyd@stupidchicken.com> wrote:
> >
> >> I don't think we should require --author until VC supports it.
> >> It's a major inconvenience.
> >
> > I think giving proper credit and keeping logs honest trumps over
> > inconvenience. But that's just MHO, of course.
>
> Our acknowledgements are generated from the ChangeLogs, so I don't think
> that's the issue. Sure, it would be nice to use the --author flag,
> because that's what the flag is intended for. But it is too
> inconvenient unless VC can handle it.
I have a patch to add that functionality to VC.
Writing:
Author: The Real Author <author@blah.blah>
in the log edit buffer
will pass the right flag to "bzr commit".
Maybe an interactive function to ask the author information could be
added later.
Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.746
diff -u -3 -p -r1.746 vc.el
--- vc.el 7 Dec 2009 09:02:16 -0000 1.746
+++ vc.el 17 Jan 2010 09:22:23 -0000
@@ -261,7 +261,7 @@
;; Unregister FILE from this backend. This is only needed if this
;; backend may be used as a "more local" backend for temporary editing.
;;
-;; * checkin (files rev comment)
+;; * checkin (files rev comment &optional extra-args)
;;
;; Commit changes in FILES to this backend. If REV is non-nil, that
;; should become the new revision number (not all backends do
@@ -269,6 +269,7 @@
;; implementation should pass the value of vc-checkin-switches to
;; the backend command. (Note: in older versions of VC, this
;; command took a single file argument and not a list.)
+;; EXTRA-ARGS should be passed to the backend command.
;;
;; * find-revision (file rev buffer)
;;
@@ -477,6 +478,12 @@
;; Return the revision number that follows REV for FILE, or nil if no such
;; revision exists.
;;
+;; - log-edit-mode ()
+;;
+;; Turn on the mode used for editing the check in log. This
+;; defaults to `log-edit-mode'. If changed, it should use a mode
+;; derived from`log-edit-mode'.
+;;
;; - check-headers ()
;;
;; Return non-nil if the current buffer contains any version headers.
@@ -1348,7 +1365,9 @@ Runs the normal hooks `vc-before-checkin
files rev comment initial-contents
"Enter a change comment."
"*VC-log*"
- (lambda (files rev comment)
+ (lambda ()
+ (vc-call-backend backend 'log-edit-mode))
+ (lambda (files rev comment extra-flags)
(message "Checking in %s..." (vc-delistify files))
;; "This log message intentionally left almost blank".
;; RCS 5.7 gripes about white-space-only comments too.
@@ -1359,7 +1378,7 @@ Runs the normal hooks `vc-before-checkin
;; We used to change buffers to get local value of vc-checkin-switches,
;; but 'the' local buffer is not a well-defined concept for filesets.
(progn
- (vc-call-backend backend 'checkin files rev comment)
+ (vc-call-backend backend 'checkin files rev comment extra-flags)
(mapc 'vc-delete-automatic-version-backups files))
`((vc-state . up-to-date)
(vc-checkout-time . ,(nth 5 (file-attributes file)))
@@ -1729,7 +1748,7 @@ The headers are reset to their non-expan
files rev oldcomment t
"Enter a replacement change comment."
"*VC-log*"
- (lambda (files rev comment)
+ (lambda (files rev comment ignored)
(vc-call-backend
;; Less of a kluge than it looks like; log-view mode only passes
;; this function a singleton list. Arguments left in this form in
@@ -2414,6 +2433,8 @@ to provide the `find-revision' operation
(defalias 'vc-default-check-headers 'ignore)
+(defun vc-default-log-edit-mode (backend) (log-edit-mode))
+
(defun vc-default-log-view-mode (backend) (log-view-mode))
(defun vc-default-show-log-entry (backend rev)
Index: vc-dispatcher.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-dispatcher.el,v
retrieving revision 1.71
diff -u -3 -p -r1.71 vc-dispatcher.el
--- vc-dispatcher.el 1 Oct 2009 03:32:27 -0000 1.71
+++ vc-dispatcher.el 17 Jan 2010 09:22:23 -0000
@@ -519,20 +519,22 @@ NOT-URGENT means it is ok to continue if
;; Set up key bindings for use while editing log messages
-(defun vc-log-edit (fileset)
+(defun vc-log-edit (fileset mode)
"Set up `log-edit' for use on FILE."
(setq default-directory
(with-current-buffer vc-parent-buffer default-directory))
(log-edit 'vc-finish-logentry
nil
`((log-edit-listfun . (lambda () ',fileset))
- (log-edit-diff-function . (lambda () (vc-diff nil)))))
+ (log-edit-diff-function . (lambda () (vc-diff nil))))
+ nil
+ mode)
(set (make-local-variable 'vc-log-fileset) fileset)
(make-local-variable 'vc-log-extra)
(set-buffer-modified-p nil)
(setq buffer-file-name nil))
-(defun vc-start-logentry (files extra comment initial-contents msg logbuf action &optional after-hook)
+(defun vc-start-logentry (files extra comment initial-contents msg logbuf mode action &optional after-hook)
"Accept a comment for an operation on FILES with extra data EXTRA.
If COMMENT is nil, pop up a LOGBUF buffer, emit MSG, and set the
action on close to ACTION. If COMMENT is a string and
@@ -557,7 +559,7 @@ for `vc-log-after-operation-hook'."
(set (make-local-variable 'vc-parent-buffer) parent)
(set (make-local-variable 'vc-parent-buffer-name)
(concat " from " (buffer-name vc-parent-buffer)))
- (vc-log-edit files)
+ (vc-log-edit files mode)
(make-local-variable 'vc-log-after-operation-hook)
(when after-hook
(setq vc-log-after-operation-hook after-hook))
@@ -587,12 +589,16 @@ the buffer contents as a comment."
(or (vc-dispatcher-browsing) (vc-buffer-sync)))
(unless vc-log-operation
(error "No log operation is pending"))
+
+ (log-view-process-buffer)
+
;; save the parameters held in buffer-local variables
(let ((logbuf (current-buffer))
(log-operation vc-log-operation)
(log-fileset vc-log-fileset)
(log-extra vc-log-extra)
(log-entry (buffer-string))
+ (extra-flags log-edit-extra-flags)
(after-hook vc-log-after-operation-hook)
(tmp-vc-parent-buffer vc-parent-buffer))
(pop-to-buffer vc-parent-buffer)
@@ -601,7 +607,9 @@ the buffer contents as a comment."
(funcall log-operation
log-fileset
log-extra
- log-entry))
+ log-entry
+ extra-flags
+ ))
;; Remove checkin window (after the checkin so that if that fails
;; we don't zap the log buffer and the typing therein).
;; -- IMO this should be replaced with quit-window
Index: log-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/log-edit.el,v
retrieving revision 1.56
diff -u -3 -p -r1.56 log-edit.el
--- log-edit.el 2 Oct 2009 03:48:41 -0000 1.56
+++ log-edit.el 17 Jan 2010 09:22:24 -0000
@@ -185,6 +185,25 @@ when this variable is set to nil.")
(defvar log-edit-callback nil)
(defvar log-edit-diff-function nil)
(defvar log-edit-listfun nil)
+(defvar log-edit-extra-flags nil
+ "List of extra flags to pass to the check in command.")
+(defvar log-edit-before-checkin-process nil
+ "Alist that contains instructions for processing the commit message before check in.
+
+The format is: (REGEXP . INSTRUCTIONS).
+
+All lines matching REGEXP are removed.
+
+For example:
+
+(\"^#.*\" . nil)
+means: just remove all lines starting with #. This can be used
+to insert lines in the commit buffer that contain, for example, the
+list of files to be committed.
+
+(\"Author: \\(.*\\)\" . (list \"--author\" (match-string 1)))
+means: append (list \"--author\" (match-string 1)) to
+`log-edit-extra-flags'.")
(defvar log-edit-parent-buffer nil)
;;; Originally taken from VC-Log mode
@@ -315,9 +334,10 @@ automatically."
(2 font-lock-function-name-face))))
;;;###autoload
-(defun log-edit (callback &optional setup params buffer &rest ignore)
+(defun log-edit (callback &optional setup params buffer mode &rest ignore)
"Setup a buffer to enter a log message.
-\\<log-edit-mode-map>The buffer will be put in `log-edit-mode'.
+\\<log-edit-mode-map>The buffer will be put in mode MODE or `log-edit-mode'
+if MODE is nil.
If SETUP is non-nil, the buffer is then erased and `log-edit-hook' is run.
Mark and point will be set around the entire contents of the buffer so
that it is easy to kill the contents of the buffer with \\[kill-region].
@@ -338,7 +358,9 @@ uses the current buffer."
(when (and log-edit-setup-invert (not (eq setup 'force)))
(setq setup (not setup)))
(when setup (erase-buffer))
- (log-edit-mode)
+ (if mode
+ (funcall mode)
+ (log-edit-mode))
(set (make-local-variable 'log-edit-callback) callback)
(if (listp params)
(dolist (crt params)
@@ -707,6 +729,17 @@ Sort REGIONS front-to-back first."
(log-edit-changelog-insert-entries (car buffer-entry) (cdr buffer-entry))
(when (cdr buffer-entry) (newline)))))
+(defun log-view-process-buffer ()
+ (when log-edit-before-checkin-process
+ (dolist (crt log-edit-before-checkin-process)
+ ;; Remove all lines matching (car crt)
+ ;; Append to `log-edit-extra-flags' the results of (cdr crt).
+ (goto-char (point-min))
+ (while (re-search-forward (car crt) nil t)
+ (when (cdr crt)
+ (setq log-edit-extra-flags (append log-edit-extra-flags (eval (cdr crt)))))
+ (replace-match "" nil t)))))
+
(provide 'log-edit)
;; arch-tag: 8089b39c-983b-4e83-93cd-ed0a64c7fdcc
Index: vc-bzr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-bzr.el,v
retrieving revision 1.94
diff -u -3 -p -r1.94 vc-bzr.el
--- vc-bzr.el 9 Dec 2009 06:04:12 -0000 1.94
+++ vc-bzr.el 17 Jan 2010 09:22:24 -0000
@@ -426,11 +445,11 @@ or a superior directory.")
"Unregister FILE from bzr."
(vc-bzr-command "remove" nil 0 file "--keep"))
-(defun vc-bzr-checkin (files rev comment)
+(defun vc-bzr-checkin (files rev comment &optional extra-args)
"Check FILE in to bzr with log message COMMENT.
REV non-nil gets an error."
(if rev (error "Can't check in a specific revision with bzr"))
- (vc-bzr-command "commit" nil 0 files "-m" comment))
+ (apply 'vc-bzr-command "commit" nil 0 files (append (list "-m" comment) extra-args)))
(defun vc-bzr-find-revision (file rev buffer)
"Fetch revision REV of file FILE and put it into BUFFER."
@@ -520,6 +540,12 @@ REV non-nil gets an error."
(goto-char (point-min)))
found)))
+(define-derived-mode vc-bzr-log-edit-mode log-edit-mode "Bzr-Log-Edit"
+ (set (make-local-variable 'log-edit-extra-flags) nil)
+ (set (make-local-variable 'log-edit-before-checkin-process)
+ '(("^Author:[ \t]+\\(.*\\)[ \t]*$" . (list "--author" (match-string 1))))))
+
+
(defun vc-bzr-diff (files &optional rev1 rev2 buffer)
"VC bzr backend for diff."
;; `bzr diff' exits with code 1 if diff is non-empty.
@@ -722,7 +760,9 @@ stream. Standard error output is discar
(define-key map "\C-k" 'vc-bzr-shelve-delete-at-point)
;; (define-key map "=" 'vc-bzr-shelve-show-at-point)
;; (define-key map "\C-m" 'vc-bzr-shelve-show-at-point)
- (define-key map "A" 'vc-bzr-shelve-apply-at-point)
+ (define-key map "A" 'vc-bzr-shelve-apply-and-keep-at-point)
+ (define-key map "P" 'vc-bzr-shelve-apply-at-point)
+ (define-key map "S" 'vc-bzr-shelve-snapshot)
map))
(defvar vc-bzr-shelve-menu-map
@@ -731,8 +771,11 @@ stream. Standard error output is discar
'(menu-item "Delete shelf" vc-bzr-shelve-delete-at-point
:help "Delete the current shelf"))
(define-key map [ap]
- '(menu-item "Apply shelf" vc-bzr-shelve-apply-at-point
- :help "Apply the current shelf"))
+ '(menu-item "Apply and keep shelf" vc-bzr-shelve-apply-and-keep-at-point
+ :help "Apply the current shelf and keep it"))
+ (define-key map [po]
+ '(menu-item "Apply and remove shelf (pop)" vc-bzr-shelve-apply-at-point
+ :help "Apply the current shelf and remove it"))
;; (define-key map [sh]
;; '(menu-item "Show shelve" vc-bzr-shelve-show-at-point
;; :help "Show the contents of the current shelve"))
@@ -740,6 +783,9 @@ stream. Standard error output is discar
(defvar vc-bzr-extra-menu-map
(let ((map (make-sparse-keymap)))
+ (define-key map [bzr-sn]
+ '(menu-item "Shelve a snapshot" vc-bzr-shelve-snapshot
+ :help "Shelve the current state of the tree and keep the current state"))
(define-key map [bzr-sh]
'(menu-item "Shelve..." vc-bzr-shelve
:help "Shelve changes"))
@@ -790,7 +836,7 @@ stream. Standard error output is discar
(propertize x
'face 'font-lock-variable-name-face
'mouse-face 'highlight
- 'help-echo "mouse-3: Show shelve menu\nA: Apply shelf\nC-k: Delete shelf"
+ 'help-echo "mouse-3: Show shelve menu\nA: Apply and keep shelf\nP: Apply and remove shelf (pop)\nS: Snapshot to a shelf\nC-k: Delete shelf"
'keymap vc-bzr-shelve-map))
shelve "\n"))
(concat
@@ -820,11 +866,28 @@ stream. Standard error output is discar
;; (pop-to-buffer (current-buffer)))
(defun vc-bzr-shelve-apply (name)
- "Apply shelve NAME."
- (interactive "sApply shelf: ")
+ "Apply shelve NAME and remove it afterwards."
+ (interactive "sApply (and remove) shelf: ")
(vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" name)
(vc-resynch-buffer (vc-bzr-root default-directory) t t))
+(defun vc-bzr-shelve-apply-and-keep (name)
+ "Apply shelve NAME and keep it afterwards."
+ (interactive "sApply (and keep) shelf: ")
+ (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" "--keep" name)
+ (vc-resynch-buffer (vc-bzr-root default-directory) t t))
+
+(defun vc-bzr-shelve-snapshot ()
+ "Create a stash with the current tree state."
+ (interactive)
+ (vc-bzr-command "shelve" nil 0 nil "--all" "-m"
+ (let ((ct (current-time)))
+ (concat
+ (format-time-string "Snapshot on %Y-%m-%d" ct)
+ (format-time-string " at %H:%M" ct))))
+ (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" "--keep")
+ (vc-resynch-buffer (vc-bzr-root default-directory) t t))
+
(defun vc-bzr-shelve-list ()
(with-temp-buffer
(vc-bzr-command "shelve" (current-buffer) 1 nil "--list" "-q")
@@ -857,6 +920,10 @@ stream. Standard error output is discar
(interactive)
(vc-bzr-shelve-apply (vc-bzr-shelve-get-at-point (point))))
+(defun vc-bzr-shelve-apply-and-keep-at-point ()
+ (interactive)
+ (vc-bzr-shelve-apply-and-keep (vc-bzr-shelve-get-at-point (point))))
+
(defun vc-bzr-shelve-menu (e)
(interactive "e")
(vc-dir-at-event e (popup-menu vc-bzr-shelve-menu-map e)))
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2010-01-17 9:38 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-05 22:11 bug#881: patch for bug #881 Chong Yidong
2010-01-06 0:43 ` Juanma Barranquero
2010-01-06 3:35 ` Karl Fogel
2010-01-06 4:12 ` Juanma Barranquero
2010-01-06 4:19 ` Karl Fogel
2010-01-06 10:12 ` Juanma Barranquero
2010-01-06 18:15 ` Eli Zaretskii
2010-01-06 20:43 ` Juanma Barranquero
2010-01-07 4:14 ` Eli Zaretskii
2010-01-07 9:13 ` Juanma Barranquero
2010-01-06 4:13 ` Eli Zaretskii
2010-01-06 4:34 ` Stefan Monnier
2010-01-06 7:00 ` Dan Nicolaescu
2010-01-06 7:22 ` Óscar Fuentes
2010-01-06 9:34 ` Stephen J. Turnbull
2010-01-06 14:20 ` Stefan Monnier
2010-01-06 18:29 ` Dan Nicolaescu
2010-01-06 20:19 ` Stefan Monnier
2010-01-07 17:09 ` Dan Nicolaescu
2010-01-07 20:07 ` Stefan Monnier
2010-01-06 18:29 ` Eli Zaretskii
2010-01-06 18:52 ` Óscar Fuentes
2010-01-06 20:20 ` Stefan Monnier
2010-01-06 20:40 ` Eli Zaretskii
2010-01-07 15:33 ` Juanma Barranquero
2010-01-07 17:15 ` bzr --fixes [was Re: bug#881: patch for bug #881] Glenn Morris
2010-01-07 20:12 ` Juanma Barranquero
2010-01-07 20:34 ` bzr --fixes Glenn Morris
2010-01-07 22:35 ` Juanma Barranquero
2010-01-08 9:01 ` Eli Zaretskii
2010-01-08 8:27 ` Eli Zaretskii
2010-01-06 20:00 ` Committing other people's changes (was: bug#881: patch for bug #881) Reiner Steib
2010-01-16 21:50 ` bug#881: patch for bug #881 Chong Yidong
2010-01-16 21:52 ` Juanma Barranquero
2010-01-16 22:30 ` Chong Yidong
2010-01-17 9:38 ` Dan Nicolaescu
-- strict thread matches above, loose matches on Subject: below --
2010-01-05 1:21 Tom Tromey
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.