You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <ch...@gmail.com> on 2005/08/18 14:35:18 UTC

svn cp option to force replace files

Hi,
Is there are any objections against add option to svn cp command for
forcing replace files?
If there isn't, I have some time to work on patch to add this option.

-- 
Ivan Zhakov

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


Re: svn cp option to force replace files

Posted by Erik Huelsmann <eh...@gmail.com>.
> > > > Is that going to break what I believe to be a very strong point in svn
> > > > that anything "modified" or non versioned in my WC wont be overwritten?
> > >
> > > I think this points to the need for a complete specification of the
> > > feature before we implement it.  Ivan, would you like to provide this?
> >
> > The fact that it's currently not supported is because the WC can't
> > represent it. There's a branch to implement it (on which I'm working -
> > all be it at a snails' pace).
> Do you mean wc-replacements branch?

Yes.
 
> > Initial work has been done and the branch-code is working, except for
> > files with properties...
> > BTW, if you have time to work on it, I'll commit my latest changes
> > tonight. We can work on it together.
> Yes, I think this will good. And may be also you merge changes from trunk?
> I'll try test the branch andimplement some TODO items.

Sure. No problem. I'll do that (but not before tonight).

bye,

Erik.

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


Re: svn cp option to force replace files

Posted by Ivan Zhakov <ch...@gmail.com>.
On 8/19/05, Erik Huelsmann <eh...@gmail.com> wrote:
> On 18 Aug 2005 22:08:07 -0500, kfogel@collab.net <kf...@collab.net> wrote:
> > Peter McNab <mc...@melbpc.org.au> writes:
> > > Max Bowsher wrote:
> > > > Ivan Zhakov wrote:
> > > >> Is there are any objections against add option to svn cp command for
> > > >> forcing replace files?
> > > >> If there isn't, I have some time to work on patch to add this option.
> > > >
> > > > So, essentially, "delete destination if exists, then copy" ?
> > > > I think that would be useful.
> > >
> > > Is that going to break what I believe to be a very strong point in svn
> > > that anything "modified" or non versioned in my WC wont be overwritten?
> >
> > I think this points to the need for a complete specification of the
> > feature before we implement it.  Ivan, would you like to provide this?
> 
> The fact that it's currently not supported is because the WC can't
> represent it. There's a branch to implement it (on which I'm working -
> all be it at a snails' pace).
Do you mean wc-replacements branch?

> Initial work has been done and the branch-code is working, except for
> files with properties...
> BTW, if you have time to work on it, I'll commit my latest changes
> tonight. We can work on it together.
Yes, I think this will good. And may be also you merge changes from trunk? 
I'll try test the branch andimplement some TODO items. 


-- 
Ivan Zhakov

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


Re: svn cp option to force replace files

Posted by Erik Huelsmann <eh...@gmail.com>.
On 18 Aug 2005 22:08:07 -0500, kfogel@collab.net <kf...@collab.net> wrote:
> Peter McNab <mc...@melbpc.org.au> writes:
> > Max Bowsher wrote:
> > > Ivan Zhakov wrote:
> > >> Is there are any objections against add option to svn cp command for
> > >> forcing replace files?
> > >> If there isn't, I have some time to work on patch to add this option.
> > >
> > > So, essentially, "delete destination if exists, then copy" ?
> > > I think that would be useful.
> >
> > Is that going to break what I believe to be a very strong point in svn
> > that anything "modified" or non versioned in my WC wont be overwritten?
> 
> I think this points to the need for a complete specification of the
> feature before we implement it.  Ivan, would you like to provide this?

The fact that it's currently not supported is because the WC can't
represent it. There's a branch to implement it (on which I'm working -
all be it at a snails' pace).

Initial work has been done and the branch-code is working, except for
files with properties...

BTW, if you have time to work on it, I'll commit my latest changes
tonight. We can work on it together.

HTH,


Erik.

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


Re: svn cp option to force replace files

Posted by kf...@collab.net.
Peter McNab <mc...@melbpc.org.au> writes:
> Max Bowsher wrote:
> > Ivan Zhakov wrote:
> >> Is there are any objections against add option to svn cp command for
> >> forcing replace files?
> >> If there isn't, I have some time to work on patch to add this option.
> >
> > So, essentially, "delete destination if exists, then copy" ?
> > I think that would be useful.
>
> Is that going to break what I believe to be a very strong point in svn
> that anything "modified" or non versioned in my WC wont be overwritten?

I think this points to the need for a complete specification of the
feature before we implement it.  Ivan, would you like to provide this?

-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand

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

Re: svn cp option to force replace files

Posted by Peter McNab <mc...@melbpc.org.au>.
Max Bowsher wrote:

> Ivan Zhakov wrote:
>
>> Hi,
>> Is there are any objections against add option to svn cp command for
>> forcing replace files?
>> If there isn't, I have some time to work on patch to add this option.
>
>
> So, essentially, "delete destination if exists, then copy" ?
> I think that would be useful.
>
> Max.
>
Is that going to break what I believe to be a very strong point in svn 
that anything "modified" or non versioned in my WC wont be overwritten?

