You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Henrik Svensson <in...@telia.com> on 2002/07/24 21:20:25 UTC
Version tree
Is there any way to find out the version tree for a file? I tried to figure
out which functions to use to get the information from the repository by
looking in the header files. but I can't figure out how it can be done with
the client API. What I understand from the design document, the information
is stored there.
Regards.
Henrik
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Version tree
Posted by Marcus Comstedt <ma...@mc.pp.se>.
Ben Collins-Sussman <su...@collab.net> writes:
> By the way, Marcus: there's no difference between a move and a copy; in
> Subversion's eyes, a 'move' == 'copy + rm'. So whenever you run 'svn
> log -v' and see something about a copy, it could be a move or a copy.
Yeah, I realized the problem I was seeing was a different one. I was
looking at the log for /tags/0.13.0/INSTALL, and not seeing a "copied
from" message. The problem here though is that when you copy a
directory, the logs for the files inside will not report a the copy
even though they were also, in essence, copied.
// Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Version tree
Posted by Ben Collins-Sussman <su...@collab.net>.
Branko Čibej <br...@xbc.nu> writes:
> Marcus Comstedt wrote:
>
> >* For the round "version" nodes: Which revisions in which the file
> > has changed (easy).
> >
> >* For the square "branch" nodes: Which revisions of the file that
> > have been copied/moved to other pathnames (and which those pathnames
> > are). This seems to be more difficult. There is a "copyfrom_path"
> > and a "copyfrom_rev" attribute in the log that gives the necessary
> > info, although it points the wrong way. That can be fixed by
> > requesting the entire log and reversing the links yourself of
> > course. What's worse is that these attributes only seems to be
> > added for moves, not for copies. Is that correct?
>
> All of this information is available in the repsitory. Our new schema
> was designed (in part) with exactly such functionality in mind. You'd
> need some help from the server to get the required data, but it's be
> much faster (and more accurate) than parsing the logs.
By the way, Marcus: there's no difference between a move and a copy; in
Subversion's eyes, a 'move' == 'copy + rm'. So whenever you run 'svn
log -v' and see something about a copy, it could be a move or a copy.
>
> >* For the red "merge" arcs: Which revisions of the file that have
> >been merged into another path, and what path and revision it has
> >been merged with. Does svn merge record any relationship between
> >the two merged files at all?
> >
>
> Not yet. Poat-1.0. Unfortunately.
Right. This is the infamous 'repeated merge' problem that CVS
suffers, and is discussed in the subversion Design document. We'll
probably end up solving this problem by using properties. That is,
whenever you run 'svn merge', the files which get patched also get
some kind of information added to special "merge properties". From
then on, Subversion looks at these props to "remember" which changes
were merged on each file.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Version tree
Posted by Branko Čibej <br...@xbc.nu>.
Marcus Comstedt wrote:
>"Henrik Svensson" <in...@telia.com> writes:
>
>
>
>>Something like that. I would like to be able to make a graphical
>>representation of the file versions like
>>http://svn.collab.net/repos/svn/trunk/notes/guis/pics/ClearCase-lsvtree-1.gi
>>f . WinCVS also have a possibility to show a graph. I guess that i can do
>>some parsing of the log but that seems to be a bit primitive.
>>
>>
>
>Just looking at that picture and guessing what it means, it looks to
>me like you need to know three things to build it:
>
>* For the round "version" nodes: Which revisions in which the file
> has changed (easy).
>
>* For the square "branch" nodes: Which revisions of the file that
> have been copied/moved to other pathnames (and which those pathnames
> are). This seems to be more difficult. There is a "copyfrom_path"
> and a "copyfrom_rev" attribute in the log that gives the necessary
> info, although it points the wrong way. That can be fixed by
> requesting the entire log and reversing the links yourself of
> course. What's worse is that these attributes only seems to be
> added for moves, not for copies. Is that correct?
>
All of this information is available in the repsitory. Our new schema
was designed (in part) with exactly such functionality in mind. You'd
need some help from the server to get the required data, but it's be
much faster (and more accurate) than parsing the logs.
>* For the red "merge" arcs: Which revisions of the file that have
> been merged into another path, and what path and revision it has
> been merged with. Does svn merge record any relationship between
> the two merged files at all?
>
Not yet. Poat-1.0. Unfortunately.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Version tree
Posted by Marcus Comstedt <ma...@mc.pp.se>.
"Henrik Svensson" <in...@telia.com> writes:
> Something like that. I would like to be able to make a graphical
> representation of the file versions like
> http://svn.collab.net/repos/svn/trunk/notes/guis/pics/ClearCase-lsvtree-1.gi
> f . WinCVS also have a possibility to show a graph. I guess that i can do
> some parsing of the log but that seems to be a bit primitive.
Just looking at that picture and guessing what it means, it looks to
me like you need to know three things to build it:
* For the round "version" nodes: Which revisions in which the file
has changed (easy).
* For the square "branch" nodes: Which revisions of the file that
have been copied/moved to other pathnames (and which those pathnames
are). This seems to be more difficult. There is a "copyfrom_path"
and a "copyfrom_rev" attribute in the log that gives the necessary
info, although it points the wrong way. That can be fixed by
requesting the entire log and reversing the links yourself of
course. What's worse is that these attributes only seems to be
added for moves, not for copies. Is that correct?
* For the red "merge" arcs: Which revisions of the file that have
been merged into another path, and what path and revision it has
been merged with. Does svn merge record any relationship between
the two merged files at all?
// Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Version tree
Posted by Henrik Svensson <in...@telia.com>.
----- Original Message -----
From: "Ben Collins-Sussman" <su...@collab.net>
To: "Henrik Svensson" <in...@telia.com>
Cc: "Subversion list" <de...@subversion.tigris.org>
Sent: Wednesday, July 24, 2002 11:25 PM
Subject: Re: Version tree
> "Henrik Svensson" <in...@telia.com> writes:
>
> > Is there any way to find out the version tree for a file? I tried to
figure
> > out which functions to use to get the information from the repository by
> > looking in the header files. but I can't figure out how it can be done
with
> > the client API. What I understand from the design document, the
information
> > is stored there.
>
> 'svn log -v foo.c' ?
Yes, especially now when Issue #811 is finished.
>
> That will show you the complete history of the node, including any
> renames, all the way back to when the node was created. I'm not sure
> what you mean by the "version tree" for the file. Are you talking
> about the Clearcase concept?
Something like that. I would like to be able to make a graphical
representation of the file versions like
http://svn.collab.net/repos/svn/trunk/notes/guis/pics/ClearCase-lsvtree-1.gi
f . WinCVS also have a possibility to show a graph. I guess that i can do
some parsing of the log but that seems to be a bit primitive.
Henrik
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Version tree
Posted by Ben Collins-Sussman <su...@collab.net>.
"Henrik Svensson" <in...@telia.com> writes:
> Is there any way to find out the version tree for a file? I tried to figure
> out which functions to use to get the information from the repository by
> looking in the header files. but I can't figure out how it can be done with
> the client API. What I understand from the design document, the information
> is stored there.
'svn log -v foo.c' ?
That will show you the complete history of the node, including any
renames, all the way back to when the node was created. I'm not sure
what you mean by the "version tree" for the file. Are you talking
about the Clearcase concept?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org