You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Faheem Mitha <fa...@email.unc.edu> on 2003/05/27 19:29:51 UTC

small user request: confirm before commit

Dear People,

I've been using subversion for a few weeks now. I'm really happy with
it, and I'm glad to be finally using a revision control system. I made
several attempts to use cvs, but could never get comfortable with
it. Subversion is *much* nicer. Can't wait for it to become stable.

I have a small user request. Once I type `svn commit', there appears
to be no clean way for me to back out if I decide I don't want to
commit after all. Bear in mind that committing is an irreversible
process. As far as I know there is no way currently of removing
changesets from the respository once you have committed them.

On the occasions when I have decided I didn't want to go through with
the commit (which has happened more than once), I've killed the job in
question and then run `svn cleanup', which is not exactly optimal.

So I would suggest something like 

svn commit -m...
[Enter]
Commit changes? [Y/n]            (yes as default, just hit enter)

svn commit
[Exit editor]
Commit changes? [Y/n]            (yes as default, just hit enter)

This could perhaps be a configurable option to avoid annoying the
experts.  Many other programs allow such options even to actions that
are reversible. Examples that come to mind off the top of my head are
emacs, slrn, and Debian's apt.

My impression is that currently some people do a dry run by writing
the log message etc. before actually running svn commit. This would be
less necessary if there was some graceful way of backing out of a
commit.

Oh, and please don't reply telling me to "make sure you want to
commit" or some such. There is always the possibility of human error.

                                                      Faheem.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by "Christian H. Stork" <cs...@ics.uci.edu>.
On Tue, May 27, 2003 at 04:38:19PM -0400, Garrett Rooney wrote:
...
> Actually, that's not quite the way it works.  It just stats the file 
> before opening the editor, and again after the editor is closed, and if 
> there's no change in the size or the mtime, it assumes you haven't 
> changed it.  If you edit it, then make more changes, then exit without 
> saving, the version you saved will be used.  There's really no way to 
> tell that you had saved then made more changes and not saved them (not 
> that would work with all editors anyway).

Wouldn't the patch proposed by Mark Grosberg take care of this problem
too?  IIRC with his patch only the files listed in the special sections
of the commit message are being committed.

It's very intuitive to just delete all these paths in order to indicate
a non-commit.

Maybe this patch makes sense after all?

-- 
Chris Stork (PhD student at UC Irvine)  http://www.ics.uci.edu/~cstork/
OpenPGP fingerprint: B08B 602C C806 C492 D069  021E 41F3 8C8D 50F9 CA2F

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Tue, 27 May 2003, Garrett Rooney wrote:

> Actually, that's not quite the way it works.  It just stats the file
> before opening the editor, and again after the editor is closed, and if
> there's no change in the size or the mtime, it assumes you haven't
> changed it.  If you edit it, then make more changes, then exit without
> saving, the version you saved will be used.  There's really no way to
> tell that you had saved then made more changes and not saved them (not
> that would work with all editors anyway).

Hmm. Well, in that case, my concern has not been fully addressed after
all, since I often modify and save the file before deciding to abort. I
should have realised that my earlier understanding was not possible.

In that event I guess I am stuck with killing my job as before. The
concensus seems to be that such a change as I suggested would not be
sufficiently useful...

                                                           Faheem.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Faheem Mitha wrote:

