[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

"svn commit" followed by "svn log" doesn't show new revision

From: Niels Skou Olsen <nso_at_manbw.dk>
Date: 2004-11-16 10:51:41 CET

Hi list,

Here's a little scenario that confuses new users: Add a new file to a
working copy directory, commit, and then do an "svn log". The log output
will *not* show the new revision just made. "Hmm", the newbie frowns, and
he does an "svn status -u", just to be absolutely sure that the working
copy is entirely up-to-date. As no discrepancies against the repository is
reported, the newbie enters a state of confusion.

BUT,

 svn log -rHEAD:1

shows the new revision, whereas

 svn log

does not. So apparently these two commands are not equivalent? I would have
thought that omitting a revision specification to "svn log" would imply
"-rHEAD:1".

To see the new revision with a plain "svn log" command, you have to do an
"svn update" first, even though "svn status -u" says it's not
necessary. Very confusing for a newbie. What is the reason for this
behaviour?

If there really is a compelling reason, then the book should mention it in
the "newbie" pedagogical sections, and maybe also point it out in the
reference section.

Here is a sample shell session to illustrate the confusing behaviour:

  nso@SBMA:/tmp> svn --version | head -1
  svn, version 1.1.1 (r11581)
  nso_at_SBMA:/tmp> svn co file:///tmp/rep work
  A work/mydir
  Checked out revision 1.
  nso@SBMA:/tmp> cd work
  nso@SBMA:/tmp/work> cd mydir
  nso@SBMA:/tmp/work/mydir> svn log
  ------------------------------------------------------------------------
  r1 | nso | 2004-11-16 10:27:42 +0100 (Tue, 16 Nov 2004) | 1 line
  
  Added mydir
  ------------------------------------------------------------------------
  nso@SBMA:/tmp/work/mydir> svn st -u
  Status against revision: 1
  nso@SBMA:/tmp/work/mydir> ls >f1
  nso@SBMA:/tmp/work/mydir> svn add f1
  A f1
  nso@SBMA:/tmp/work/mydir> svn commit -m"add f1"
  Adding mydir/f1
  Transmitting file data .
  Committed revision 2.
  nso@SBMA:/tmp/work/mydir> svn log
  ------------------------------------------------------------------------
  r1 | nso | 2004-11-16 10:27:42 +0100 (Tue, 16 Nov 2004) | 1 line
  
  Added mydir
  ------------------------------------------------------------------------
  nso@SBMA:/tmp/work/mydir> svn st
  nso@SBMA:/tmp/work/mydir> svn st -u
  Status against revision: 2
  nso@SBMA:/tmp/work/mydir> svn log -rHEAD:1
  ------------------------------------------------------------------------
  r2 | nso | 2004-11-16 10:30:13 +0100 (Tue, 16 Nov 2004) | 1 line
  
  add f1
  ------------------------------------------------------------------------
  r1 | nso | 2004-11-16 10:27:42 +0100 (Tue, 16 Nov 2004) | 1 line
  
  Added mydir
  ------------------------------------------------------------------------
  nso@SBMA:/tmp/work/mydir> svn update
  At revision 2.
  nso@SBMA:/tmp/work/mydir> svn log
  ------------------------------------------------------------------------
  r2 | nso | 2004-11-16 10:30:13 +0100 (Tue, 16 Nov 2004) | 1 line
  
  add f1
  ------------------------------------------------------------------------
  r1 | nso | 2004-11-16 10:27:42 +0100 (Tue, 16 Nov 2004) | 1 line
  
  Added mydir
  ------------------------------------------------------------------------
  nso@SBMA:/tmp/work/mydir>

  
Best regards,

Niels

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 16 10:52:37 2004

This is an archived mail posted to the Subversion Users mailing list.