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

Bug Report: Revision 0 not listed in TortoiseSVN log dialog

From: Sean Leonard <dev+tortoisesvn_at_seantek.com>
Date: Wed, 06 Feb 2008 02:18:57 -0600

Greetings,

I have been using TortoiseSVN for over a year now and really like it. I
came across this bug (maybe it should be called an "anomaly", since it
is not an earth-shattering problem), and wanted to know if someone would
be able to take a look. I think that the fix should be pretty easy, and
would make the TortoiseSVN behavior identical to the SVN behavior.

Bug Summary: Revision 0 is not listed in the TortoiseSVN log dialog.
Why It Matters: This behavior is inconsistent with svn log. Furthermore,
setting the revision 0 log entry can associate additional metadata with
"the repository itself" rather than any specific revision of the repository.
Request Summary: Display Revision 0 in log dialog when revprop svn:log
is present, and start/end from revision 0, not revision 1, by default.
Versions Tested: TortoiseSVN 1.4.7 Build 11792 32-bit, English
Versions Examined: Latest TortoiseSVN trunk (2008-02-06)

Steps to Reproduce:
1. Create or get full access to an SVN repository.
2. Add pre-revprop-change hook to permit write access to all revprops.
3. Add svn:log to revision 0. This may be accomplished by:
svn propset --revprop -r 0 svn:log "Log entry here"

Now when you go to look at the Log Messages window for a checked out
copy, TortoiseSVN will not report Revision 0. It always starts at
Revision 1, even if you click "Show All" or other options. Furthermore,
clicking "Show Range..." pretty clearly shows Start Revision [latest
rev] End Revision [1]. If you try to enter 0 for either start or end,
the error "Invalid revision number!" pops up in a balloon tip.

Expected behavior:
TortoiseSVN should display Revision 0 in the log entries, especially
when instructed to display all log entries.

Compare with svn log. If you perform the steps above (adding svn:log)
and then run svn log, you will see output like:
svn log
------------------------------------------------------------------------
r1 | author1 | 2008-02-06{...} | 2 lines

Some text line 1.
Here is a log entry.
------------------------------------------------------------------------
r0 | seantek | 2008-02-05{...} | 1 line

Log entry here
------------------------------------------------------------------------

This even works when rev 0 svn:log is present but an empty string "" (as
opposed to null/not present). The behavior of svn log appears to be that
if and only if svn:log is present on rev 0, then rev 0 displays, even if
svn:author or svn:date are not set for rev 0. This is probably because
rev 0 svn:date does not indicate the presence of any particular
intention of setting a log message, as svnadmin create usually sets rev
0 svn:date to the creation date of the repository.

Suggested code sections to examine:
I do not know the TortoiseSVN source code very well, but I took a quick
look. To whomever would be willing to help, take a look at:
src/TortoiseProc/LogDlg.h
src/TortoiseProc/LogDlg.cpp

Particularly in LogDlg.cpp:
m_startrev
m_endrev
tests such as line 624: dlg.SetEndRevision( (m_endrev>0) ? m_endrev : 1);

Commentary: Revision 0 appears to be the base revision in every
repository, and is created on svnadmin create.

Let me know if I can be of any assistance in fixing this bug.

Kind regards,

Sean Leonard

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: dev-help_at_tortoisesvn.tigris.org
Received on 2008-02-06 09:19:44 CET

This is an archived mail posted to the TortoiseSVN Dev mailing list.

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