You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Craig Peterein <cr...@peterein.org> on 2002/10/03 03:43:13 UTC
$EDITOR idea
On IRC, we discussed an idea about the $EDITOR text.
The current $EDITOR behaviour adds an "SVN: " string to the front of 'svn
status' output. To make it easier to create a log message, it would be nice to
also chop off the file after a special marker. Something like this:
---8<---
SVN: Enter Log. Lines beginning with 'SVN:' are removed automatically
SVN: Lines after "SVN-EOF" are removed automatically
SVN:
SVN: Current status of the target files and directories:
SVN:
SVN-EOF
M /path/to/foo
A /other/path/to/bar
SVN-EOF
SVN:
SVN: Current diffs of the target files and directories:
SVN:
[output of svn diff on the targets]
---8<---
This makes it easier for the user to delete one line (the first SVN-EOF line),
optionally rearrange the added/modified/deleted files, and add comments about
them, while looking at the diffs.
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Ben Collins-Sussman <su...@collab.net>.
Karl Fogel <kf...@newton.ch.collab.net> writes:
> Ben Collins-Sussman <su...@collab.net> writes:
> > The complaint that users are making is that it's annoying to manually
> > remove every "SVN:" prefix from each 'M foo.c' line that they want to
> > annotate. It's much easier to delete a *single* line and then edit
> > away.
>
> Good point. In that case, why don't we do away with the "SVN: "
> prefixes altogether, and just have a single line, followed by the
> status output, but no diff:
>
> SVN-EOF # (Everything below this line will be ignored by the commit.)
>
> ? src/parser/foo.h
> A src/parser/foo.c
> M src/parser/bar.c
> M lib/trepanning/ventilate.h
> M lib/trepanning/ventilate.c
Yes! That's exactly what I want!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:
> The complaint that users are making is that it's annoying to manually
> remove every "SVN:" prefix from each 'M foo.c' line that they want to
> annotate. It's much easier to delete a *single* line and then edit
> away.
Good point. In that case, why don't we do away with the "SVN: "
prefixes altogether, and just have a single line, followed by the
status output, but no diff:
SVN-EOF # (Everything below this line will be ignored by the commit.)
? src/parser/foo.h
A src/parser/foo.c
M src/parser/bar.c
M lib/trepanning/ventilate.h
M lib/trepanning/ventilate.c
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Branko Čibej <br...@xbc.nu>.
Karl Fogel wrote:
>Ben Collins-Sussman <su...@collab.net> writes:
>
>
>>Ahhh, macros. Not every soul has discovered emacs, however. :-)
>>
>>
>
>I know this is off-topic, but before a flame war erupts, let's
>remember that Emacs is not the only editor with macros; it wasn't even
>the first :-).
>
Yeah, let's hear it for TECO, in which the first EMACS (Editor MACroS)
were written! :-)
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by "Glenn A. Thompson" <gt...@cdr.net>.
> I know this is off-topic, but before a flame war erupts, let's
> remember that Emacs is not the only editor with macros; it wasn't even
> the first :-).
>
Yeah not by a long shot.
Old Mainframers may remember IPF.
VMS had a cool cool editor also. Can't remember the name; damn I'm getting
old. Check out my vt320!!!
While we are getting nostalgic: I'm still in the cp/m mp/m OS camp as
well. I remember saying: DOS doesn't even run on Z80s or 68Ks. They'll
never win the OS war.
Ahhhhhh memory lane:-)
gat
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:
> Ahhh, macros. Not every soul has discovered emacs, however. :-)
I know this is off-topic, but before a flame war erupts, let's
remember that Emacs is not the only editor with macros; it wasn't even
the first :-).
Pacifically,
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Ben Collins-Sussman <su...@collab.net>.
cmpilato@collab.net writes:
> I always end up using a quick macro to hack off the first so many
> characters of, and prepend '* ' to, each line anyway. 4 more
> characters to remove is a negligible cost.
Ahhh, macros. Not every soul has discovered emacs, however. :-)
> If it's a matter of choosing *either* the SVN: prefixes *or* some
> magic line that means "from here down, things are toast", whatever,
> but I don't see a need for both.
Totally agree. I'm advocating the single line *instead* of SVN:
prefixes.
But I'm going to shut up about this issue now, for two reasons:
1. I've never used the $EDITOR feature in my entire life, either
with CVS or SVN.
2. I'm not about to code this change. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Rafael Garcia-Suarez <ra...@hexaflux.com> writes:
> On this subject, I'd like to propose an alternative lightweight
> solution.
>
> The temporary file opened by the editor has currently a name
> of the form "msg.NNNNN.NNNNN.tmp". If someone wants to configure
> its editor to run a macro specifically on svn commit temp files,
> it may be useful to have a temporary file with a more recognizable
> name (e.g. "svncommit.NNNNN.NNNNN.tmp") for a programmable editor.
> Yet another way to configure your svn_editor. One's macro could
> even run "svn diff" if it's really wanted.
What a fine idea!
I've made the tweak. Just running 'make check' out of paranoia now,
will commit when done.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
cmpilato@collab.net wrote:
>
> I don't know about you, but I have to edit each of those lines anyway
> right now because the paths are always absolute ones. And they always
> have some one-letter code that doesn't actually end up in my final log
> message. And they are rarely in the order that I want them to be in.
> In other words, I always end up using a quick macro to hack off the
> first so many characters of, and prepend '* ' to, each line anyway. 4
> more characters to remove is a negligible cost.
>
> You have the power to set $EDITOR to anything you want to -- set it to
> a powerful editor that you know how to use. :-)
Yes, something like this for example :
SVN_EDITOR='vim -c "%s,SVN: [ADM] *$HOME,,"'
On this subject, I'd like to propose an alternative lightweight
solution.
The temporary file opened by the editor has currently a name
of the form "msg.NNNNN.NNNNN.tmp". If someone wants to configure
its editor to run a macro specifically on svn commit temp files,
it may be useful to have a temporary file with a more recognizable
name (e.g. "svncommit.NNNNN.NNNNN.tmp") for a programmable editor.
Yet another way to configure your svn_editor. One's macro could
even run "svn diff" if it's really wanted.
My 2 cents --
--
Rafael / just another perl/vim hacker
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by cm...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:
> > > On IRC, we discussed an idea about the $EDITOR text.
> > >
> > > The current $EDITOR behaviour adds an "SVN: " string to the front of
> > > 'svn status' output. To make it easier to create a log message, it
> > > would be nice to also chop off the file after a special marker.
> > > Something like this:
> >
> > -0.5. The presence of a repeating line-begin string like SVN: is
> > really easy for the eye to notice as interesting. I don't think a
> > single occurrence of a magic string is as eye-catching.
>
> I'm definitely against putting the diffs into the default log message.
>
> The complaint that users are making is that it's annoying to manually
> remove every "SVN:" prefix from each 'M foo.c' line that they want to
> annotate. It's much easier to delete a *single* line and then edit
> away.
I don't know about you, but I have to edit each of those lines anyway
right now because the paths are always absolute ones. And they always
have some one-letter code that doesn't actually end up in my final log
message. And they are rarely in the order that I want them to be in.
In other words, I always end up using a quick macro to hack off the
first so many characters of, and prepend '* ' to, each line anyway. 4
more characters to remove is a negligible cost.
You have the power to set $EDITOR to anything you want to -- set it to
a powerful editor that you know how to use. :-)
> I don't think "eye-catching" is something that needs worrying about.
> Think about every time you compose an email in Emacs: "--text follows
> this line--" appears, and you type below it. You don't have trouble
> noticing it. It's no big deal.
I don't have trouble noticing it because if I'm starting a new mail, I
hit "meta right-angle-bracket" and *poof* I'm where I need to be, and
if I'm replying to a mail, point is at the right place automatically.
But regardless, I get what your saying.
If it's a matter of choosing *either* the SVN: prefixes *or* some
magic line that means "from here down, things are toast", whatever,
but I don't see a need for both. I mean, I don't want our log message
handling to require more cycles than the commit itself. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Ben Collins-Sussman <su...@collab.net>.
cmpilato@collab.net writes:
> "Craig Peterein" <cr...@peterein.org> writes:
>
> > On IRC, we discussed an idea about the $EDITOR text.
> >
> > The current $EDITOR behaviour adds an "SVN: " string to the front of
> > 'svn status' output. To make it easier to create a log message, it
> > would be nice to also chop off the file after a special marker.
> > Something like this:
>
> -0.5. The presence of a repeating line-begin string like SVN: is
> really easy for the eye to notice as interesting. I don't think a
> single occurrence of a magic string is as eye-catching.
I'm definitely against putting the diffs into the default log message.
The complaint that users are making is that it's annoying to manually
remove every "SVN:" prefix from each 'M foo.c' line that they want to
annotate. It's much easier to delete a *single* line and then edit
away.
I don't think "eye-catching" is something that needs worrying about.
Think about every time you compose an email in Emacs: "--text follows
this line--" appears, and you type below it. You don't have trouble
noticing it. It's no big deal.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by cm...@collab.net.
"Craig Peterein" <cr...@peterein.org> writes:
> On IRC, we discussed an idea about the $EDITOR text.
>
> The current $EDITOR behaviour adds an "SVN: " string to the front of
> 'svn status' output. To make it easier to create a log message, it
> would be nice to also chop off the file after a special marker.
> Something like this:
-0.5. The presence of a repeating line-begin string like SVN: is
really easy for the eye to notice as interesting. I don't think a
single occurrence of a magic string is as eye-catching.
Also, if running `svn diff' on the commit targets was part of this
proposal, -1 on that! We get the "svn status" for free because we
harvest those changed paths as we crawl for commit targets. Those
paths are buffered in memory until we pop up the $EDITOR window.
Doing `svn diff' as well would mean either making a second pass over
the tree for diff purposes (-1) or buffering the output of diffs as we
crawl over the tree that first time (-1).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: $EDITOR idea
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Personally I'm -0 on this. Have never had any problem editing the
current format to get the desired result, and don't want to wait for
diff to run before my $EDITOR pops up...
Just my $0.02, though. If enough people prefer the new behavior, and
a patch comes in, I certainly won't resist :-).
-K
"Craig Peterein" <cr...@peterein.org> writes:
> On IRC, we discussed an idea about the $EDITOR text.
>
> The current $EDITOR behaviour adds an "SVN: " string to the front of 'svn
> status' output. To make it easier to create a log message, it would be nice to
> also chop off the file after a special marker. Something like this:
>
> ---8<---
> SVN: Enter Log. Lines beginning with 'SVN:' are removed automatically
> SVN: Lines after "SVN-EOF" are removed automatically
> SVN:
> SVN: Current status of the target files and directories:
> SVN:
> SVN-EOF
> M /path/to/foo
> A /other/path/to/bar
> SVN-EOF
> SVN:
> SVN: Current diffs of the target files and directories:
> SVN:
> [output of svn diff on the targets]
> ---8<---
>
> This makes it easier for the user to delete one line (the first SVN-EOF line),
> optionally rearrange the added/modified/deleted files, and add comments about
> them, while looking at the diffs.
>
> Craig
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org