You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Max Bowsher <ma...@ukf.net> on 2004/04/03 00:03:15 UTC

Suggest: Make "svn log path" show revisions where path was copied from, in addition to those in which path changed.

What do people think of making "svn log path" show revisions in which path
was copied from, in addition to what it currently shows?

This would have the benefit of making "svn log trunk" show when the trunk
was tagged or branched.

(I have this basically working, but need to verify it doesn't get confused
with complicated copies / renames.)

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Suggest: Make "svn log path" show revisions where path was copied from, in addition to those in which path changed.

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Max Bowsher" <ma...@ukf.net> writes:

> I'm afraid I am doing a walk (though not by cursor). Here is the algorithm
> in pseuso-python:
> 
> for rev in range:
>   for copy in rev.txn.copies:
>     if path.is_prefix_of(copy.src_path) or \
>        copy.src_path.is_prefix_of(copy):
>         return True # Show this revision
> return False # Show this revision
> 
> I guess that is more db lookups than you are happy with?

Yeah, I'm afraid so.  This is the exact same algorithm I used in the
first version of the FS history code (except in reverse, walking
backwards through time) -- and it quickly brought Berkeley DB to its
knees with lock consumption.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Suggest: Make "svn log path" show revisions where path was copied from, in addition to those in which path changed.

Posted by Max Bowsher <ma...@ukf.net>.
C. Michael Pilato wrote:
> "Max Bowsher" <ma...@ukf.net> writes:
>
>> What do people think of making "svn log path" show revisions in
>> which path was copied from, in addition to what it currently shows?
>
> Interesting to me only if you plan only to show the revisions in which
> PATH *or any of its parents* was the actual source of a copy,

Yes.

> and if
> you can answer these questions without a cursor walk of any of the DB
> tables.

I'm afraid I am doing a walk (though not by cursor). Here is the algorithm
in pseuso-python:

for rev in range:
  for copy in rev.txn.copies:
    if path.is_prefix_of(copy.src_path) or \
       copy.src_path.is_prefix_of(copy):
        return True # Show this revision
return False # Show this revision

I guess that is more db lookups than you are happy with?

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Suggest: Make "svn log path" show revisions where path was copied from, in addition to those in which path changed.

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Max Bowsher" <ma...@ukf.net> writes:

> What do people think of making "svn log path" show revisions in
> which path was copied from, in addition to what it currently shows?

Interesting to me only if you plan only to show the revisions in which
PATH *or any of its parents* was the actual source of a copy, and if
you can answer these questions without a cursor walk of any of the DB
tables.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org