>On Tue, 27 May 2003 14:41:07 -0500, Florin Iucha <fl...@iucha.net> wrote:
>  
>
>>--TnYVF1hk1c8rpHiF
>>Content-Type: text/plain; charset=us-ascii
>>Content-Disposition: inline
>>Content-Transfer-Encoding: quoted-printable
>>
>>On Tue, May 27, 2003 at 07:29:51PM +0000, Faheem Mitha wrote:
>>    
>>
>>>I have a small user request. Once I type `svn commit', there appears
>>>to be no clean way for me to back out if I decide I don't want to
>>>commit after all. Bear in mind that committing is an irreversible
>>>process. As far as I know there is no way currently of removing
>>>changesets from the respository once you have committed them.
>>>      
>>>
>>Exit the editor without making changes asks you if you want to abort.
>>    
>>
>
>Oh, I see. I didn't know that. I tend to always save changes
>reflexively, so it didn't enter my mind as a possibility. I assume you
>mean that *any* unsaved changes will prompt an abort message?
>

Actually, that's not quite the way it works.  It just stats the file 
before opening the editor, and again after the editor is closed, and if 
there's no change in the size or the mtime, it assumes you haven't 
changed it.  If you edit it, then make more changes, then exit without 
saving, the version you saved will be used.  There's really no way to 
tell that you had saved then made more changes and not saved them (not 
that would work with all editors anyway).

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.
On Tue, 27 May 2003 22:23:18 +0100, Philip Martin
<ph...@codematters.co.uk> wrote:
> Faheem Mitha <fa...@email.unc.edu> writes:
> 
>>> If you saved once though, you are not out of luck: open another
>>> console and kill the processes - I don't think the wc has been
>>> tampered with at this stage.
>>
>> Yes, that is what I already do. :-) But I need to run `svn cleanup'
>> after that.
> 
> Kill the editor process, not the 'svn commit' process.  Then svn will
> notice the editor exited abnormally and abort the commit (even if you
> have saved the log message).  It works on Unix at the very least.

Oh, good point. Thanks.                                Faheem.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Philip Martin <ph...@codematters.co.uk>.
Faheem Mitha <fa...@email.unc.edu> writes:

>> If you saved once though, you are not out of luck: open another
>> console and kill the processes - I don't think the wc has been
>> tampered with at this stage.
>
> Yes, that is what I already do. :-) But I need to run `svn cleanup'
> after that.

Kill the editor process, not the 'svn commit' process.  Then svn will
notice the editor exited abnormally and abort the commit (even if you
have saved the log message).  It works on Unix at the very least.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.
On Tue, 27 May 2003 16:19:20 -0500, Nicholas Riley <nj...@uiuc.edu> wrote:
> On Tue, May 27, 2003 at 04:17:07PM -0500, Nicholas Riley wrote:
>> How about additionally checking for an empty log message?  Then you'd
>> get:
>> 
>>   Commit changes using an empty log message? (yes/no/edit)
>> 
>> If someone really wanted an empty log message on a regular basis, they
>> could just use svn commit -m ''.  And since the confirmation doesn't
>> always appear, it would actually be meaningful.
> 
> Whoops, I should have tested the existing behavior first.  All that
> needs to change is the definition of 'empty'.  The current prompt is:
> 
>   Log message unchanged or not specified
>   a)bort, c)ontinue, e)dit
> 
> If log messages consisting entirely of whitespace counted as 'not
> specified', then this would work well for editors which add trailing
> newlines, etc.

I think this is a good idea. It would also deal with my issue. If
someone wanted the option to abort their commit, they could just make
sure to have a log message which was (at most) whitespace. It would
also be consistent with the current behaviour, as Nicholas says.

Of course, this might not be trivial to implement. 

                                                     Faheem.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Nicholas Riley <nj...@uiuc.edu>.
On Tue, May 27, 2003 at 04:17:07PM -0500, Nicholas Riley wrote:
> How about additionally checking for an empty log message?  Then you'd
> get:
> 
>   Commit changes using an empty log message? (yes/no/edit)
> 
> If someone really wanted an empty log message on a regular basis, they
> could just use svn commit -m ''.  And since the confirmation doesn't
> always appear, it would actually be meaningful.

Whoops, I should have tested the existing behavior first.  All that
needs to change is the definition of 'empty'.  The current prompt is:

  Log message unchanged or not specified
  a)bort, c)ontinue, e)dit

If log messages consisting entirely of whitespace counted as 'not
specified', then this would work well for editors which add trailing
newlines, etc.

-- 
=Nicholas Riley <nj...@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
        Pablo Research Group, Department of Computer Science and
  Medical Scholars Program, University of Illinois at Urbana-Champaign

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Nicholas Riley <nj...@uiuc.edu>.
On Tue, May 27, 2003 at 08:59:39PM +0000, Faheem Mitha wrote:
> On Tue, 27 May 2003 15:42:52 -0500, Florin Iucha <fl...@iucha.net> wrote:
>  
> > You will do so too with the confirmation message. I would bet that if
> > after 10 "Confirm commit (Y/n)" the software will print "Confirm
> > rocket launch (Y/n)", "Confirm shoot in the foot (Y/n)" most users
> > will happily hit "Enter".
> 
> I must be in the minority then, because I actually look at these kinds
> of messages. Perhaps it is because I am a) unusually error-prone b)
> very careful/conservative by nature. For example, I tend to
> proofread/spellcheck my emails, which is fairly unusual. I still make
> errors, though.

How about additionally checking for an empty log message?  Then you'd
get:

  Commit changes using an empty log message? (yes/no/edit)

If someone really wanted an empty log message on a regular basis, they
could just use svn commit -m ''.  And since the confirmation doesn't
always appear, it would actually be meaningful.

-- 
=Nicholas Riley <nj...@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
        Pablo Research Group, Department of Computer Science and
  Medical Scholars Program, University of Illinois at Urbana-Champaign

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.
On Tue, 27 May 2003 15:42:52 -0500, Florin Iucha <fl...@iucha.net> wrote:
 
> You will do so too with the confirmation message. I would bet that if
> after 10 "Confirm commit (Y/n)" the software will print "Confirm
> rocket launch (Y/n)", "Confirm shoot in the foot (Y/n)" most users
> will happily hit "Enter".

I must be in the minority then, because I actually look at these kinds
of messages. Perhaps it is because I am a) unusually error-prone b)
very careful/conservative by nature. For example, I tend to
proofread/spellcheck my emails, which is fairly unusual. I still make
errors, though.

>>              so it didn't enter my mind as a possibility. I assume you
>> mean that *any* unsaved changes will prompt an abort message?
> 
> Don't save anything, just quit. If you saved once though, you are not out
> of luck: open another console and kill the processes - I don't think
> the wc has been tampered with at this stage.

Yes, that is what I already do. :-) But I need to run `svn cleanup'
after that.

                                                   Faheem.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Florin Iucha <fl...@iucha.net>.
