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

Re: svn diff -r

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-09-20 23:58:42 CEST

I think we still haven't quite understood what you're asking... But
I'll try to answer; see below. If you have further questions, it
would help if you would tell us what you're trying to accomplish, the
command you're running and the output you're getting (like you've
been showing us so far), and what output you expected to get instead.

On Sep 17, 2007, at 21:17, paptimusx scirocco wrote:

> I am sorry I was miswriteing {"date"}.
> then, I tried with another repository.
> my repository is a shift from cvs via cvs2svn.py 2.00.
>
> SVN.DIR>svn --version
> svn, version 1.4.5 (r25188)
> compiled Aug 22 2007, 20:49:04
>
> SVN.DIR>svn log xxxxx1.cpp
> ----------------------------------------------------------------------
> --
> r10136 | myname | 2007-09-12 17:48:00 +0900 (Wed, 12 9 2007) | 3 lines
>
> xx ...
>
> ----------------------------------------------------------------------
> --
> r10130 | myname | 2007-09-06 17:43:39 +0900 (Thu, 06 9 2007) | 2 lines
>
> 2007-09-06 ....
>
> ----------------------------------------------------------------------
> --
> r10094 | myname | 2007-08-22 16:20:37 +0900 (Wed, 22 8 2007) | 2 lines
>
> :

Ok, so you're showing us that changes were made to xxxxx1.cpp in
revisions 10094, 10130, 10136...

> SVN.DIR>svn diff -r10130:10136 | wc -l
> 94
>
> SVN.DIR>svn diff -r10130:10136 xxxxx1.cpp | wc -l
> 24
>
> this is not good.

That looks ok to me. You're showing us that diffing the directory
shows 94 lines of changes, while diffing xxxxx1.cpp only shows 24
lines of changes. That sounds reasonable, if other files in that
directory were also changed between those revisions. Check "svn
log" (as opposed to "svn log xxxxx1.cpp").

> SVN.DIR>svn diff -r{2007-09-06}:{2007-09-12} xxxxx1.cpp
>
> SVN.DIR>svn diff -r{2007-09-06}:{2007-09-12} xxxxx1.cpp
>
> SVN.DIR>svn diff -r{"2007-09-06"}:{"2007-09-12"} xxxxx1.cpp
>
> SVN.DIR>svn diff -r{"2007-09-01"}:{"2007-09-12"} xxxxx1.cpp
>
>
> this is not good either.

I think you're showing us here that all these date-based diffs
produce no output, and you think it should produce output? If so,
then I believe the problem is that specifying dates doesn't do
exactly what you think it does. The problem is that dates without
times get expanded to dates at midnight. Read this page in the book:

http://svnbook.red-bean.com/en/1.4/
svn.tour.revs.specifiers.html#svn.tour.revs.dates

Especially the box labeled "Is Subversion a Day Early?" which reads:

"If you specify a single date as a revision without specifying a time
of day (for example 2006-11-27), you may think that Subversion should
give you the last revision that took place on the 27th of November.
Instead, you'll get back a revision from the 26th, or even earlier.
Remember that Subversion will find the most recent revision of the
repository as of the date you give. If you give a date without a
timestamp, like 2006-11-27, Subversion assumes a time of 00:00:00, so
looking for the most recent revision won't return anything on the day
of the 27th.

"If you want to include the 27th in your search, you can either
specify the 27th with the time ({"2006-11-27 23:59"}), or just
specify the next day ({2006-11-28})."

> SVN.DIR>svn diff -r{"2007-01-01"} xxxxx1.cpp | wc -l
> 0

I think this command doesn't make sense because you've only specified
one revision (one date) but diff requires two revisions or dates.

If you need further help with using dates as revisions, it would be
useful if you would check out a working copy of a publicly available
project, such as the Subversion source code itself, and do your tests
there, so that when you show us revision numbers and date ranges and
such, we can check out a working copy and try it ourselves and see
what's going on.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 21 00:00:39 2007

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.