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

Re: svn commit: r1155001 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/info.c svn/info-cmd.c svn/schema/info.rnc

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 9 Aug 2011 01:49:50 +0200

On Mon, Aug 08, 2011 at 06:11:42PM +0200, Bert Huijben wrote:
>
>
> > -----Original Message-----
> > From: stsp_at_apache.org [mailto:stsp_at_apache.org]
> > Sent: maandag 8 augustus 2011 18:05
> > To: commits_at_subversion.apache.org
> > Subject: svn commit: r1155001 - in /subversion/trunk/subversion:
> > include/svn_wc.h libsvn_wc/info.c svn/info-cmd.c svn/schema/info.rnc
> >
> > Author: stsp
> > Date: Mon Aug 8 16:05:24 2011
> > New Revision: 1155001
> >
> > URL: http://svn.apache.org/viewvc?rev=1155001&view=rev
> > Log:
> > Show moved-to/moved-from information in 'svn info' output.
> >
> > * subversion/include/svn_wc.h
> > (svn_wc_info_t): New fields MOVED_FROM_RELPATH and
> > MOVED_TO_RELPATH.
> >
> > * subversion/svn/info-cmd.c
> > (print_info_xml, print_info): Show move information in wc info, if any.
> >
> > * subversion/svn/schema/info.rnc
> > (wc-info): Add moved-from and moved-to tags.
> >
> > * subversion/libsvn_wc/info.c
> > (svn_wc_info_dup): Dup the new fields.
> > (build_info_for_node): Obtain move information from DB and put it into
> > the returned wc-info structure.
> >
> > Modified:
> > subversion/trunk/subversion/include/svn_wc.h
> > subversion/trunk/subversion/libsvn_wc/info.c
> > subversion/trunk/subversion/svn/info-cmd.c
> > subversion/trunk/subversion/svn/schema/info.rnc
> >
> > Modified: subversion/trunk/subversion/include/svn_wc.h
> > URL:
> > http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc
> > .h?rev=1155001&r1=1155000&r2=1155001&view=diff
> > ==========================================================
> > ====================
> > --- subversion/trunk/subversion/include/svn_wc.h (original)
> > +++ subversion/trunk/subversion/include/svn_wc.h Mon Aug 8 16:05:24
> > 2011
> > @@ -3068,6 +3068,15 @@ typedef struct svn_wc_info_t
> > /** The local absolute path of the working copy root. */
> > const char *wcroot_abspath;
> >
> > + /** The path the node was moved from, if it was moved here. Else NULL.
> > + * This path is relative to the working copy root.
> > + * @since New in 1.8. */
> > + const char *moved_from_relpath;
> > +
> > + /** The path the node was moved to, if it was moved away. Else NULL.
> > + * This path is relative to the working copy root.
> > + * @since New in 1.8. */
> > + const char *moved_to_relpath;
> > } svn_wc_info_t;
>
> I think the api should just provide abspaths here, like we do in all new in 1.7+ wc apis.
> The client - in this case 'svn'- can then decide what to do with the path.

I thought about this, too. I decided to use relpaths mainly because
the wc-info struct pertains to a single working copy (it has a single
wcroot_abspath member).

We'd only need abspaths here to express moves between different working
copies. For now, details of how we would implement this are unclear to
me. It seems like a lot more work would be needed to support this anyway.
Even the queries we use at the DB storage layer don't support this right now.
So I like the idea of having the current API implicitly enforce this
restriction.

That said, I see a point in making the APIs future proof.
But we can always add new members to the struct (e.g. moved_from_abspath)
when the time is ready and we understand all of what is needed to support
moves across different working copies.
Received on 2011-08-09 01:50:29 CEST

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.