On Tue, May 27, 2003 at 08:30:36PM +0000, Faheem Mitha wrote:
> On Tue, 27 May 2003 14:41:07 -0500, Florin Iucha <fl...@iucha.net> wrote:
> > --TnYVF1hk1c8rpHiF
> > Content-Type: text/plain; charset=us-ascii
> > Content-Disposition: inline
> > Content-Transfer-Encoding: quoted-printable
> > 
> > On Tue, May 27, 2003 at 07:29:51PM +0000, Faheem Mitha wrote:
> >> I have a small user request. Once I type `svn commit', there appears
> >> to be no clean way for me to back out if I decide I don't want to
> >> commit after all. Bear in mind that committing is an irreversible
> >> process. As far as I know there is no way currently of removing
> >> changesets from the respository once you have committed them.
> > 
> > Exit the editor without making changes asks you if you want to abort.
> 
> Oh, I see. I didn't know that. I tend to always save changes
> reflexively,

You will do so too with the confirmation message. I would bet that if
after 10 "Confirm commit (Y/n)" the software will print "Confirm
rocket launch (Y/n)", "Confirm shoot in the foot (Y/n)" most users
will happily hit "Enter".

>              so it didn't enter my mind as a possibility. I assume you
> mean that *any* unsaved changes will prompt an abort message?

Don't save anything, just quit. If you saved once though, you are not out
of luck: open another console and kill the processes - I don't think
the wc has been tampered with at this stage.

Cheers,
florin

-- 

"NT is to UNIX what a doughnut is to a particle accelerator."

Re: small user request: confirm before commit

Posted by Ben Collins-Sussman <su...@collab.net>.
Faheem Mitha <fa...@email.unc.edu> writes:

> In that case, I agree my suggestion is not necessary. Is this
> documented anywhere, or is it just considered one of those things that
> is too obvious to mention? I just took a look in the `svn commit'
> section of the "Subversion Complete Reference" section of the
> Subversion Book, and don't see it there or in the introductory
> material on `svn commit' in the "Guided Tour". Perhaps it is worth
> mentioning somewhere?

Sure, I've just added that task to the book's TODO list.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.
On Tue, 27 May 2003 14:41:07 -0500, Florin Iucha <fl...@iucha.net> wrote:
> --TnYVF1hk1c8rpHiF
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> On Tue, May 27, 2003 at 07:29:51PM +0000, Faheem Mitha wrote:
>> I have a small user request. Once I type `svn commit', there appears
>> to be no clean way for me to back out if I decide I don't want to
>> commit after all. Bear in mind that committing is an irreversible
>> process. As far as I know there is no way currently of removing
>> changesets from the respository once you have committed them.
> 
> Exit the editor without making changes asks you if you want to abort.

