You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kevin Radke <km...@gmail.com> on 2008/02/22 17:56:08 UTC

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

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.

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
kmradke@rockwellcollins.com wrote:
> I'll retest to make sure sending in a non-HEAD base revision that
> hasn't had property changes since the specified base revision allows
> the commit.  If not, I guess this will be an even bigger patch.

Okay.  It's possible that propchanges on directories might have issues with 
the "directory bubble-up" effect, causing commits to bounce that probably 
shouldn't.  But give it a try, see what happens.

> What about a test to make sure the property exists before deleting it?
> The current lib routines will allow you to make no-op propdel commits...

That sounds wise.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


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

Posted by km...@rockwellcollins.com.
"C. Michael Pilato" <cm...@collab.net> wrote on 02/25/2008 11:56:25 AM:
> C. Michael Pilato wrote:
> > kmradke@rockwellcollins.com wrote:
> >>> Yes, that is how propedit-on-URL support works.  Implementing this
> >>> feature is as simple as passing the right base_revision_for_url
> >>> argument to svn_client_propset3.
> >>
> >> By "right" you mean the HEAD revision, right?  Since I was getting
> >> errors when I passed in anything else...
> > 
> > By "right" he means the base revision value we've been talking about, 
> > which defaults to HEAD but can be overridden at the command-line using 

> > this new --base-rev (which by the way I think should be 
> > "--base-revision") parameter's value.
> 
> To clarify, we're saying that you needn't write a single line of code 
that 
> fetches the old prop value and does comparison to the new.  It is not 
the 
> client's responsibility to detect out-of-dateness.  It is the client's 
> responsibility to accurately report based-on revisions and the changes 
it 
> wishes to commit, and leave out-of-dateness checks to the server.

I'll retest to make sure sending in a non-HEAD base revision that
hasn't had property changes since the specified base revision allows
the commit.  If not, I guess this will be an even bigger patch.

What about a test to make sure the property exists before deleting it?
The current lib routines will allow you to make no-op propdel commits...

Kevin R.

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

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
C. Michael Pilato wrote:
> kmradke@rockwellcollins.com wrote:
>>> Yes, that is how propedit-on-URL support works.  Implementing this
>>> feature is as simple as passing the right base_revision_for_url
>>> argument to svn_client_propset3.
>>
>> By "right" you mean the HEAD revision, right?  Since I was getting
>> errors when I passed in anything else...
> 
> By "right" he means the base revision value we've been talking about, 
> which defaults to HEAD but can be overridden at the command-line using 
> this new --base-rev (which by the way I think should be 
> "--base-revision") parameter's value.

To clarify, we're saying that you needn't write a single line of code that 
fetches the old prop value and does comparison to the new.  It is not the 
client's responsibility to detect out-of-dateness.  It is the client's 
responsibility to accurately report based-on revisions and the changes it 
wishes to commit, and leave out-of-dateness checks to the server.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


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

Posted by "C. Michael Pilato" <cm...@collab.net>.
kmradke@rockwellcollins.com wrote:
>> Yes, that is how propedit-on-URL support works.  Implementing this
>> feature is as simple as passing the right base_revision_for_url
>> argument to svn_client_propset3.
> 
> By "right" you mean the HEAD revision, right?  Since I was getting
> errors when I passed in anything else...

By "right" he means the base revision value we've been talking about, which 
defaults to HEAD but can be overridden at the command-line using this new 
--base-rev (which by the way I think should be "--base-revision") 
parameter's value.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


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

Posted by km...@rockwellcollins.com.
dglasser@gmail.com wrote on 02/25/2008 11:06:53 AM:
> On Mon, Feb 25, 2008 at 8:09 AM, C. Michael Pilato <cmpilato@collab.
> net> wrote:
> > kmradke@rockwellcollins.com wrote:
> >  > Ok, I think I'm convinced to go with --base-rev instead of 
> overloading -r.
> >  > I'm also convinced that the rev should be "tolerant" as well.  I.E. 
if
> >  > the property hasn't changed since the specified version, go ahead 
and
> >  > perform the operation.
> >
> >  So, I haven't reviewed the previous patch, but I'm a bit intrigued by 
this
> >  talk that implies you'll be hand-coding the revision-based 
verification.
> >
> >  Our RA commit editor implementations should already have logic in 
place to
> >  bounce commits to out-of-date files and directories.  You need only 
to use
> >  the BASE_REV value (if provided; otherwise, go fetch HEAD from the
> >  repository before the commit and use that value) as the BASE_REVISION
> >  parameter to the likes of editor->open_directory() and 
editor->open_file(),
> >  right?  In doing so, you are telling the repository that the 
> changes you are
> >  transmitting are made against that version of the resource.  If it 
detects
> >  that the version is out of date for the types of changes you are 
making, it
> >  should bounce the commit.  I mean, our whole working-copy commit 
system is
> >  predicated on these types of checks existing and functioning 
correctly.
> >
> >  But perhaps I misunderstand your ideas of being "tolerant".  Is 
> the existing
> >  out-of-dateness checking too restrictive?
> 
> Yes, that is how propedit-on-URL support works.  Implementing this
> feature is as simple as passing the right base_revision_for_url
> argument to svn_client_propset3.

By "right" you mean the HEAD revision, right?  Since I was getting
errors when I passed in anything else...

Kevin R.

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

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

Posted by David Glasser <gl...@davidglasser.net>.
On Mon, Feb 25, 2008 at 8:09 AM, C. Michael Pilato <cm...@collab.net> wrote:
> kmradke@rockwellcollins.com wrote:
>  > Ok, I think I'm convinced to go with --base-rev instead of overloading -r.
>  > I'm also convinced that the rev should be "tolerant" as well.  I.E. if
>  > the property hasn't changed since the specified version, go ahead and
>  > perform the operation.
>
>  So, I haven't reviewed the previous patch, but I'm a bit intrigued by this
>  talk that implies you'll be hand-coding the revision-based verification.
>
>  Our RA commit editor implementations should already have logic in place to
>  bounce commits to out-of-date files and directories.  You need only to use
>  the BASE_REV value (if provided; otherwise, go fetch HEAD from the
>  repository before the commit and use that value) as the BASE_REVISION
>  parameter to the likes of editor->open_directory() and editor->open_file(),
>  right?  In doing so, you are telling the repository that the changes you are
>  transmitting are made against that version of the resource.  If it detects
>  that the version is out of date for the types of changes you are making, it
>  should bounce the commit.  I mean, our whole working-copy commit system is
>  predicated on these types of checks existing and functioning correctly.
>
>  But perhaps I misunderstand your ideas of being "tolerant".  Is the existing
>  out-of-dateness checking too restrictive?

Yes, that is how propedit-on-URL support works.  Implementing this
feature is as simple as passing the right base_revision_for_url
argument to svn_client_propset3.

--dave


-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

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

Posted by km...@rockwellcollins.com.
"C. Michael Pilato" <cm...@collab.net> wrote on 02/25/2008 10:09:42 AM:
> kmradke@rockwellcollins.com wrote:
> > Ok, I think I'm convinced to go with --base-rev instead of overloading 
-r.
> > I'm also convinced that the rev should be "tolerant" as well.  I.E. if
> > the property hasn't changed since the specified version, go ahead and
> > perform the operation.
> 
> So, I haven't reviewed the previous patch, but I'm a bit intrigued by 
this 
> talk that implies you'll be hand-coding the revision-based verification.

Um, no.  I try and do as little extra work as possible... :^)

> Our RA commit editor implementations should already have logic in place 
to 
> bounce commits to out-of-date files and directories.  You need only to 
use 
> the BASE_REV value (if provided; otherwise, go fetch HEAD from the 
> repository before the commit and use that value) as the BASE_REVISION 
> parameter to the likes of editor->open_directory() and 
editor->open_file(), 
> right?  In doing so, you are telling the repository that the changes you 
are 
> transmitting are made against that version of the resource.  If it 
detects 
> that the version is out of date for the types of changes you are making, 
it 
> should bounce the commit.  I mean, our whole working-copy commit system 
is 
> predicated on these types of checks existing and functioning correctly.
> 
> But perhaps I misunderstand your ideas of being "tolerant".  Is the 
existing 
> out-of-dateness checking too restrictive?

