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

Re: Adding changeset-like functionality to subversion

From: Nuutti Kotivuori <naked_at_iki.fi>
Date: 2002-10-10 00:55:51 CEST

Noel Yap wrote:
> --- Ben Collins-Sussman <sussman@collab.net> wrote:
>> Jack simply applies her change to his working copy
>> using 'svn merge':
>>
>> svn merge -r52:53 path/to/project
>> my/working/copy/path
>>
>> This means, "take the differences between revision
>> 52 and 53 of
>> path/to/project, and apply these differences as
>> local modifications to
>> my/working/copy/path."
>
> Of course, this is assuming that 52 is 53's
> predecessor. I've mentioned (possibly in other
> threads) that it'd be great if one could do:
> svn merge -rPREV(53):53 path/to/project
> my/working/copy/path
>
> I don't think PREV can be used in this manner, but is
> there a way to get the same functionality?

I think you have a bit of a misunderstanding here - or I do :) This is
the same thing I mentioned earlier to you.

If a change happened at revision 53, on a branch - like it did here -
then the change is returned by a diff of revision 52 and 53. You do
not have to go back and search the previous revision the same file (or
directory) actually changed last.

An example ought to clear this up.

Assume a directory structure of

/trunk/a
/trunk/b
/trunk/c
/branches/dev/a
/branches/dev/b
/branches/dev/c

Now commits

revision 10: modified /trunk/b
revision 11: modified /branches/dev/a
revision 12: modified /trunk/a
revision 13: modified /trunk/c
revision 14: modified /branches/dev/a

Now if we want to get the changeset for revision 14 - all we have to
do is 'svn diff -r13:14' on the correct path at the repository. We do
not have to say 'svn diff -r11:14', though that would create the exact
same result. So there is no need for PREV here at all.

What is a problem though is finding the times when a certain file
changed - or finding the last change to a file without a working
copy. But those are separate problems, not a problem at the thing
sussman is describing.

-- Naked

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 10 00:56:36 2002

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

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