Oh, I see. I didn't know that. I tend to always save changes
reflexively, so it didn't enter my mind as a possibility. I assume you
mean that *any* unsaved changes will prompt an abort message?

In that case, I agree my suggestion is not necessary. Is this
documented anywhere, or is it just considered one of those things that
is too obvious to mention? I just took a look in the `svn commit'
section of the "Subversion Complete Reference" section of the
Subversion Book, and don't see it there or in the introductory
material on `svn commit' in the "Guided Tour". Perhaps it is worth
mentioning somewhere?

                                                    Faheem.
                                                 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Florin Iucha <fl...@iucha.net>.
On Tue, May 27, 2003 at 07:29:51PM +0000, Faheem Mitha wrote:
> I have a small user request. Once I type `svn commit', there appears
> to be no clean way for me to back out if I decide I don't want to
> commit after all. Bear in mind that committing is an irreversible
> process. As far as I know there is no way currently of removing
> changesets from the respository once you have committed them.

Exit the editor without making changes asks you if you want to abort.

> On the occasions when I have decided I didn't want to go through with
> the commit (which has happened more than once), I've killed the job in
> question and then run `svn cleanup', which is not exactly optimal.
> 
> So I would suggest something like 
> 
> svn commit -m...
> [Enter]
> Commit changes? [Y/n]            (yes as default, just hit enter)
> 
> svn commit
> [Exit editor]
> Commit changes? [Y/n]            (yes as default, just hit enter)
> 
> This could perhaps be a configurable option to avoid annoying the
> experts.  Many other programs allow such options even to actions that
> are reversible. Examples that come to mind off the top of my head are
> emacs, slrn, and Debian's apt.
> 
> My impression is that currently some people do a dry run by writing
> the log message etc. before actually running svn commit. This would be
> less necessary if there was some graceful way of backing out of a
> commit.
> 
> Oh, and please don't reply telling me to "make sure you want to
> commit" or some such. There is always the possibility of human error.

The same human nature will learn to always Enter twice before
commit... It won't help you for the 1 in 1000 cases where you didn't
want to commit.

Cheers,
florin

-- 

"NT is to UNIX what a doughnut is to a particle accelerator."

Re: small user request: confirm before commit

