You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andreas S <an...@hotmail.com> on 2007/08/14 16:16:25 UTC

svn-commit.tmp. How is it intended to be used?

Hi, I just began to use subversion and I don't I understand how I'm suppose
to use this svn-commit.tmp file. I've spent some hours trying to find
information about it. The only good clue I've got is from wikipedia. Still,
something must have escaped me.

> ls
joe
> echo hello > joe
> svn commit

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

Vim pops up and opened svn-commit.tmp. I edited the file:

This is a test for joe
--This line, and those below, will be ignored--

M     joe

Then I hit 'c'

sending         joe
Transmitting file data .
Commited revision 2
>svn log joe
------------------------------------------------------------------------
r2 | andre | 2007-08-14 00:16:09 -0700 (Tue, 14 Aug 2007) | 1 line


------------------------------------------------------------------------
>svn log -v joe
------------------------------------------------------------------------
r2 | andre | 2007-08-14 00:16:09 -0700 (Tue, 14 Aug 2007) | 1 line
Changed paths:
   A /test1/joe


------------------------------------------------------------------------
>ls
joe

Where is the log message from svn-commit.tmp? Can someone help explaining
what that svn-commit.tmp is for?

Thank you in advance
-andre
-- 
View this message in context: http://www.nabble.com/svn-commit.tmp.-How-is-it-intended-to-be-used--tf4268295.html#a12147695
Sent from the Subversion Users mailing list archive at Nabble.com.

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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Andy Levy <an...@gmail.com>.
On 8/14/07, Andreas S <an...@hotmail.com> wrote:
>
> Thank you for your quick reply. Where does the editor has to save it in order
> for SVN to pick it up? I saved the file as is, ./svn_compare.tmp but I don't
> see my log message with svn log. Or am I not suppose to read the message
> using svn log?

svn log retrieves the message from the Subversion history (log) via
the server, not any local files. Did your commit succeed? If not, then
there should not be a log entry with what you wrote. Also, if you
change the filename when you do the save, Subversion may not find it
(I've never messed with the defaults, I just let it do its thing).

> Or is the purpose is to hold the message in case commit fails and if commit
> succeeded then my message in svn_compare.tmp would be discarded?

I believe that is correct.

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

RE: Re: svn-commit.tmp. How is it intended to be used?

Posted by ni...@planet.nl.
Did you save the file when exiting vim? Like, [esc] to get into command modus, wq[enter] to save and quit. IIRC.

Hth,

Nick Stolwijk


-----Original Message-----
From: Andreas S [mailto:andreas_s@hotmail.com]
Sent: Tue 8/14/2007 9:01 PM
To: users@subversion.tigris.org
Subject:  Re: svn-commit.tmp. How is it intended to be used?
 

Hmmm... I mistyped the file name, it was suppose to be svn-commit.tmp, not
svn_commit.tmp. That is the file that svn opened for me, I didn't save it
under a different name. Still, my log message does not show up with svn log
nor svn log -v.

So you are saying if I edit the file that svn opened for me, save it without
changning its name, then my message in that file should be saved and I
should see it when I do svn log. Looks like something else has gone wrong
then.

-andre


Erik Huelsmann-2 wrote:
> 
> Subversion reads the file it supplies to you.
> Yes, you are. But you shouldn't save it under a different name. If you
> do that, how is svn supposed to know where you saved it?
> 
> HTH,
> 
> 
> Erik.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/svn-commit.tmp.-How-is-it-intended-to-be-used--tf4268295.html#a12150292
Sent from the Subversion Users mailing list archive at Nabble.com.

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



Re: svn-commit.tmp. How is it intended to be used?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 14, 2007, at 16:59, Andreas S wrote:

> Oh, I apologize. I was using gvim for my editor. I thought it  
> wouldn't make a
> difference between vim and gvim, apparently it does.
>
> After I switched my editor to vim, then it works correctly.
>
> With vim, commit just continues after I save and quit from vim.  
> With gvim,
> svn pops up a gvim window for svn-commit.tmp file and, in the  
> terminal, it
> asks for input:
>
> Log message unchanged or not specified
> a)bort, c)ontinue, e)edit

This means Subversion thinks the editor exited without changing the  
svn-commit.tmp file, and it's letting you know that. Your choices are  
to a)bort the commit, c)ontinue committing with the empty log  
message, or try e)diting the log message again.

> It continues to commit after I hit 'c', as you know it. But I thought
> hitting c would do make svn to read that svn-commit.tmp file (I  
> think I
> didn't hit 'c' too fast. I was able to look into the file first  
> before I hit
> 'c'). Apparently not (is that right?)