In the patch, it was just passing BASE_REV as the user specified with -r.
I was planning on fetching HEAD and passing that value in if no value
was specified.

However, if the specified BASE_REV != HEAD, I was also planning on
fetching the HEAD value and comparing to the specified version value
and passing in HEAD if the value itself hasn't changed (but
something else has.)

Is that still too much work?
(This last part is what was considered "tolerant".  I.E. you specified
10, but the value your are setting/deleting/editing hasn't changed, even
though HEAD is now at 15).

Kevin R.

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

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
kmradke@rockwellcollins.com wrote:
> Ok, I think I'm convinced to go with --base-rev instead of overloading -r.
> I'm also convinced that the rev should be "tolerant" as well.  I.E. if
> the property hasn't changed since the specified version, go ahead and
> perform the operation.

So, I haven't reviewed the previous patch, but I'm a bit intrigued by this 
talk that implies you'll be hand-coding the revision-based verification.

Our RA commit editor implementations should already have logic in place to 
bounce commits to out-of-date files and directories.  You need only to use 
the BASE_REV value (if provided; otherwise, go fetch HEAD from the 
repository before the commit and use that value) as the BASE_REVISION 
parameter to the likes of editor->open_directory() and editor->open_file(), 
right?  In doing so, you are telling the repository that the changes you are 
transmitting are made against that version of the resource.  If it detects 
that the version is out of date for the types of changes you are making, it 
should bounce the commit.  I mean, our whole working-copy commit system is 
predicated on these types of checks existing and functioning correctly.

But perhaps I misunderstand your ideas of being "tolerant".  Is the existing 
out-of-dateness checking too restrictive?

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


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

Posted by km...@rockwellcollins.com.
"C. Michael Pilato" <cm...@collab.net> wrote on 02/22/2008 07:47:39 PM:

> +1 all over that.
> 
> So --base-rev would not be required, but *would* be available for folks 
to 
> use for protection.  I mean, realistically speaking, humans would never 
> bother with such a thing.  But scripts around 'svn' would be very 
> wise to do so.

Ok, I think I'm convinced to go with --base-rev instead of overloading -r.
I'm also convinced that the rev should be "tolerant" as well.  I.E. if
the property hasn't changed since the specified version, go ahead and
perform the operation.

Since I'm human, I prefer to default to HEAD as well.  I may add that and
then let the objectors voice their opinions (again).

New patch will be on it's way when done.

Kevin R.

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

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
+1 all over that.

So --base-rev would not be required, but *would* be available for folks to 
use for protection.  I mean, realistically speaking, humans would never 
bother with such a thing.  But scripts around 'svn' would be very wise to do so.

David James wrote:
> On Fri, Feb 22, 2008 at 11:44 AM,  <km...@rockwellcollins.com> wrote:
>> "Mark Phippard" <ma...@gmail.com> wrote on 02/22/2008 01:34:23 PM:
>>
>>> 2008/2/22 Kevin Radke <km...@gmail.com>:
>>  > >  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.
>>  >
>>  > What is the stuff about the -r parameter for?  We would never allow
>>  > you to go back in time and delete or edit a property, only HEAD.  Is
>>  > it being used for some other purpose?
>>  >
>>  > I am just going by the email, have not looked at the patch.
>>
>>  Needed a way to specify a "base revision", because of the possible
>>  race condition between looking at the properties and then
>>  performing a command directly on the repository.
>>
>>  We kicked around a --base-rev parameter in another thread, but
>>  it was easier for me to "overload" the meaning of -r here.
>>
>>  Not using -r and using some other parameter is definitely a
>>  (probably less confusing) option.
>>
>>  We could also assume "HEAD" (others didn't like this)
>>
>> Is peg revision syntax appropriate?  (no idea on this)
> 
> I think that 'svn propdel' and 'svn propset' should assume the
> "base-rev" is HEAD. Here's why:
>   - If the file currently exists, svn rm already assumes that the
> base-rev is HEAD. So svn propdel should do the same when the property
> exists.
>   - If the file does not exist, svn import already assumes that the
> base-rev is HEAD. So svn propset should do the same when the property
> does not exist.
> 
> Based on the above, there is only one situation where you need to
> specify a base revision -- if you are trying to modify (but not
> delete) a property which is already present in the repository. In
> other cases, you can specify a base revision if you want to have
> additional safety constraints, but there is no need to do so.
> 
> Some more comments:
>   - If a pegrev is explicitly specified, the base rev should default
> to the pegrev.
>   - If you leave out the revision, or explicitly specify "-r HEAD" or
> file@HEAD for 'svn propset', svn propset should check to see if the
> property already exists in the repository. If the property already
> exists, an error message should be printed which explains that a
> base-rev is required.
> 
> I can also think of a few places outside of the 'svn prop*" commands
> where base revs might be useful:
>   - In future, I think we should extend the 'svn rm', and 'svn import'
> commands to also support base revisions. In both cases, this would
> allow for additional safety when you want to be sure you aren't
> overwriting someone else's changes. In the case of 'svn import' if you
> specify a base-rev, you can actually overwrite an existing file in the
> repository with a new version.
>   - In future, we might also want to extend 'svn cp' and 'svn mv' to
> support base revs and a --replace option. This would allow, in theory,
> for users to overwrite a file or directory which is already present in
> the repository with a new version in a single commit.
> 
> Based on the fact that base revs might be useful in future in commands
> which already accept the '-r' option, I think that we should use a
> different option for 'base-rev', such as --base-rev.
> 
> Cheers,
> 
> David
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


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

Posted by David James <ja...@cs.toronto.edu>.
On Tue, Feb 26, 2008 at 10:16 AM, C. Michael Pilato <cm...@collab.net> wrote:
>  Also, if you go this route, then you absolutely should allow --revision to
>  override the default operative revision (the peg revision) for parity with
>  all the other subcommands that implement the peg-revision algorithm.  In
>  other words, we're back to --revision being the primary way to specify the
>  based-on-revision for this propchange, with the typical chain of default
>  values for that revision:  it defaults to the peg revision's value, which
>  defaults to HEAD for URLs and BASE for working copy paths.

Hmm. This doesn't work for me.

The base revision needs to be specified separately from the operative
revision, because the two things might be different. Consider, for
example, if I want to replace the file 'dest' with 'src@500'.
   svn cp ---replace src@500 dest@1000

The 'base revision' refers to the target whereas the 'operative
revision' refers to the source. Perhaps we should use the term 'target
revision' to be clear about this difference.

Should the 'target revision' always be the same as the 'target peg
revision'? I think so. I can't think of any useful use case where I
would want to specify a target revision which is different from the
target peg revision. So that's why I agree with Julian.

Cheers,

David

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

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

Posted by Julian Foad <ju...@btopenworld.com>.
David Glasser wrote:
> On Thu, Feb 28, 2008 at 12:40 PM, Julian Foad wrote:
>> It's not that some of these commands are susceptible to race conditions and
>> others are not: they all are. It's just a question of degree and likelihood.
>>
>> Example:
>> [[[
>> INITIALLY
>> svn:ignore = *.tmp
>>
>> USER1
>> # Temporary files don't need to be ignored any more:
>> svn propdel svn:ignore
>>
>> USER2
>> # Adds "*.bak":
>> svn propset svn:ignore "*.tmp
>>                         *.bak"
>>
>> RESULT
>> Same race condition as if USER1 had been using "propset".
>> ]]]
> 
> Well, actually, yeah: it's the same race condition, and thus would be
> prevented by the same requirement to use baserev for propset :-)

No, I meant USER1 and USER2 are acting asynchronously. If USER1 gets there 
first, then USER2's enforced use of a base revision makes him stop and 
re-think. If USER2 gets there first, USER1 silently overwrites USER2's change 
if he doesn't specify a base revision. They're symmetrical.

- Julian

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

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