Posted by Branden Robinson <br...@deadbeast.net>.
On Tue, May 27, 2003 at 08:35:46PM +0000, Faheem Mitha wrote:
> On Tue, 27 May 2003 13:56:35 -0600, Jamin W. Collins
> <jc...@asgardsrealm.net> wrote:
> > How is a confirmation going to fix that?  There still the chance of
> > mistakenly saying yes to the confirmation request.
> 
> I have in mind (for example) someone who fired up `svn commit' and
> halfway through writing the log message thinks "Oh crap, I didn't mean
> to commit that." Presumably, such a person who be careful to say no to
> the confirmation request. :-) 

Just as a data point, I have occasionally had the same experience.
Sometimes the process of writing up a commit message makes me think
about the problem enough that I decide I shouldn't be committing that
changeset after all.  :)

I don't use svn ci -m except in cases where I know the log message will
be short.  I hate lines longer than 80 characters, and I need an editor
to do line-wrapping for me.  :)

However, Subversion's existing behavior works fine for me because as
far as I can tell it's just like CVS.  I have a deeply ingrained habit
of typing "<Esc>:q!" when I realize I don't want to be editing what I'm
editing.

-- 
G. Branden Robinson            |        To stay young requires unceasing
Free Software Developer        |        cultivation of the ability to
branden@deadbeast.net          |        unlearn old falsehoods.
http://deadbeast.net/~branden/ |        -- Robert Heinlein

Re: small user request: confirm before commit

Posted by Ben Collins-Sussman <su...@collab.net>.
Faheem Mitha <fa...@email.unc.edu> writes:

> However, since I was just informed (if I understood correctly) that
> unsaved changes to the log would prompt an abort question, I guess
> that takes care of that concern, since I can always make sure to exit
> my editor with unsaved changes.

Keep in mind that many of us never use $EDITOR at all.  We run 'svn
commit -m' or 'svn commit -F'.   :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.
On Tue, 27 May 2003 13:56:35 -0600, Jamin W. Collins
<jc...@asgardsrealm.net> wrote:
> On Tue, May 27, 2003 at 07:29:51PM +0000, Faheem Mitha wrote:
> 
>> So I would suggest something like 
>> 
>> svn commit -m...
>> [Enter]
>> Commit changes? [Y/n]            (yes as default, just hit enter)
>> 
>> svn commit
>> [Exit editor]
>> Commit changes? [Y/n]            (yes as default, just hit enter)
>> 
>> This could perhaps be a configurable option to avoid annoying the
>> experts.
> 
> Preferrably one that defaults to off.
> 
>> Oh, and please don't reply telling me to "make sure you want to
>> commit" or some such. There is always the possibility of human error.
> 
> How is a confirmation going to fix that?  There still the chance of
> mistakenly saying yes to the confirmation request.

I have in mind (for example) someone who fired up `svn commit' and
halfway through writing the log message thinks "Oh crap, I didn't mean
to commit that." Presumably, such a person who be careful to say no to
the confirmation request. :-) 

However, since I was just informed (if I understood correctly) that
unsaved changes to the log would prompt an abort question, I guess
that takes care of that concern, since I can always make sure to exit
my editor with unsaved changes.

                                                   Faheem.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by "Jamin W. Collins" <jc...@asgardsrealm.net>.
On Tue, May 27, 2003 at 07:29:51PM +0000, Faheem Mitha wrote:

> So I would suggest something like 
> 
> svn commit -m...
> [Enter]
> Commit changes? [Y/n]            (yes as default, just hit enter)
> 
> svn commit
> [Exit editor]
> Commit changes? [Y/n]            (yes as default, just hit enter)
> 
> This could perhaps be a configurable option to avoid annoying the
> experts.

Preferrably one that defaults to off.

> Oh, and please don't reply telling me to "make sure you want to
> commit" or some such. There is always the possibility of human error.

How is a confirmation going to fix that?  There still the chance of
mistakenly saying yes to the confirmation request.

-- 
Jamin W. Collins

This is the typical unix way of doing things: you string together lots
of very specific tools to accomplish larger tasks. -- Vineet Kumar

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Faheem Mitha wrote:

>On 27 May 2003 14:38:06 -0500, Ben Collins-Sussman <su...@collab.net> wrote:
>  
>
>>Faheem Mitha <fa...@email.unc.edu> writes:
>>
>>    
>>
>>>Oh, and please don't reply telling me to "make sure you want to
>>>commit" or some such. There is always the possibility of human error.
>>>      
>>>
>>If you accidentally commit a change, why not follow-up by committing a
>>reverse changeset?  That's what the book discusses.  We do it in this
>>project all the time.
>>    
>>
>
>True, this is something that could be done, and is the only option if
>you change your mind after committing the change. However, would it
>not be better to not commit the change if you realise while you are
>writing the log message in the editor (say) that you don't want to
>commit? For one thing, doing as you suggest means you have two times
>the size of the original change taking up space in the respository,
>with a net effect of zero, when it could have been avoided by simply
>not committing in the first place.
>