Peter

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

Re: svn cp option to force replace files

Posted by Ivan Zhakov <ch...@gmail.com>.
On 8/19/05, Dale Worley <dw...@pingtel.com> wrote:
> I would like to ask people to think about the interface issues here before
> rushing out the code.
> As I see it, the problem is that "svn copy" is ambiguous:  If you do "svn
> copy .../aa/bb .../cc/dd", its operation depends on whether .../cc/dd
> already exists, or only ../cc.  In the first case, it creates .../cc/dd/bb,
> in the second, it creates .../cc/dd.  When the command is used
> "interactively", the user knows which case applies.  But when the command is
> used in a script, it is much more likely that an error will happen, where
> the wrong situation obtains.
> 
> IMHO, the correct solution is a version of "svn copy" that *requires* that
> .../cc/dd not exist, and reports an error if it does.  (The reason for
> choosing that case is that the other case of "svn copy" can always be
> implemented in terms of this case, but not vice-versa.)  Such a restricted
> version will not succeed but produce an unexpected result.
> 
> Changing "svn copy" to "delete .../cc/dd if it exists, then replace it with
> a copy of X" is not, IMHO, a good idea, as it does a different version of
> the sort of conditional behavior that is causing the problem in the first
> case.
> 
> If people feel a need to "delete X and replace it with a copy of Y", that
> should be performed as two steps.  I do know that the WC can represent such
> a thing, as "svn merge" can get WCs into such a state.  (It is flagged by
> "svn status" as "R".)
After problem investigation, I certanly agreed with You: subversion
should support delete and replace with copy instead of option to
command.

-- 
Ivan Zhakov

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


Re: svn cp option to force replace files

Posted by Philip Martin <ph...@codematters.co.uk>.
"Dale Worley" <dw...@pingtel.com> writes:

> change in the server API that 2188 discusses.

2188 is not a server API change, the "magic" all happens in the
client.

-- 
Philip Martin

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

RE: svn cp option to force replace files

Posted by Dale Worley <dw...@pingtel.com>.
> From: Philip Martin [mailto:philip@codematters.co.uk]>
>
> "Dale Worley" <dw...@pingtel.com> writes:
>
> > As I see it, the problem is that "svn copy" is ambiguous:
> If you do "svn
> > copy .../aa/bb .../cc/dd", its operation depends on whether
> .../cc/dd
> > already exists, or only ../cc.
>
> That's issue 2188.

Strictly, I'm not asking that the behavior of "svn copy" per se change, but
rather that the new option suppresses the ambiguity in its operation.  In
orfer to implement that option, it would probably be necessary to make the
change in the server API that 2188 discusses.

Dale


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

Re: svn cp option to force replace files

Posted by Philip Martin <ph...@codematters.co.uk>.
"Dale Worley" <dw...@pingtel.com> writes:

> As I see it, the problem is that "svn copy" is ambiguous:  If you do "svn
> copy .../aa/bb .../cc/dd", its operation depends on whether .../cc/dd
> already exists, or only ../cc.

That's issue 2188.

-- 
Philip Martin

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

RE: svn cp option to force replace files

Posted by Dale Worley <dw...@pingtel.com>.
I would like to ask people to think about the interface issues here before
rushing out the code.

As I see it, the problem is that "svn copy" is ambiguous:  If you do "svn
copy .../aa/bb .../cc/dd", its operation depends on whether .../cc/dd
already exists, or only ../cc.  In the first case, it creates .../cc/dd/bb,
in the second, it creates .../cc/dd.  When the command is used
"interactively", the user knows which case applies.  But when the command is
used in a script, it is much more likely that an error will happen, where
the wrong situation obtains.

IMHO, the correct solution is a version of "svn copy" that *requires* that
.../cc/dd not exist, and reports an error if it does.  (The reason for
choosing that case is that the other case of "svn copy" can always be
implemented in terms of this case, but not vice-versa.)  Such a restricted
version will not succeed but produce an unexpected result.

Changing "svn copy" to "delete .../cc/dd if it exists, then replace it with
a copy of X" is not, IMHO, a good idea, as it does a different version of
the sort of conditional behavior that is causing the problem in the first
case.

If people feel a need to "delete X and replace it with a copy of Y", that
should be performed as two steps.  I do know that the WC can represent such
a thing, as "svn merge" can get WCs into such a state.  (It is flagged by
"svn status" as "R".)

Dale


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

Re: svn cp option to force replace files

Posted by Max Bowsher <ma...@ukf.net>.
Ivan Zhakov wrote:
> Hi,
> Is there are any objections against add option to svn cp command for
> forcing replace files?
> If there isn't, I have some time to work on patch to add this option.

So, essentially, "delete destination if exists, then copy" ?
I think that would be useful.

Max.



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