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

[PATCH-REVIEW] Relative URL support for info command

From: Troy Curtis Jr <troycurtisjr_at_gmail.com>
Date: 2007-10-27 17:57:46 CEST

Hi all, this is my very first attempt at a real patch with actual
code. As such I wanted to make sure people thought I was going down
the right track before I continued on.

**NOTE: I am asking for a quick review of my code. My function
prototypes are not properly documented yet and I have picked the "svn
info" command as my first test case, just to make sure I'm on the
right track.

Here's what is going on. I want to add relative URL support for all
the subversion commands, though I think it will be most useful in cp,
mv, and merge commands. I picked the "info" subcommand first because
it doesn't actually DO anything with the files and/or repo.

As you can see in the patch I added three new functions:

libsvn_subr/path.c: svn_path_is_relative_url()
libsvn_subr/path.c: svn_path_resolve_relative_url()
libsvn_wc/util.c: svn_wc_get_absolute_url()

svn_path_resolve_relative_url() does all the actual relative ->
absolute translation work and is based largely (as in copy-n-paste :)
) on Blair's recent relative-externals work. The
svn_wc_get_absolute_url() is there just to make it easier to do the
translation if you don't already have the repository root URL.

I then used these functions to implement relative url support in
libsvn_client/info.c: svn_client_info2().

Please be particularly critical of:
* My usage of apr -- I've just started learning it
* My placement and organization of new functions -- does it fit with
the Subversion "standard"?

Any and all comments are appreciated!

Troy

-- 
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)


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

Received on Sat Oct 27 17:58:05 2007

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