Yes, and as has been pointed out, you can already do that, simply by 
quiting your editor without saving your log message.

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.
On 27 May 2003 14:59:03 -0500, Ben Collins-Sussman <su...@collab.net> wrote:
> Faheem Mitha <fa...@email.unc.edu> writes:
> 
>> However, would it not be better to not commit the change if you
>> realise while you are writing the log message in the editor (say)
>> that you don't want to commit?
> 
> Then quit the editor abnormally without saving changes;  svn gives you
> a chance to abort the commit.  Someone just pointed that out.

Ok.

>> Let me just ask, what is the downside to my suggestion? As I said
>> already, this could be made a configurable option, so experts and such
>> who don't want to bother with it don't have to.
> 
> Greg Hudson sent a mail over the weekend that very eloquently
> explained that there's no such thing as "just another option".  Adding
> options is expensive, especially in terms of supporting and
> debugging.  That's the downside.

Fair enough. I have no training as a software developer, so I'm not
fully aware of these issues.
 
> Furthermore, I agree with Florin's comment: if 'svn commit' always
> requires that you type "y, enter", then users simply habituate to
> that.  The entire key sequence becomes a single "action" after a short
> time.  So I don't believe this behavior will be effective in
> preventing accidental commits.

I believe the "quit editor abnormally without saving changes" option
takes care of my concern. Though, as I said elsewhere, it would be
nice if it was documented somewhere.

                                                      Faheem.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Thu, 29 May 2003, Michael Wood wrote:

> On Tue, May 27, 2003 at 02:59:03PM -0500, Ben Collins-Sussman wrote:
> > Faheem Mitha <fa...@email.unc.edu> writes:
> >
> > > However, would it not be better to not commit the change if you
> > > realise while you are writing the log message in the editor (say)
> > > that you don't want to commit?
> >
> > Then quit the editor abnormally without saving changes;  svn gives you
> > a chance to abort the commit.  Someone just pointed that out.
>
> Unfortunately I have a habit of saving often.  If you start writing the
> message and save before continuing, you might forget you have saved and
> just exit the editor, thinking it will abort the commit.  Of course it's
> still possible to commit a reverse changeset and patch up the log
> message, though.  I wouldn't want Subversion to ask every time you've
> exited your editor if you really want to commit.  I'm also not sure this
> should be an option.

Ok, but there are (at least) two ways of handling this other than adding
this option, both suggested elsewhere on this thread.