Posted by David Glasser <gl...@davidglasser.net>.
On Thu, Feb 28, 2008 at 12:40 PM, Julian Foad
<ju...@btopenworld.com> wrote:
>
> David Glasser wrote:
>  > On Thu, Feb 28, 2008 at 10:40 AM, Julian Foad
>  > <ju...@btopenworld.com> wrote:
>  >
>  >>David Glasser wrote:
>  >> > On Thu, Feb 28, 2008 at 9:17 AM, Julian Foad <ju...@btopenworld.com> wrote:
>  >> >
>  >> >>David Glasser wrote:
>  >> >>
>  >> >>
>  >> >>>Julian Foad wrote:
>  >> >>
>  >> >> >> Therefore I'd propose just adding [@PEGREV] support to the target URL in all
>  >> >> >> commands that are to support this feature:
>  >> >> >>
>  >> >> >>   svn pdel URL[@PEGREV]
>  >> >> >>   svn pset URL[@PEGREV]
>  >> >> >>   svn pedit URL[@PEGREV]
>  >> >> >>   svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
>  >> >> >>   ...
>  >> >> >>
>  >> >> >> Notice that "pedit" reads and writes a single object, and the notion of both
>  >> >> >> reading from "URL@PEG" and writing a new revision based on the same "URL@PEG"
>  >> >> >> makes total sense.
>  >> >> >>
>  >> >> >> I'm still willing to hear any counter-proposals. The main ones I can think of are:
>  >> >> >>
>  >> >> >>   [--base-rev=BASEREV] URL[@PEGREV]
>  >> >> >>     (as I sketched above, where BASEREV and PEGREV are usually the same, and
>  >> >> >> BASEREV should not be specified without PEGREV because it would be ambiguous)
>  >> >> >>
>  >> >> >>   [--base-rev=BASEREV] URL
>  >> >> >>     (where BASEREV defaults to HEAD and is used both as the Base Revision and
>  >> >> >> as the Peg Revision for URL, instead of "@" syntax)
>  >> >> >>
>  >> >> >>   (And "--base-rev" would probably need a better name.)
>  >> >> >>
>  >> >> >> Can anyone see a strong reason for or against any of these?
>  >> >> >
>  >> >> > I think your proposal is good, but for the specific case of "propset"
>  >> >> > I think the pegrev should be *required*.
>  >> >>
>  >> >> Why, specifically?
>  >> >
>  >> > Um, for the same reason that we historically haven't supported propset
>  >> > on URLs --- so you don't clobber somebody else's changes in the
>  >> > meantime?  (Would you support letting "svn import" (with no special
>  >> > "--replace"/"--force"/etc flags or baserev-type argument) overwriting
>  >> > file contents by default?
>  >>
>  >> It's not the case that only "propset" could clobber other people's changes. So
>  >> can "svn rm URL" and "svn mv URL URL" already, and propdel, import, merge, etc.
>  >> also could if we were to allow them to. So that's not the sole reason we
>  >> haven't supported propset on URLs.
>  >>
>  >> I don't see anything special about "propset" compared to the other commands.
>  >>
>  >> - Julian
>  >
>  >
>  > I do think there's a difference between "erase this" and "change this
>  > to that".  Consider something like svn:ignore or svn:externals, for
>  > example.  One could assume for "erase svn:ignore", the user wouldn't
>  > care what the previous value is; but for "add a line" or "change this
>  > particular line" or "delete a line", the race condition is nastier.
>  >
>  > That is, anywhere where a "merge" (not in the 'svn merge' sense, but
>  > in the textual sense) is necessary shouldn't allow the race condition.
>  >  "rm" and "mv" are different here.  And you say "import" and "merge"
>  > could, but I would be opposed to that as well!
>  >
>  > If people really want to make themselves suspectable to race
>  > conditions, our API allows it, and they can use svnput or the like.
>  > But let's not put it in the default client.
>
>  It's not that some of these commands are susceptible to race conditions and
>  others are not: they all are. It's just a question of degree and likelihood.
>
>  Example:
>  [[[
>  INITIALLY
>  svn:ignore = *.tmp
>
>  USER1
>  # Temporary files don't need to be ignored any more:
>  svn propdel svn:ignore
>
>  USER2
>  # Adds "*.bak":
>  svn propset svn:ignore "*.tmp
>                          *.bak"
>
>  RESULT
>  Same race condition as if USER1 had been using "propset".
>  ]]]

Well, actually, yeah: it's the same race condition, and thus would be
prevented by the same requirement to use baserev for propset :-)

--dave

>  This not-unlikely scenario shows that "propdel" is not unlike "propset" in its
>  ability to participate in race conditions, only more limited in the variety of
>  changes it can make.
>
>  Also consider that often the user will be pretty certain that the path
>  specified is not being changed by other people in any way that matters. E.g.
>  "svn propset p v /branches/julian1": it's my branch so I'm pretty sure no-one
>  else is touching it. I don't want to be forced to specify the revision number
>  when I don't have any practical need to do so.
>
>  Anyway, forcing the user to specify a peg revision doesn't force the user to
>  note and specify the correct revision. He can just specify "HEAD", or, if we
>  disallow that, any recent revision number.
>
>  So please let's keep the syntax consistent across all commands.
>
>  - Julian
>



-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

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

