You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Clemens Schwaighofer <cs...@tequila.co.jp> on 2005/02/24 09:17:01 UTC
diff / log ... improvment for the -r switch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I would love to see the -r flag more usable for me. As subversion uses
global revision numbers, mine can be very "cheesy" which means they have
huge gaps in between, as I have a lot of different projects in my
repository.
So now I would love to see the diff for a file for the last X changes.
Of course I don't know which rev was the working copy - X, so I have to
search through the logs, count down to X and then make a -r with the
right number.
I would love to see a wy to say
$> svn diff -r HEAD-5 foo.c
so I can say, show me the diff from 5 commits before the current checked
out working copy of 'foo.c'. The same would be great for log too. Or I
want to know the latest committed and 5 before that, what cahnges
$> svn diff -r HEAD-5:HEAD foo.c
wouldn't that be great?
One more thing:
I really have _no_ idea what the difference between HEAD, BASE and
COMMITTED is. Especially BASE and COMITTED.
HEAD is the latest in the rep. but the other toos. the explenation just
doesn't make any sense to me ...
Although I use subversion for some time now, i don't count myself as a
professional user, so please point me the documentation or how to use
it, if it is already doable, or where this is described.
- --
[ Clemens Schwaighofer -----=====:::::~ ]
[ TBWA\ && TEQUILA\ Japan IT Group ]
[ 6-17-2 Ginza Chuo-ku, Tokyo 104-0061, JAPAN ]
[ Tel: +81-(0)3-3545-7703 Fax: +81-(0)3-3545-7343 ]
[ http://www.tequila.co.jp http://www.tbwajapan.co.jp ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCHZuNjBz/yQjBxz8RAtaoAKCul6AtQ0OTe7NCaORajDvbH/HF/wCfb4PQ
7Af95QTJEoX8/vF5pOTnt3c=
=kmog
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: diff / log ... improvment for the -r switch
Posted by Clemens Schwaighofer <cs...@tequila.co.jp>.
--On 24/2月/2005 07:35:40 -0600 Ben Collins-Sussman <su...@collab.net>
wrote:
>> wouldn't that be great?
>
> Yes, it's been discussed many times on the dev@ list. Nobody's ever
> bothered to implement it yet.
Well, then I'll have to wait until somebody finds time to this. Perhaps
after 1.2, or even long after 2.0
> I'm looking at
> http://svnbook.red-bean.com/en/1.1/ch03s03.html#svn-ch-3-sect-3.2.
Thank you so very much for explaining this. Now I can explain this to my
co-workers :)
--
Clemens Schwaighofer
Re: diff / log ... improvment for the -r switch
Posted by Ben Collins-Sussman <su...@collab.net>.
On Feb 24, 2005, at 3:17 AM, Clemens Schwaighofer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I would love to see the -r flag more usable for me. As subversion uses
> global revision numbers, mine can be very "cheesy" which means they
> have
> huge gaps in between, as I have a lot of different projects in my
> repository.
>
> So now I would love to see the diff for a file for the last X changes.
> Of course I don't know which rev was the working copy - X, so I have to
> search through the logs, count down to X and then make a -r with the
> right number.
>
> I would love to see a wy to say
>
> $> svn diff -r HEAD-5 foo.c
>
> so I can say, show me the diff from 5 commits before the current
> checked
> out working copy of 'foo.c'. The same would be great for log too. Or I
> want to know the latest committed and 5 before that, what cahnges
>
> $> svn diff -r HEAD-5:HEAD foo.c
>
> wouldn't that be great?
Yes, it's been discussed many times on the dev@ list. Nobody's ever
bothered to implement it yet.
>
> One more thing:
>
> I really have _no_ idea what the difference between HEAD, BASE and
> COMMITTED is. Especially BASE and COMITTED.
> HEAD is the latest in the rep. but the other toos. the explenation just
> doesn't make any sense to me ...
>
I'm looking at
http://svnbook.red-bean.com/en/1.1/ch03s03.html#svn-ch-3-sect-3.2.
BASE means, "the file's revision in your working copy". If you run
'svn info foo.c', that's the number you'll see. 'svn status -v' also
shows that in the first revision column.
COMMITTED means, "the last changed revision" of the file. There's even
a $LastChangedRev$ keyword for this. 'svn status -v' shows it in the
second revision column.
Here's a real simple example. You checkout a working copy of r5, so
everything in the working copy is at r5. Now your friend commits a
change to foo.c in r6. You update again, and now your whole working
copy is at r6. That is, every file has a BASE revision of 6. If you
look at foo.c, it's 'last changed revision" (COMMITTED) is r6. But the
other files all have different 'last changed revisions'... things less
than 6.
PREV is just defined to be COMMITTED-1. Which means at any time, 'svn
diff -rPREV:COMMITTED foo.c' will show the last change somebody made to
the file.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org