1) Currently `svn commit' exits if the log file is not modified. This
amounts to a blank log message. However, it does not parse the file to see
whether the log message is actually whitespace or not. If it did parse the
file, and gave the option for aborting, then it would be easy for someone
who changes his/her mind about the commit to simply remove the log
message, converting it into white space. It is obviously difficult to
revert the file back to its original untouched form.

This behaviour would be consistent with current behaviour (an extension of
it, actually) and would not involve adding any new preferences. Of course,
it would mean more code to debug etc. I'm not sure what the other
downsides would be.

2) Using Mark Grosberg's patch. I'm not trying to reopen discussion on
this, since it has already been discussed extensively elsewhere. See the
long thread beginning

http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=254414

However, I'd just like to say I *really* like this feature, and among
other things it trivially deals with the above issue, namely, just delete
all the files and nothing will be committed.

My impression is that nothing has been decided about this patch, though a
number of people have expressed positive feelings about it. I hope it will
go in eventually. It is a great user interface feature.

> > > Let me just ask, what is the downside to my suggestion? As I said
> > > already, this could be made a configurable option, so experts and such
> > > who don't want to bother with it don't have to.
> >
> > Greg Hudson sent a mail over the weekend that very eloquently
> > explained that there's no such thing as "just another option".  Adding
> > options is expensive, especially in terms of supporting and
> > debugging.  That's the downside.
>
> Havoc Pennington has also written about this:
>
> http://www106.pair.com/rhp/free-software-ui.html
>
> See the "The Question of Preferences" section.

Hmm. He makes some good points. However, I still like GNU emacs. :-)

                                                         Faheem.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Michael Wood <mw...@its.uct.ac.za>.
On Tue, May 27, 2003 at 02:59:03PM -0500, Ben Collins-Sussman wrote:
> Faheem Mitha <fa...@email.unc.edu> writes:
> 
> > However, would it not be better to not commit the change if you
> > realise while you are writing the log message in the editor (say)
> > that you don't want to commit?
> 
> Then quit the editor abnormally without saving changes;  svn gives you
> a chance to abort the commit.  Someone just pointed that out.

Unfortunately I have a habit of saving often.  If you start writing the
message and save before continuing, you might forget you have saved and
just exit the editor, thinking it will abort the commit.  Of course it's
still possible to commit a reverse changeset and patch up the log
message, though.  I wouldn't want Subversion to ask every time you've
exited your editor if you really want to commit.  I'm also not sure this
should be an option.

> > Let me just ask, what is the downside to my suggestion? As I said
> > already, this could be made a configurable option, so experts and such
> > who don't want to bother with it don't have to.
> 
> Greg Hudson sent a mail over the weekend that very eloquently
> explained that there's no such thing as "just another option".  Adding
> options is expensive, especially in terms of supporting and
> debugging.  That's the downside.

Havoc Pennington has also written about this:

http://www106.pair.com/rhp/free-software-ui.html

See the "The Question of Preferences" section.

-- 
Michael Wood <mw...@its.uct.ac.za>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Ben Collins-Sussman <su...@collab.net>.
Faheem Mitha <fa...@email.unc.edu> writes:

> However, would it not be better to not commit the change if you
> realise while you are writing the log message in the editor (say)
> that you don't want to commit?

Then quit the editor abnormally without saving changes;  svn gives you
a chance to abort the commit.  Someone just pointed that out.

> Let me just ask, what is the downside to my suggestion? As I said
> already, this could be made a configurable option, so experts and such
> who don't want to bother with it don't have to.

Greg Hudson sent a mail over the weekend that very eloquently
explained that there's no such thing as "just another option".  Adding
options is expensive, especially in terms of supporting and
debugging.  That's the downside.

Furthermore, I agree with Florin's comment: if 'svn commit' always
requires that you type "y, enter", then users simply habituate to
that.  The entire key sequence becomes a single "action" after a short
time.  So I don't believe this behavior will be effective in
preventing accidental commits.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Faheem Mitha <fa...@email.unc.edu>.
On 27 May 2003 14:38:06 -0500, Ben Collins-Sussman <su...@collab.net> wrote:
> Faheem Mitha <fa...@email.unc.edu> writes:
> 
>> Oh, and please don't reply telling me to "make sure you want to
>> commit" or some such. There is always the possibility of human error.
> 
> If you accidentally commit a change, why not follow-up by committing a
> reverse changeset?  That's what the book discusses.  We do it in this
> project all the time.

True, this is something that could be done, and is the only option if
you change your mind after committing the change. However, would it
not be better to not commit the change if you realise while you are
writing the log message in the editor (say) that you don't want to
commit? For one thing, doing as you suggest means you have two times
the size of the original change taking up space in the respository,
with a net effect of zero, when it could have been avoided by simply
not committing in the first place.

Let me just ask, what is the downside to my suggestion? As I said
already, this could be made a configurable option, so experts and such
who don't want to bother with it don't have to.

                                                      Faheem.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: small user request: confirm before commit

Posted by Ben Collins-Sussman <su...@collab.net>.
Faheem Mitha <fa...@email.unc.edu> writes:

> Oh, and please don't reply telling me to "make sure you want to
> commit" or some such. There is always the possibility of human error.

If you accidentally commit a change, why not follow-up by committing a
reverse changeset?  That's what the book discusses.  We do it in this
project all the time.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org