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

Re: "svn log" after "svn commit"

From: Bob Proulx <bob_at_proulx.com>
Date: 2006-08-04 17:32:59 CEST

Garrett Rooney wrote:
> Brent Baadsgaard wrote:
> >I am new to subversion (using 1.3.2). I've noticed a behavior I did not
> >expect. When I execute "svn commit", I'm notified that the repository
> >version is updated. When I do an "svn log" after that, the log does not
> >show
> >the version of the last commit. I have to do an "svn update" in order for
> >the latest version (HEAD) to show up with "svn log". Is this a bug or a
> >feature?
>
> It's a side effect of allowing mixed revision working copies.
> Committing a modification to a file does not update its parent
> directory to the new revision, because doing so might result in a
> conflict. svn log defaults to targeting your current working
> directory, so it starts at the older rev, missing your new change.

Also it allows a user on a slow network wan connection to optimize for
speed. Also it allows a user to choose when to pull the update and
handle possible conflicts. That is to say that if I have three
commits that I want to make in a row I can commit the first, then the
second, then the third without being required to pull an update from
the server in between those commits. Updates from the server may be
arbitrarily large and I get to choose to pull them at a time that I
can tolerate that update. Updates from the server may conflict with
other files I have modified locally.

  edit file1 file2 file3 file4 file5
  svn commit file1
  svn commit file2
  svn commit file3
  # take laptop into office for direct network connection
  svn update
  edit file4
  svn commit # commits all outstanding changes

You can explicitly view the log all of the way to the head or just the
last commit by giving the -r option.

  svn log -rHEAD:0 # all log entries
  svn log -rHEAD # just the last one

I have often wanted just a few. Alas this is not possible.

  svn log -rHEAD:HEAD-10 # not a feature, not available
  svn log -r42321:42311 # view just the last 10, if 42321 is HEAD

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 4 17:34:57 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.