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

Re: Python-subversion

From: Marc Schlinger <marc.schlinger_at_pace.com>
Date: Thu, 08 Dec 2011 16:00:03 +0100

Le jeudi 08 décembre 2011 à 15:20 +0200, Daniel Shahaf a écrit :
> Marc Schlinger wrote on Thu, Dec 08, 2011 at 14:07:06 +0100:
> > Hello,
> >
> > I'm using subversion and python-subversion on a debian squeeze system.
> > The package version is 1.6.12dfsg-4.
> >
> > I'm trying to modify the behavior of the changed command of the
> > svnlook.py file provided by python-subversion.
> >
> > I'm want to show that a directory was copied by adding a "+" to the
> > output - the way genuine svnlook command do.
> >
> > I've modified the add_directory method of the ChangedEditor as follow:
> >
> > def add_directory(self, path, parent_baton,
> > copyfrom_path, copyfrom_revision, dir_pool):
> >
> > print('A %s %s/' % ("+" if copyfrom_path else " ", path))
> > return [ 0, path ]
> >
> > but the copyfrom_path always equals to None.
> >
> > Is there a way to have this parameter set?
> >
>
> What does viewvc do to cause
> http://svn.apache.org/viewvc?view=revision&revision=1207555
> to show "(Copied from
> subversion/trunk/contrib/server-side/mod_dontdothat, r1207550)"
> ?

Thanks for pointing out this project. I didn't even notice it was
written in python.

To answer your question.
They call the svn.fs.copied_from(rev_root, path) method to get the
copyfrom_path information.

They don't seem to implement the "editor" interface, so I still don't
know how to get the copyfrom_info directly in add_directory.

>
> > Thanks,
> >
> > Marc Schlinger.
> >
> >

This message has been scanned for viruses by BlackSpider MailControl. - www.blackspider.com
Received on 2011-12-08 16:02:23 CET

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.