Subversion does not attempt to re-read the svn-commit.tmp file,  
because it thinks the editor has already exited.

> By the way, to answer the other question, yes, the commit was  
> successful.
> I'm also on a network mounted drive.
>
> Out of curiosity, I tried emacs instead. svn pops up emacs, it  
> doesn't ask
> for input and things work correctly as with vim. I guess I  
> shouldn't use
> gvim with svn.
>
> Thank you very much, all of you.

You probably can use gvim, you just need to ask the developers of  
gvim how to start gvim in a way that it waits until the file is saved  
and closed before returning to the shell.

As a matter of comparison, I use this small script as my editor script:

#!/bin/sh
edit +1 --wait --resume "$@"

This opens my GUI text editor (TextWrangler) and waits for me to  
edit, save and close the file before resuming the shell process that  
called it. Works great. Something similar must be possible with gvim.  
Check the documentation.


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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Andreas S <an...@hotmail.com>.
Oh, I apologize. I was using gvim for my editor. I thought it wouldn't make a
difference between vim and gvim, apparently it does.

After I switched my editor to vim, then it works correctly.

With vim, commit just continues after I save and quit from vim. With gvim,
svn pops up a gvim window for svn-commit.tmp file and, in the terminal, it
asks for input:

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

It continues to commit after I hit 'c', as you know it. But I thought
hitting c would do make svn to read that svn-commit.tmp file (I think I
didn't hit 'c' too fast. I was able to look into the file first before I hit
'c'). Apparently not (is that right?)

By the way, to answer the other question, yes, the commit was successful.
I'm also on a network mounted drive.

Out of curiosity, I tried emacs instead. svn pops up emacs, it doesn't ask
for input and things work correctly as with vim. I guess I shouldn't use
gvim with svn.

Thank you very much, all of you.

-andre





Benjamin Podszun wrote:
> 
> 
> Maybe a dumb question, but:
> 
> - How is your editor launched? Does it (don't think that, but I just have 
> to ask) start from a shell script? Start in the background somehow? The 
> assumption here would be, that svn creates the file, opens it with your 
> editor (which returns immediately) and after that just happily commits, 
> while you still write your test logmessage.
> 
> - Are you on a network mounted drive (The reason for my question is, that 
> I don't know if locking is involved in this wait-for-message process and 
> nfs etc. might be bad here. Just a wild guess though).
> 
> Both ideas are probably way off, but since I've never heard about an issue 
> like this they might be worth a try.
> 
> Regards,
> Ben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/svn-commit.tmp.-How-is-it-intended-to-be-used--tf4268295.html#a12153004
Sent from the Subversion Users mailing list archive at Nabble.com.

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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Benjamin Podszun <be...@galactic-tales.de>.

On Tue, 14 Aug 2007, Andreas S wrote:

>
> Hmmm... I mistyped the file name, it was suppose to be svn-commit.tmp, not
> svn_commit.tmp. That is the file that svn opened for me, I didn't save it
> under a different name. Still, my log message does not show up with svn log
> nor svn log -v.
>
> So you are saying if I edit the file that svn opened for me, save it without
> changning its name, then my message in that file should be saved and I
> should see it when I do svn log. Looks like something else has gone wrong
> then.

Maybe a dumb question, but:

- How is your editor launched? Does it (don't think that, but I just have 
to ask) start from a shell script? Start in the background somehow? The 
assumption here would be, that svn creates the file, opens it with your 
editor (which returns immediately) and after that just happily commits, 
while you still write your test logmessage.

- Are you on a network mounted drive (The reason for my question is, that 
I don't know if locking is involved in this wait-for-message process and 
nfs etc. might be bad here. Just a wild guess though).

Both ideas are probably way off, but since I've never heard about an issue 
like this they might be worth a try.

Regards,
Ben

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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Andy Levy <an...@gmail.com>.
On 8/14/07, Andreas S <an...@hotmail.com> wrote:
>
> Hmmm... I mistyped the file name, it was suppose to be svn-commit.tmp, not
> svn_commit.tmp. That is the file that svn opened for me, I didn't save it
> under a different name. Still, my log message does not show up with svn log
> nor svn log -v.

I don't think you've answered this question: was the commit successful?

> So you are saying if I edit the file that svn opened for me, save it without
> changning its name, then my message in that file should be saved and I
> should see it when I do svn log. Looks like something else has gone wrong
> then.

