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

[PATCH] Add URL support for propset and propdel and fix URL support for propedit

From: Kevin Radke <kmradke_at_gmail.com>
Date: Fri, 22 Feb 2008 11:56:08 -0600

Hi,

This is my first attempt at a patch to add URL support to the propset
and propdel subcommands of svn. In doing so, I also noticed that
propedit did not support multiple URL arguments correctly.

I needed URL functionality for propdel, since we had a repository which
had the svn:special property set for a file that was not special. I was
unable to create a working copy with this file due to this error, and
I was also unable to delete the property since you previously needed
a working copy to delete properties. I was able to use this modified
propdel to delete the incorrect property directly in the repository.

(This is my first patch, so be gentle)

* NOTE: This patch is a little uglier than I would like.

Current issues/limitations:

1) propset and propdel are limited to one URL path per command. propedit
    would also previously give strange errors if you used more than one URL,
    so I limited all 3 subcommands. Someone with more baton experience
    should probably add multi URL support in the future.

2) Since -r is now allowed (actually required) for propset and propdel, I
    removed the error message generated when combining -r with a
    versioned property. Do we still want/need this error when working
    with non-URL paths?

3) There is still some inconsistency with propedit. It will not allow a -r
    parameter when using a URL (it assumes HEAD and computes
    base revision on the fly), while propdel and propset require it and
    do not assume HEAD.

4) I used a lot of copy/paste when creating this patch without fully
    understanding how errors should be handled. I'm sure I did
    something wrong.

[[[
Add URL support for propset and propdel and fix URL support for propedit.

* subversion/svn/propdel-cmd.c (svn_cl__propdel):
    Remove -r parameter error for versioned properties.
    Add check to allow only one URL parameter.
    Use -r parameter value as base revision for URL deletes.
    Make sure the property exists before deleting it.

* subversion/svn/propset-cmd.c (svn_cl__propset):
    Remove -r parameter error for versioned properties.
    Add check to allow only one URL parameter.
    Use -r parameter value as base revision for URL deletes.

* subversion/svn/main.c (svn_cl__cmd_table):
    Update help message.

* subversion/svn/propedit-cmd.c (svn_cl__propedit):
    Add check to allow only one URL parameter.
    Fix existing typo with cleaning up log message baton.

Patch by: kmradke
]]]

Kevin R.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-02-22 20:29:39 CET

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.