Posted by Julian Foad <ju...@btopenworld.com>.
David Glasser wrote:
> On Thu, Feb 28, 2008 at 10:40 AM, Julian Foad
> <ju...@btopenworld.com> wrote:
> 
>>David Glasser wrote:
>> > On Thu, Feb 28, 2008 at 9:17 AM, Julian Foad <ju...@btopenworld.com> wrote:
>> >
>> >>David Glasser wrote:
>> >>
>> >>
>> >>>Julian Foad wrote:
>> >>
>> >> >> Therefore I'd propose just adding [@PEGREV] support to the target URL in all
>> >> >> commands that are to support this feature:
>> >> >>
>> >> >>   svn pdel URL[@PEGREV]
>> >> >>   svn pset URL[@PEGREV]
>> >> >>   svn pedit URL[@PEGREV]
>> >> >>   svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
>> >> >>   ...
>> >> >>
>> >> >> Notice that "pedit" reads and writes a single object, and the notion of both
>> >> >> reading from "URL@PEG" and writing a new revision based on the same "URL@PEG"
>> >> >> makes total sense.
>> >> >>
>> >> >> I'm still willing to hear any counter-proposals. The main ones I can think of are:
>> >> >>
>> >> >>   [--base-rev=BASEREV] URL[@PEGREV]
>> >> >>     (as I sketched above, where BASEREV and PEGREV are usually the same, and
>> >> >> BASEREV should not be specified without PEGREV because it would be ambiguous)
>> >> >>
>> >> >>   [--base-rev=BASEREV] URL
>> >> >>     (where BASEREV defaults to HEAD and is used both as the Base Revision and
>> >> >> as the Peg Revision for URL, instead of "@" syntax)
>> >> >>
>> >> >>   (And "--base-rev" would probably need a better name.)
>> >> >>
>> >> >> Can anyone see a strong reason for or against any of these?
>> >> >
>> >> > I think your proposal is good, but for the specific case of "propset"
>> >> > I think the pegrev should be *required*.
>> >>
>> >> Why, specifically?
>> >
>> > Um, for the same reason that we historically haven't supported propset
>> > on URLs --- so you don't clobber somebody else's changes in the
>> > meantime?  (Would you support letting "svn import" (with no special
>> > "--replace"/"--force"/etc flags or baserev-type argument) overwriting
>> > file contents by default?
>>
>> It's not the case that only "propset" could clobber other people's changes. So
>> can "svn rm URL" and "svn mv URL URL" already, and propdel, import, merge, etc.
>> also could if we were to allow them to. So that's not the sole reason we
>> haven't supported propset on URLs.
>>
>> I don't see anything special about "propset" compared to the other commands.
>>
>> - Julian
> 
> 
> I do think there's a difference between "erase this" and "change this
> to that".  Consider something like svn:ignore or svn:externals, for
> example.  One could assume for "erase svn:ignore", the user wouldn't
> care what the previous value is; but for "add a line" or "change this
> particular line" or "delete a line", the race condition is nastier.
> 
> That is, anywhere where a "merge" (not in the 'svn merge' sense, but
> in the textual sense) is necessary shouldn't allow the race condition.
>  "rm" and "mv" are different here.  And you say "import" and "merge"
> could, but I would be opposed to that as well!
> 
> If people really want to make themselves suspectable to race
> conditions, our API allows it, and they can use svnput or the like.
> But let's not put it in the default client.

It's not that some of these commands are susceptible to race conditions and 
others are not: they all are. It's just a question of degree and likelihood.

Example:
[[[
INITIALLY
svn:ignore = *.tmp

USER1
# Temporary files don't need to be ignored any more:
svn propdel svn:ignore

USER2
# Adds "*.bak":
svn propset svn:ignore "*.tmp
                         *.bak"

RESULT
Same race condition as if USER1 had been using "propset".
]]]

This not-unlikely scenario shows that "propdel" is not unlike "propset" in its 
ability to participate in race conditions, only more limited in the variety of
changes it can make.

Also consider that often the user will be pretty certain that the path 
specified is not being changed by other people in any way that matters. E.g. 
"svn propset p v /branches/julian1": it's my branch so I'm pretty sure no-one 
else is touching it. I don't want to be forced to specify the revision number 
when I don't have any practical need to do so.

Anyway, forcing the user to specify a peg revision doesn't force the user to 
note and specify the correct revision. He can just specify "HEAD", or, if we 
disallow that, any recent revision number.

So please let's keep the syntax consistent across all commands.

- Julian

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

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

Posted by David Glasser <gl...@davidglasser.net>.
On Thu, Feb 28, 2008 at 10:40 AM, Julian Foad
<ju...@btopenworld.com> wrote:
>
> David Glasser wrote:
>  > On Thu, Feb 28, 2008 at 9:17 AM, Julian Foad <ju...@btopenworld.com> wrote:
>  >
>  >>David Glasser wrote:
>  >>
>  >>
>  >>>Julian Foad wrote:
>  >>
>  >> >> Therefore I'd propose just adding [@PEGREV] support to the target URL in all
>  >> >> commands that are to support this feature:
>  >> >>
>  >> >>   svn pdel URL[@PEGREV]
>  >> >>   svn pset URL[@PEGREV]
>  >> >>   svn pedit URL[@PEGREV]
>  >> >>   svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
>  >> >>   ...
>  >> >>
>  >> >> Notice that "pedit" reads and writes a single object, and the notion of both
>  >> >> reading from "URL@PEG" and writing a new revision based on the same "URL@PEG"
>  >> >> makes total sense.
>  >> >>
>  >> >> I'm still willing to hear any counter-proposals. The main ones I can think of are:
>  >> >>
>  >> >>   [--base-rev=BASEREV] URL[@PEGREV]
>  >> >>     (as I sketched above, where BASEREV and PEGREV are usually the same, and
>  >> >> BASEREV should not be specified without PEGREV because it would be ambiguous)
>  >> >>
>  >> >>   [--base-rev=BASEREV] URL
>  >> >>     (where BASEREV defaults to HEAD and is used both as the Base Revision and
>  >> >> as the Peg Revision for URL, instead of "@" syntax)
>  >> >>
>  >> >>   (And "--base-rev" would probably need a better name.)
>  >> >>
>  >> >> Can anyone see a strong reason for or against any of these?
>  >> >
>  >> > I think your proposal is good, but for the specific case of "propset"
>  >> > I think the pegrev should be *required*.
>  >>
>  >> Why, specifically?
>  >
>  > Um, for the same reason that we historically haven't supported propset
>  > on URLs --- so you don't clobber somebody else's changes in the
>  > meantime?  (Would you support letting "svn import" (with no special
>  > "--replace"/"--force"/etc flags or baserev-type argument) overwriting
>  > file contents by default?
>
>  It's not the case that only "propset" could clobber other people's changes. So
>  can "svn rm URL" and "svn mv URL URL" already, and propdel, import, merge, etc.
>  also could if we were to allow them to. So that's not the sole reason we
>  haven't supported propset on URLs.
>
>  I don't see anything special about "propset" compared to the other commands.
>
>  - Julian

I do think there's a difference between "erase this" and "change this
to that".  Consider something like svn:ignore or svn:externals, for
example.  One could assume for "erase svn:ignore", the user wouldn't
care what the previous value is; but for "add a line" or "change this
particular line" or "delete a line", the race condition is nastier.

That is, anywhere where a "merge" (not in the 'svn merge' sense, but
in the textual sense) is necessary shouldn't allow the race condition.
 "rm" and "mv" are different here.  And you say "import" and "merge"
could, but I would be opposed to that as well!

If people really want to make themselves suspectable to race
conditions, our API allows it, and they can use svnput or the like.
But let's not put it in the default client.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

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

Posted by Julian Foad <ju...@btopenworld.com>.
David Glasser wrote:
> On Thu, Feb 28, 2008 at 9:17 AM, Julian Foad <ju...@btopenworld.com> wrote:
> 
>>David Glasser wrote:
>>
>>
>>>Julian Foad wrote:
>>
>> >> Therefore I'd propose just adding [@PEGREV] support to the target URL in all
>> >> commands that are to support this feature:
>> >>
>> >>   svn pdel URL[@PEGREV]
>> >>   svn pset URL[@PEGREV]
>> >>   svn pedit URL[@PEGREV]
>> >>   svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
>> >>   ...
>> >>
>> >> Notice that "pedit" reads and writes a single object, and the notion of both
>> >> reading from "URL@PEG" and writing a new revision based on the same "URL@PEG"
>> >> makes total sense.
>> >>
>> >> I'm still willing to hear any counter-proposals. The main ones I can think of are:
>> >>
>> >>   [--base-rev=BASEREV] URL[@PEGREV]
>> >>     (as I sketched above, where BASEREV and PEGREV are usually the same, and
>> >> BASEREV should not be specified without PEGREV because it would be ambiguous)
>> >>
>> >>   [--base-rev=BASEREV] URL
>> >>     (where BASEREV defaults to HEAD and is used both as the Base Revision and
>> >> as the Peg Revision for URL, instead of "@" syntax)
>> >>
>> >>   (And "--base-rev" would probably need a better name.)
>> >>
>> >> Can anyone see a strong reason for or against any of these?
>> >
>> > I think your proposal is good, but for the specific case of "propset"
>> > I think the pegrev should be *required*.
>>
>> Why, specifically?
> 
> Um, for the same reason that we historically haven't supported propset
> on URLs --- so you don't clobber somebody else's changes in the
> meantime?  (Would you support letting "svn import" (with no special
> "--replace"/"--force"/etc flags or baserev-type argument) overwriting
> file contents by default?

It's not the case that only "propset" could clobber other people's changes. So 
can "svn rm URL" and "svn mv URL URL" already, and propdel, import, merge, etc. 
also could if we were to allow them to. So that's not the sole reason we 
haven't supported propset on URLs.

I don't see anything special about "propset" compared to the other commands.

- Julian

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

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

Posted by David Glasser <gl...@davidglasser.net>.
On Thu, Feb 28, 2008 at 9:17 AM, Julian Foad <ju...@btopenworld.com> wrote:
> David Glasser wrote:
>
> > Julian Foad wrote:
>  >> Therefore I'd propose just adding [@PEGREV] support to the target URL in all
>  >> commands that are to support this feature:
>  >>
>  >>   svn pdel URL[@PEGREV]
>  >>   svn pset URL[@PEGREV]
>  >>   svn pedit URL[@PEGREV]
>  >>   svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
>  >>   ...
>  >>
>  >> Notice that "pedit" reads and writes a single object, and the notion of both
>  >> reading from "URL@PEG" and writing a new revision based on the same "URL@PEG"
>  >> makes total sense.
>  >>
>  >> I'm still willing to hear any counter-proposals. The main ones I can think of are:
>  >>
>  >>   [--base-rev=BASEREV] URL[@PEGREV]
>  >>     (as I sketched above, where BASEREV and PEGREV are usually the same, and
>  >> BASEREV should not be specified without PEGREV because it would be ambiguous)
>  >>
>  >>   [--base-rev=BASEREV] URL
>  >>     (where BASEREV defaults to HEAD and is used both as the Base Revision and
>  >> as the Peg Revision for URL, instead of "@" syntax)
>  >>
>  >>   (And "--base-rev" would probably need a better name.)
>  >>
>  >> Can anyone see a strong reason for or against any of these?
>  >
>  > I think your proposal is good, but for the specific case of "propset"
>  > I think the pegrev should be *required*.
>
>  Why, specifically?

Um, for the same reason that we historically haven't supported propset
on URLs --- so you don't clobber somebody else's changes in the
meantime?  (Would you support letting "svn import" (with no special
"--replace"/"--force"/etc flags or baserev-type argument) overwriting
file contents by default?

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

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

Posted by Julian Foad <ju...@btopenworld.com>.
David Glasser wrote:
> Julian Foad wrote:
>> Therefore I'd propose just adding [@PEGREV] support to the target URL in all
>> commands that are to support this feature:
>>
>>   svn pdel URL[@PEGREV]
>>   svn pset URL[@PEGREV]
>>   svn pedit URL[@PEGREV]
>>   svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
>>   ...
>>
>> Notice that "pedit" reads and writes a single object, and the notion of both
>> reading from "URL@PEG" and writing a new revision based on the same "URL@PEG"
>> makes total sense.
>>
>> I'm still willing to hear any counter-proposals. The main ones I can think of are:
>>
>>   [--base-rev=BASEREV] URL[@PEGREV]
>>     (as I sketched above, where BASEREV and PEGREV are usually the same, and
>> BASEREV should not be specified without PEGREV because it would be ambiguous)
>>
>>   [--base-rev=BASEREV] URL
>>     (where BASEREV defaults to HEAD and is used both as the Base Revision and
>> as the Peg Revision for URL, instead of "@" syntax)
>>
>>   (And "--base-rev" would probably need a better name.)
>>
>> Can anyone see a strong reason for or against any of these?
> 
> I think your proposal is good, but for the specific case of "propset"
> I think the pegrev should be *required*.

Why, specifically?

- Julian

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

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

Posted by David Glasser <gl...@davidglasser.net>.
On Wed, Feb 27, 2008 at 5:53 AM, Julian Foad <ju...@btopenworld.com> wrote:
> C. Michael Pilato wrote:
>  > David James wrote:
>  >
>  >>>  A peg revision is THE way to specify a particular version of a
>  >>> particular
>  >>>  object. The way I'd specify it is:
>  >>>
>  >>>    svn propdel PNAME TARGET[@PEGREV]...
>  >>>
>  >>>    Delete the property PNAME from the head revision of each TARGET.
>  >>>    If PEGREV is specified, only proceed if the line of history from
>  >>>    TARGET@PEGREV to TARGET@HEAD is unbroken and the property PNAME
>  >>>    has not been modified in that interval.
>  >>>
>  >>>  Similarly for "propset".
>  >>
>  >> Great points, Julian! After reading through your argument, I
>  >> completely agree.
>  >
>  > I'm not -1 on this or anything, but the UI seems ... "off" to me.  'svn
>  > pset /path/to/foo@34 pname pvalue -m "Some log message."' reads like
>  > "Change the value of property 'pname' on revision 34 of 'foo'".  That's
>  > of course nonsensical, because you can't *change* the value of the
>  > property in that revision -- you can only make a new revision.
>
>  Hmm. There may be something in what you say. I was proposing that
>
>    svn pset url://to/foo@34 pname pvalue -m "Some log message."
>
>  means
>
>    "Set the property on a NEW revision of the object identified as
>  url://to/foo@34, and at the same time regard this revision 34 as the Base
>  Revision for the modification."
>
>  I can see that it does read a bit like it should mean
>
>    "Change the value in this old revision".
>
>  Whether that's confusing enough to warrant a different syntax, I'm not sure.
>  However, thinking more deeply on it (below), I conclude that although I was to
>  some extent conflating the concepts of Base Revision and Peg Revision, in fact
>  they fit very well together and the peg revision syntax is pretty much necessary.
>
>
>
>  > Also, if you go this route, then you absolutely should allow --revision
>  > to override the default operative revision (the peg revision) for parity
>  > with all the other subcommands that implement the peg-revision
>  > algorithm.  In other words, we're back to --revision being the primary
>  > way to specify the based-on-revision for this propchange, with the
>  > typical chain of default values for that revision:  it defaults to the
>  > peg revision's value, which defaults to HEAD for URLs and BASE for
>  > working copy paths.
>
>  So you're saying that the "base revision" should not be determined simply as
>  being equal to the "peg revision", but that instead it should be determined as
>  being equal to the "operative revision" (-r/--revision). I agree with the
>  former: "base" is not the same concept as "peg". But I don't agree that "base
>  revision" is the same concept as "operative revision" either.
>
>  I think the concept of "operative revision" presently only applies to read
>  operations. For a repository-side modification, would it mean the revision on
>  which to base the modification, or the revision in which the modification is
>  committed? Let's not go there.
>
>  Write operations are normally expected to occur in a WC. There, we have the
>  well established concept of the Base Revision upon which modifications are
>  made. The base revision is never explicitly specified in a modification
>  command, since there is never any doubt about it. (The result of the
>  modification, internally called the "working revision", is not explicitly
>  referred to either.)
>
>  Write operations directly on the repository have similar semantics: the Base
>  Revision is chosen to be the initial value of HEAD, a working revision is
>  constructed, and then it is committed as a new revision (failing if the Base
>  Revision is out of date by that time). However, in this case the problem is
>  there is some doubt about the choice of Base Revision (since HEAD may have
>  changed since we last looked), and we want to specify it explicitly.
>
>  Some write operations already perform a read ("merge", "copy", ...) and already
>  use "--revision" to specify the operative revision (or range) to read from.
>
>  A safe general solution (applicable to all commands that could modify the
>  repository) is a separate option like "--base-rev=N" or "--base-revision=N".
>
>  So, as the safe general form, let's consider:
>
>    svn pset [--base-rev=BASEREV] URL[@PEGREV] ...
>
>  The Base Revision is BASEREV which defaults to PEGREV. The Base Revision
>  determines which revision of the object this modification is to be applied to.
>  (We haven't yet specified in detail in what way the object is allowed to have
>  been modified since BASEREV. We still need to specify this behaviour,
>  carefully, taking account of directory bubble-up behaviour.)
>
>  PEGREV specifies the Peg Revision which defaults to HEAD. As with all commands,
>  the peg revision just gives an unambiguous context in which to interpret URL to
>  identify a specific object, bearing in mind that that object may have been
>  moved in the repository since the revision identified.
>
>  The optional PEGREV is essential in order for URL to identify an object
>  unambiguously. As David James said, once you've specified a Peg there is no
>  practical reason that we can imagine to specify a different Base.
>
>
>  Thinking how this scheme would apply consistently to a read-and-write operation
>  such as "copy":
>
>  Presently:
>    usage: copy SRC[@REV]... DST
>
>  New:
>    usage: copy SRC[@REV]... DST[@REV] [--base-rev=BASEREV]
>
>  Again, I don't see a need for the Base Revision to be specified separately.
>
>  It still feels to me like the "@PEGREV" syntax is just right for specifying
>  targets, and the only thing against it is the need to learn that "mofify
>  URL@REV" means create a new revision based on REV rather than modify REV in
>  place. I don't think that's too difficult or confusing a concept; novices will
>  sometimes stumble on it but not in a way that's very different from or worse
>  than all the other hurdles they have to master.
>
>  Therefore I'd propose just adding [@PEGREV] support to the target URL in all
>  commands that are to support this feature:
>
>    svn pdel URL[@PEGREV]
>    svn pset URL[@PEGREV]
>    svn pedit URL[@PEGREV]
>    svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
>    ...
>
>  Notice that "pedit" reads and writes a single object, and the notion of both
>  reading from "URL@PEG" and writing a new revision based on the same "URL@PEG"
>  makes total sense.
>
>  I'm still willing to hear any counter-proposals. The main ones I can think of are:
>
>    [--base-rev=BASEREV] URL[@PEGREV]
>      (as I sketched above, where BASEREV and PEGREV are usually the same, and
>  BASEREV should not be specified without PEGREV because it would be ambiguous)
>
>    [--base-rev=BASEREV] URL
>      (where BASEREV defaults to HEAD and is used both as the Base Revision and
>  as the Peg Revision for URL, instead of "@" syntax)
>
>    (And "--base-rev" would probably need a better name.)
>
>  Can anyone see a strong reason for or against any of these?

I think your proposal is good, but for the specific case of "propset"
I think the pegrev should be *required*.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

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

Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> David James wrote:
> 
>>>  A peg revision is THE way to specify a particular version of a 
>>> particular
>>>  object. The way I'd specify it is:
>>>
>>>    svn propdel PNAME TARGET[@PEGREV]...
>>>
>>>    Delete the property PNAME from the head revision of each TARGET.
>>>    If PEGREV is specified, only proceed if the line of history from
>>>    TARGET@PEGREV to TARGET@HEAD is unbroken and the property PNAME
>>>    has not been modified in that interval.
>>>
>>>  Similarly for "propset".
>>
>> Great points, Julian! After reading through your argument, I 
>> completely agree.
> 
> I'm not -1 on this or anything, but the UI seems ... "off" to me.  'svn 
> pset /path/to/foo@34 pname pvalue -m "Some log message."' reads like 
> "Change the value of property 'pname' on revision 34 of 'foo'".  That's 
> of course nonsensical, because you can't *change* the value of the 
> property in that revision -- you can only make a new revision.

Hmm. There may be something in what you say. I was proposing that

   svn pset url://to/foo@34 pname pvalue -m "Some log message."

means

   "Set the property on a NEW revision of the object identified as 
url://to/foo@34, and at the same time regard this revision 34 as the Base 
Revision for the modification."

I can see that it does read a bit like it should mean

   "Change the value in this old revision".

Whether that's confusing enough to warrant a different syntax, I'm not sure. 
However, thinking more deeply on it (below), I conclude that although I was to 
some extent conflating the concepts of Base Revision and Peg Revision, in fact 
they fit very well together and the peg revision syntax is pretty much necessary.


> Also, if you go this route, then you absolutely should allow --revision 
> to override the default operative revision (the peg revision) for parity 
> with all the other subcommands that implement the peg-revision 
> algorithm.  In other words, we're back to --revision being the primary 
> way to specify the based-on-revision for this propchange, with the 
> typical chain of default values for that revision:  it defaults to the 
> peg revision's value, which defaults to HEAD for URLs and BASE for 
> working copy paths.

So you're saying that the "base revision" should not be determined simply as 
being equal to the "peg revision", but that instead it should be determined as 
being equal to the "operative revision" (-r/--revision). I agree with the 
former: "base" is not the same concept as "peg". But I don't agree that "base 
revision" is the same concept as "operative revision" either.

I think the concept of "operative revision" presently only applies to read 
operations. For a repository-side modification, would it mean the revision on 
which to base the modification, or the revision in which the modification is 
committed? Let's not go there.

Write operations are normally expected to occur in a WC. There, we have the 
well established concept of the Base Revision upon which modifications are 
made. The base revision is never explicitly specified in a modification 
command, since there is never any doubt about it. (The result of the 
modification, internally called the "working revision", is not explicitly 
referred to either.)

Write operations directly on the repository have similar semantics: the Base 
Revision is chosen to be the initial value of HEAD, a working revision is 
constructed, and then it is committed as a new revision (failing if the Base 
Revision is out of date by that time). However, in this case the problem is 
there is some doubt about the choice of Base Revision (since HEAD may have 
changed since we last looked), and we want to specify it explicitly.

Some write operations already perform a read ("merge", "copy", ...) and already 
use "--revision" to specify the operative revision (or range) to read from.

A safe general solution (applicable to all commands that could modify the 
repository) is a separate option like "--base-rev=N" or "--base-revision=N".

So, as the safe general form, let's consider:

   svn pset [--base-rev=BASEREV] URL[@PEGREV] ...

The Base Revision is BASEREV which defaults to PEGREV. The Base Revision 
determines which revision of the object this modification is to be applied to. 
(We haven't yet specified in detail in what way the object is allowed to have 
been modified since BASEREV. We still need to specify this behaviour, 
carefully, taking account of directory bubble-up behaviour.)

PEGREV specifies the Peg Revision which defaults to HEAD. As with all commands, 
the peg revision just gives an unambiguous context in which to interpret URL to 
identify a specific object, bearing in mind that that object may have been 
moved in the repository since the revision identified.

The optional PEGREV is essential in order for URL to identify an object 
unambiguously. As David James said, once you've specified a Peg there is no 
practical reason that we can imagine to specify a different Base.


Thinking how this scheme would apply consistently to a read-and-write operation 
such as "copy":

Presently:
   usage: copy SRC[@REV]... DST

New:
   usage: copy SRC[@REV]... DST[@REV] [--base-rev=BASEREV]

Again, I don't see a need for the Base Revision to be specified separately.

It still feels to me like the "@PEGREV" syntax is just right for specifying 
targets, and the only thing against it is the need to learn that "mofify 
URL@REV" means create a new revision based on REV rather than modify REV in 
place. I don't think that's too difficult or confusing a concept; novices will 
sometimes stumble on it but not in a way that's very different from or worse 
than all the other hurdles they have to master.

Therefore I'd propose just adding [@PEGREV] support to the target URL in all 
commands that are to support this feature:

   svn pdel URL[@PEGREV]
   svn pset URL[@PEGREV]
   svn pedit URL[@PEGREV]
   svn copy SRC[@PEGREV]... DSTURL[@PEGREV]
   ...

Notice that "pedit" reads and writes a single object, and the notion of both 
reading from "URL@PEG" and writing a new revision based on the same "URL@PEG" 
makes total sense.

I'm still willing to hear any counter-proposals. The main ones I can think of are:

   [--base-rev=BASEREV] URL[@PEGREV]
     (as I sketched above, where BASEREV and PEGREV are usually the same, and 
BASEREV should not be specified without PEGREV because it would be ambiguous)

   [--base-rev=BASEREV] URL
     (where BASEREV defaults to HEAD and is used both as the Base Revision and 
as the Peg Revision for URL, instead of "@" syntax)

   (And "--base-rev" would probably need a better name.)

Can anyone see a strong reason for or against any of these?

- Julian


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

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
David James wrote:
>>  A peg revision is THE way to specify a particular version of a particular
>>  object. The way I'd specify it is:
>>
>>    svn propdel PNAME TARGET[@PEGREV]...
>>
>>    Delete the property PNAME from the head revision of each TARGET.
>>    If PEGREV is specified, only proceed if the line of history from
>>    TARGET@PEGREV to TARGET@HEAD is unbroken and the property PNAME
>>    has not been modified in that interval.
>>
>>  Similarly for "propset".
> 
> Great points, Julian! After reading through your argument, I completely agree.

I'm not -1 on this or anything, but the UI seems ... "off" to me.  'svn pset 
/path/to/foo@34 pname pvalue -m "Some log message."' reads like "Change the 
value of property 'pname' on revision 34 of 'foo'".  That's of course 
nonsensical, because you can't *change* the value of the property in that 
revision -- you can only make a new revision.

Also, if you go this route, then you absolutely should allow --revision to 
override the default operative revision (the peg revision) for parity with 
all the other subcommands that implement the peg-revision algorithm.  In 
other words, we're back to --revision being the primary way to specify the 
based-on-revision for this propchange, with the typical chain of default 
values for that revision:  it defaults to the peg revision's value, which 
defaults to HEAD for URLs and BASE for working copy paths.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


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

Posted by David James <ja...@cs.toronto.edu>.
On Tue, Feb 26, 2008 at 8:08 AM, Julian Foad <ju...@btopenworld.com> wrote:
> kmradke@rockwellcollins.com wrote:
>  > james82@gmail.com wrote on 02/22/2008 04:03:04 PM:
>
> >> Some more comments:
>  >>   - If a pegrev is explicitly specified, the base rev should default
>  >> to the pegrev.
>
>  Yes. But take this further: If a pegrev is specified, the base rev should BE
>  the peg rev. I can't see any reason to specify the base revision separately.
>
>  (Specifying a base rev older than the peg wouldn't achieve anything. Specifying
>  a base rev newer than the peg would, theoretically, be useful if you knew the
>  object had been moved/renamed since the peg but you didn't know the new name.
>  But until Subversion is able to track forward across renames, it can't achieve
>  anything useful in this case either.)
>
>
>  >>   - If you leave out the revision, or explicitly specify "-r HEAD" or
>  >> file@HEAD for 'svn propset', svn propset should check to see if the
>  >> property already exists in the repository. If the property already
>  >> exists, an error message should be printed which explains that a
>  >> base-rev is required.
>  >
>  > Since you can't set a property on an old revision, I'm not convinced
>  > a peg revision specification should even be possible...
>
>  A peg revision is THE way to specify a particular version of a particular
>  object. The way I'd specify it is:
>
>    svn propdel PNAME TARGET[@PEGREV]...
>
>    Delete the property PNAME from the head revision of each TARGET.
>    If PEGREV is specified, only proceed if the line of history from
>    TARGET@PEGREV to TARGET@HEAD is unbroken and the property PNAME
>    has not been modified in that interval.
>
>  Similarly for "propset".

Great points, Julian! After reading through your argument, I completely agree.

In my earlier email, I also discussed extending the 'base revision'
support in future to work with other commands that delete or overwrite
files, such as 'svn rm', 'svn import --replace', 'svn cp --replace',
and 'svn mv --replace'. Fortunately, in all of these cases, pegrevs
are not yet supported for the target, so if we do want to add base rev
support to these commands, we would not have any backwards
compatibility issues.  (Note that the --replace options for 'import',
'cp' and 'mv' are theoretical future features.)

Here are some examples:
   svn rm $REPO/trunk/somefile@1000
   svn import --replace somefile $REPO/trunk/somefile@1000
   svn cp --replace $REPO/trunk $REPO/branches/dj-experiment@1000
   svn mv --replace $REPO/branches/dj-experiment $REPO/trunk@1000

All of the above examples use pegrevs to explicitly specify that you
only want to replace or delete the target if it has not been changed
since rev 1000. This seems pretty reasonable to me. I actually like
the peg rev syntax better than the base-rev syntax now that Julian has
explained it to me.

Cheers,

David

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

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

Posted by km...@rockwellcollins.com.
Julian Foad <ju...@btopenworld.com> wrote on 02/26/2008 10:08:02 AM:
> kmradke@rockwellcollins.com wrote:
> > james82@gmail.com wrote on 02/22/2008 04:03:04 PM:
> >> Some more comments:
> >>   - If a pegrev is explicitly specified, the base rev should default
> >> to the pegrev.
> 
> Yes. But take this further: If a pegrev is specified, the base rev 
should BE 
> the peg rev. I can't see any reason to specify the base revision 
separately.
> 
> (Specifying a base rev older than the peg wouldn't achieve anything.
> Specifying 
> a base rev newer than the peg would, theoretically, be useful if youknew 
the 
> object had been moved/renamed since the peg but you didn't know the new 
name. 
> But until Subversion is able to track forward across renames, it 
> can't achieve 
> anything useful in this case either.)
> 
> >>   - If you leave out the revision, or explicitly specify "-r HEAD" or
> >> file@HEAD for 'svn propset', svn propset should check to see if the
> >> property already exists in the repository. If the property already
> >> exists, an error message should be printed which explains that a
> >> base-rev is required.
> > 
> > Since you can't set a property on an old revision, I'm not convinced
> > a peg revision specification should even be possible...
> 
> A peg revision is THE way to specify a particular version of a 
particular 
> object. The way I'd specify it is:
> 
>    svn propdel PNAME TARGET[@PEGREV]...
> 
>    Delete the property PNAME from the head revision of each TARGET.
>    If PEGREV is specified, only proceed if the line of history from
>    TARGET@PEGREV to TARGET@HEAD is unbroken and the property PNAME
>    has not been modified in that interval.
> 
> Similarly for "propset".

I had originally liked using @PEGREV instead of --base-revision.  This
would definitely make the patch smaller, since a new option is not 
required.

I'd like to create a patch that is liked by the majority, but I'm not
convinced we have a consensus yet.

Ugh.

Kevin R.

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

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

Posted by Julian Foad <ju...@btopenworld.com>.
kmradke@rockwellcollins.com wrote:
> james82@gmail.com wrote on 02/22/2008 04:03:04 PM:
>> Some more comments:
>>   - If a pegrev is explicitly specified, the base rev should default
>> to the pegrev.

Yes. But take this further: If a pegrev is specified, the base rev should BE 
the peg rev. I can't see any reason to specify the base revision separately.

(Specifying a base rev older than the peg wouldn't achieve anything. Specifying 
a base rev newer than the peg would, theoretically, be useful if you knew the 
object had been moved/renamed since the peg but you didn't know the new name. 
But until Subversion is able to track forward across renames, it can't achieve 
anything useful in this case either.)

>>   - If you leave out the revision, or explicitly specify "-r HEAD" or
>> file@HEAD for 'svn propset', svn propset should check to see if the
>> property already exists in the repository. If the property already
>> exists, an error message should be printed which explains that a
>> base-rev is required.
> 
> Since you can't set a property on an old revision, I'm not convinced
> a peg revision specification should even be possible...

A peg revision is THE way to specify a particular version of a particular 
object. The way I'd specify it is:

   svn propdel PNAME TARGET[@PEGREV]...

   Delete the property PNAME from the head revision of each TARGET.
   If PEGREV is specified, only proceed if the line of history from
   TARGET@PEGREV to TARGET@HEAD is unbroken and the property PNAME
   has not been modified in that interval.

Similarly for "propset".

- Julian

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

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

Posted by km...@rockwellcollins.com.
james82@gmail.com wrote on 02/22/2008 04:03:04 PM:
> On Fri, Feb 22, 2008 at 11:44 AM,  <km...@rockwellcollins.com> wrote:
> > "Mark Phippard" <ma...@gmail.com> wrote on 02/22/2008 01:34:23 PM:
> >
> > > 2008/2/22 Kevin Radke <km...@gmail.com>:
> >  > >  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.
> >  >
> >  > What is the stuff about the -r parameter for?  We would never allow
> >  > you to go back in time and delete or edit a property, only HEAD. Is
> >  > it being used for some other purpose?
> >  >
> >  > I am just going by the email, have not looked at the patch.
> >
> >  Needed a way to specify a "base revision", because of the possible
> >  race condition between looking at the properties and then
> >  performing a command directly on the repository.
> >
> >  We kicked around a --base-rev parameter in another thread, but
> >  it was easier for me to "overload" the meaning of -r here.
> >
> >  Not using -r and using some other parameter is definitely a
> >  (probably less confusing) option.
> >
> >  We could also assume "HEAD" (others didn't like this)
> >
> > Is peg revision syntax appropriate?  (no idea on this)
> 
> I think that 'svn propdel' and 'svn propset' should assume the
> "base-rev" is HEAD. Here's why:
>   - If the file currently exists, svn rm already assumes that the
> base-rev is HEAD. So svn propdel should do the same when the property
> exists.
>   - If the file does not exist, svn import already assumes that the
> base-rev is HEAD. So svn propset should do the same when the property
> does not exist.
> 
> Based on the above, there is only one situation where you need to
> specify a base revision -- if you are trying to modify (but not
> delete) a property which is already present in the repository. In
> other cases, you can specify a base revision if you want to have
> additional safety constraints, but there is no need to do so.

The argument against defaulting to HEAD was this use case:

1) User A looks for all files with a property x with a value of y.
2) User B then modifies a property x to a value of z on a file.
3) User A then deletes all properties found in #1.
4) User B wonders why User A deleted the property on his file because
   it didn't have a value of y.

This is hopefully a very rare case, but it could happen.

> Some more comments:
>   - If a pegrev is explicitly specified, the base rev should default
> to the pegrev.
>   - If you leave out the revision, or explicitly specify "-r HEAD" or
> file@HEAD for 'svn propset', svn propset should check to see if the
> property already exists in the repository. If the property already
> exists, an error message should be printed which explains that a
> base-rev is required.

Since you can't set a property on an old revision, I'm not convinced
a peg revision specification should even be possible...

> I can also think of a few places outside of the 'svn prop*" commands
> where base revs might be useful:
>   - In future, I think we should extend the 'svn rm', and 'svn import'
> commands to also support base revisions. In both cases, this would
> allow for additional safety when you want to be sure you aren't
> overwriting someone else's changes. In the case of 'svn import' if you
> specify a base-rev, you can actually overwrite an existing file in the
> repository with a new version.
>   - In future, we might also want to extend 'svn cp' and 'svn mv' to
> support base revs and a --replace option. This would allow, in theory,
> for users to overwrite a file or directory which is already present in
> the repository with a new version in a single commit.
> 
> Based on the fact that base revs might be useful in future in commands
> which already accept the '-r' option, I think that we should use a
> different option for 'base-rev', such as --base-rev.

If there is a true need for a --base-rev parameter for other
commands, it probably would be best to use it now instead of
overloading the meaning of -r.

Kevin R.


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

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

Posted by David James <ja...@cs.toronto.edu>.
On Fri, Feb 22, 2008 at 11:44 AM,  <km...@rockwellcollins.com> wrote:
> "Mark Phippard" <ma...@gmail.com> wrote on 02/22/2008 01:34:23 PM:
>
> > 2008/2/22 Kevin Radke <km...@gmail.com>:
>  > >  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.
>  >
>  > What is the stuff about the -r parameter for?  We would never allow
>  > you to go back in time and delete or edit a property, only HEAD.  Is
>  > it being used for some other purpose?
>  >
>  > I am just going by the email, have not looked at the patch.
>
>  Needed a way to specify a "base revision", because of the possible
>  race condition between looking at the properties and then
>  performing a command directly on the repository.
>
>  We kicked around a --base-rev parameter in another thread, but
>  it was easier for me to "overload" the meaning of -r here.
>
>  Not using -r and using some other parameter is definitely a
>  (probably less confusing) option.
>
>  We could also assume "HEAD" (others didn't like this)
>
> Is peg revision syntax appropriate?  (no idea on this)

I think that 'svn propdel' and 'svn propset' should assume the
"base-rev" is HEAD. Here's why:
  - If the file currently exists, svn rm already assumes that the
base-rev is HEAD. So svn propdel should do the same when the property
exists.
  - If the file does not exist, svn import already assumes that the
base-rev is HEAD. So svn propset should do the same when the property
does not exist.

Based on the above, there is only one situation where you need to
specify a base revision -- if you are trying to modify (but not
delete) a property which is already present in the repository. In
other cases, you can specify a base revision if you want to have
additional safety constraints, but there is no need to do so.

Some more comments:
  - If a pegrev is explicitly specified, the base rev should default
to the pegrev.
  - If you leave out the revision, or explicitly specify "-r HEAD" or
file@HEAD for 'svn propset', svn propset should check to see if the
property already exists in the repository. If the property already
exists, an error message should be printed which explains that a
base-rev is required.

I can also think of a few places outside of the 'svn prop*" commands
where base revs might be useful:
  - In future, I think we should extend the 'svn rm', and 'svn import'
commands to also support base revisions. In both cases, this would
allow for additional safety when you want to be sure you aren't
overwriting someone else's changes. In the case of 'svn import' if you
specify a base-rev, you can actually overwrite an existing file in the
repository with a new version.
  - In future, we might also want to extend 'svn cp' and 'svn mv' to
support base revs and a --replace option. This would allow, in theory,
for users to overwrite a file or directory which is already present in
the repository with a new version in a single commit.

Based on the fact that base revs might be useful in future in commands
which already accept the '-r' option, I think that we should use a
different option for 'base-rev', such as --base-rev.

Cheers,

David

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

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

Posted by Mark Phippard <ma...@gmail.com>.
On Fri, Feb 22, 2008 at 3:04 PM, Karl Fogel <kf...@red-bean.com> wrote:
> kmradke@rockwellcollins.com writes:
>  > Needed a way to specify a "base revision", because of the possible
>  > race condition between looking at the properties and then
>  > performing a command directly on the repository.
>  >
>  > We kicked around a --base-rev parameter in another thread, but
>  > it was easier for me to "overload" the meaning of -r here.
>  >
>  > Not using -r and using some other parameter is definitely a
>  > (probably less confusing) option.
>  >
>  > We could also assume "HEAD" (others didn't like this)
>  >
>  > Is peg revision syntax appropriate?  (no idea on this)
>
>  FWIW, I like the "-rACTUAL_NUMBER" solution a lot.  It protects
>  against any possibility of race condition.
>
>  It's okay if HEAD is different from ACTUAL_NUMBER, as long as the
>  property still has the value in HEAD that it did in ACTUAL_NUMBER,
>  of course.

Yeah, I just did not grok that in the original message.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

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

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

Posted by Karl Fogel <kf...@red-bean.com>.
kmradke@rockwellcollins.com writes:
> That is an interesting improvement if we stay with using -r.
>
> Personally, I'm ok with assuming HEAD and putting an appropriate
> warning in the help, but I'll try and make the patch do
> whatever the majority prefers.

I don't have a clear sense of what the majority supports; if you do,
do that, if not, I guess try the "tolerant -r" behavior... because *I*
like it :-).

-K

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

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

Posted by km...@rockwellcollins.com.
Karl Fogel <kf...@red-bean.com> wrote on 02/22/2008 02:04:59 PM:
> kmradke@rockwellcollins.com writes:
> > Needed a way to specify a "base revision", because of the possible
> > race condition between looking at the properties and then
> > performing a command directly on the repository.
> >
> > We kicked around a --base-rev parameter in another thread, but
> > it was easier for me to "overload" the meaning of -r here.
> >
> > Not using -r and using some other parameter is definitely a
> > (probably less confusing) option.
> >
> > We could also assume "HEAD" (others didn't like this)
> >
> > Is peg revision syntax appropriate?  (no idea on this)
> 
> FWIW, I like the "-rACTUAL_NUMBER" solution a lot.  It protects
> against any possibility of race condition.
> 
> It's okay if HEAD is different from ACTUAL_NUMBER, as long as the
> property still has the value in HEAD that it did in ACTUAL_NUMBER,
> of course.

That is an interesting improvement if we stay with using -r.

Personally, I'm ok with assuming HEAD and putting an appropriate
warning in the help, but I'll try and make the patch do
whatever the majority prefers.

Kevin R.

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

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

Posted by Karl Fogel <kf...@red-bean.com>.
kmradke@rockwellcollins.com writes:
> Needed a way to specify a "base revision", because of the possible
> race condition between looking at the properties and then
> performing a command directly on the repository.
>
> We kicked around a --base-rev parameter in another thread, but
> it was easier for me to "overload" the meaning of -r here.
>
> Not using -r and using some other parameter is definitely a
> (probably less confusing) option.
>
> We could also assume "HEAD" (others didn't like this)
>
> Is peg revision syntax appropriate?  (no idea on this)

FWIW, I like the "-rACTUAL_NUMBER" solution a lot.  It protects
against any possibility of race condition.

It's okay if HEAD is different from ACTUAL_NUMBER, as long as the
property still has the value in HEAD that it did in ACTUAL_NUMBER,
of course.

-Karl

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

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

Posted by km...@rockwellcollins.com.
"Mark Phippard" <ma...@gmail.com> wrote on 02/22/2008 01:34:23 PM:
> 2008/2/22 Kevin Radke <km...@gmail.com>:
> >  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.
> 
> What is the stuff about the -r parameter for?  We would never allow
> you to go back in time and delete or edit a property, only HEAD.  Is
> it being used for some other purpose?
> 
> I am just going by the email, have not looked at the patch.

Needed a way to specify a "base revision", because of the possible
race condition between looking at the properties and then
performing a command directly on the repository.

We kicked around a --base-rev parameter in another thread, but
it was easier for me to "overload" the meaning of -r here.

Not using -r and using some other parameter is definitely a
(probably less confusing) option.

We could also assume "HEAD" (others didn't like this)

Is peg revision syntax appropriate?  (no idea on this)


Kevin R.


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

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

Posted by Mark Phippard <ma...@gmail.com>.
2008/2/22 Kevin Radke <km...@gmail.com>:
>  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.

What is the stuff about the -r parameter for?  We would never allow
you to go back in time and delete or edit a property, only HEAD.  Is
it being used for some other purpose?

I am just going by the email, have not looked at the patch.

Mark

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