If you saved the file in vim with the proper name and the commit was
successful, then the file should have been deleted and the message
appear in svn log (make sure you use svn up to be 100% sure you get
the right log). If that's not happening, one of the above 3 things
went wrong - wrong filename, commit failed, you're not pulling the log
you think you are.

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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Andreas S <an...@hotmail.com>.
Hmmm... I mistyped the file name, it was suppose to be svn-commit.tmp, not
svn_commit.tmp. That is the file that svn opened for me, I didn't save it
under a different name. Still, my log message does not show up with svn log
nor svn log -v.

So you are saying if I edit the file that svn opened for me, save it without
changning its name, then my message in that file should be saved and I
should see it when I do svn log. Looks like something else has gone wrong
then.

-andre


Erik Huelsmann-2 wrote:
> 
> Subversion reads the file it supplies to you.
> Yes, you are. But you shouldn't save it under a different name. If you
> do that, how is svn supposed to know where you saved it?
> 
> HTH,
> 
> 
> Erik.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/svn-commit.tmp.-How-is-it-intended-to-be-used--tf4268295.html#a12150292
Sent from the Subversion Users mailing list archive at Nabble.com.

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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Erik Huelsmann <eh...@gmail.com>.
On 8/14/07, Andreas S <an...@hotmail.com> wrote:
>
> Thank you for your quick reply. Where does the editor has to save it in order
> for SVN to pick it up?

Subversion reads the file it supplies to you.

> I saved the file as is, ./svn_compare.tmp but I don't
> see my log message with svn log. Or am I not suppose to read the message
> using svn log?

Yes, you are. But you shouldn't save it under a different name. If you
do that, how is svn supposed to know where you saved it?

> Or is the purpose is to hold the message in case commit fails and if commit
> succeeded then my message in svn_compare.tmp would be discarded?

Yes, that's the secondary usage. Most editors only know how to edit
files, so svn needs to pass a file into your editor in order to know
what you typed as a commit message.

> You are correct, if I use -m "message" then the file is not created.

HTH,


Erik.

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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Andreas S <an...@hotmail.com>.
Thank you for your quick reply. Where does the editor has to save it in order
for SVN to pick it up? I saved the file as is, ./svn_compare.tmp but I don't
see my log message with svn log. Or am I not suppose to read the message
using svn log?

Or is the purpose is to hold the message in case commit fails and if commit
succeeded then my message in svn_compare.tmp would be discarded?

You are correct, if I use -m "message" then the file is not created.

-andre


Andy Levy wrote:
> 
> 
> It's just a tempfile holding the commit message that you entered in
> the editor (the editor has to save it somewhere so that SVN can pick
> it up). If your commit was successful, it's deleted because it's no
> longer needed. If you specify the commit message on the command line
> with -m "this is my commit message" I'm not sure it's created at all.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/svn-commit.tmp.-How-is-it-intended-to-be-used--tf4268295.html#a12148519
Sent from the Subversion Users mailing list archive at Nabble.com.

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

Re: svn-commit.tmp. How is it intended to be used?

Posted by Andy Levy <an...@gmail.com>.
On 8/14/07, Andreas S <an...@hotmail.com> wrote:
>
> Hi, I just began to use subversion and I don't I understand how I'm suppose
> to use this svn-commit.tmp file. I've spent some hours trying to find
> information about it. The only good clue I've got is from wikipedia. Still,
> something must have escaped me.
>
> > ls
> joe
> > echo hello > joe
> > svn commit
>
> Log message unchanged or not specified
> a)bort, c)ontinue, e)dit
>
> Vim pops up and opened svn-commit.tmp. I edited the file:
>
> This is a test for joe
> --This line, and those below, will be ignored--
>
> M     joe
>
> Then I hit 'c'
>
> sending         joe
> Transmitting file data .
> Commited revision 2
> >svn log joe
> ------------------------------------------------------------------------
> r2 | andre | 2007-08-14 00:16:09 -0700 (Tue, 14 Aug 2007) | 1 line
>
>
> ------------------------------------------------------------------------
> >svn log -v joe
> ------------------------------------------------------------------------
> r2 | andre | 2007-08-14 00:16:09 -0700 (Tue, 14 Aug 2007) | 1 line
> Changed paths:
>    A /test1/joe
>
>
> ------------------------------------------------------------------------
> >ls
> joe
>
> Where is the log message from svn-commit.tmp? Can someone help explaining
> what that svn-commit.tmp is for?

It's just a tempfile holding the commit message that you entered in
the editor (the editor has to save it somewhere so that SVN can pick
it up). If your commit was successful, it's deleted because it's no
longer needed. If you specify the commit message on the command line
with -m "this is my commit message" I'm not sure it's created at all.

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