You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@red-bean.com> on 2007/10/09 14:44:38 UTC

spurious mergeinfo property created on copy?

I asked about this behavior in IRC, and no-one's quite sure if this is
a bug or not:

$ svn cp README README2
A         README2

$ svn pl -v README2
Properties on 'README2':
  svn:keywords : LastChangedDate
  svn:mergeinfo :
  svn:eol-style : native


Notice that the copy created an (empty) svn:mergeinfo property.  Is
this expected?

(I ran into this in one of my new tests -- it wasn't expecting the
extra property, and neither was I!)

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

Re: spurious mergeinfo property created on copy?

Posted by Mark Phippard <ma...@gmail.com>.
On 10/9/07, Kamesh Jayachandran <ka...@collab.net> wrote:
> Sussman,
>
> svn cp -g README README2
>
> '-g' records the implicit mergeinfo correctly. But I am not sure why we
> need '-g' to achieve this where we don't need one for url-url copy.

This was talked about a lot.  The issue is that currently a WC-WC copy
has to contact the server to get the mergeinfo and that was deemed to
be a nasty regression.  So we made the -g option a requirement to
indicate you are OK with it doing this.  It is not intended to be a
permanent solution, just something to get the right code in place
until we can figure out how to handle this without contacting the
repository as part of the copy.

I am not sure why we are setting empty mergeinfo, but I think it had
something to do with the empty mergeinfo being more accurate than
doing nothing at all.  In terms of how a subsequent merge will handle
this.

-- 
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: spurious mergeinfo property created on copy?

Posted by Kamesh Jayachandran <ka...@collab.net>.
Sussman,

svn cp -g README README2



'-g' records the implicit mergeinfo correctly. But I am not sure why we 
need '-g' to achieve this where we don't need one for url-url copy.

With regards
Kamesh Jayachandran




Ben Collins-Sussman wrote:
> I asked about this behavior in IRC, and no-one's quite sure if this is
> a bug or not:
>
> $ svn cp README README2
> A         README2
>
> $ svn pl -v README2
> Properties on 'README2':
>   svn:keywords : LastChangedDate
>   svn:mergeinfo :
>   svn:eol-style : native
>
>
> Notice that the copy created an (empty) svn:mergeinfo property.  Is
> this expected?
>
> (I ran into this in one of my new tests -- it wasn't expecting the
> extra property, and neither was I!)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>   

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

Re: spurious mergeinfo property created on copy?

Posted by Daniel Rall <dl...@collab.net>.
On Tue, 09 Oct 2007, Mark Phippard wrote:

> On 10/9/07, Malcolm Rowe <ma...@farside.org.uk> wrote:
...
> > Even if this does turn out expected, it seems like a bad idea.  There's
> > no reason we should be creating empty-valued properties willy-nilly like
> > this.
> 
> I thought that at first too, but then I remembered there was a reason
> that Dan sets this empty property.  It has significance in the context
> of merge tracking.  I think if we do not set the property then the
> mergeinfo just becomes inherited from some parent which could be
> completely incorrect.

This is exactly the reason -- no mergeinfo is better that wrong mergeinfo.

> This break the inheritance and causes the merge
> engine to look at this item separate from the inherited mergeinfo.
> 
> The best solution is ultimately to find a way to set the mergeinfo
> without requiring the server connection.  There are several workable
> ideas, but none of them can be implemented very quickly.

Indeed (see my other post on this thread).  I'm hopeful to take
another look at that after returning from SubConf.

Re: spurious mergeinfo property created on copy?

Posted by Mark Phippard <ma...@gmail.com>.
On 10/9/07, Malcolm Rowe <ma...@farside.org.uk> wrote:
> On Tue, Oct 09, 2007 at 09:44:38AM -0500, Ben Collins-Sussman wrote:
> > I asked about this behavior in IRC, and no-one's quite sure if this is
> > a bug or not:
> >
> > $ svn cp README README2
> > A         README2
> >
> > $ svn pl -v README2
> > Properties on 'README2':
> >   svn:keywords : LastChangedDate
> >   svn:mergeinfo :
> >   svn:eol-style : native
> >
> >
> > Notice that the copy created an (empty) svn:mergeinfo property.  Is
> > this expected?
> >
>
> Even if this does turn out expected, it seems like a bad idea.  There's
> no reason we should be creating empty-valued properties willy-nilly like
> this.

I thought that at first too, but then I remembered there was a reason
that Dan sets this empty property.  It has significance in the context
of merge tracking.  I think if we do not set the property then the
mergeinfo just becomes inherited from some parent which could be
completely incorrect.  This break the inheritance and causes the merge
engine to look at this item separate from the inherited mergeinfo.

The best solution is ultimately to find a way to set the mergeinfo
without requiring the server connection.  There are several workable
ideas, but none of them can be implemented very quickly.

-- 
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: spurious mergeinfo property created on copy?

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Tue, Oct 09, 2007 at 09:44:38AM -0500, Ben Collins-Sussman wrote:
> I asked about this behavior in IRC, and no-one's quite sure if this is
> a bug or not:
> 
> $ svn cp README README2
> A         README2
> 
> $ svn pl -v README2
> Properties on 'README2':
>   svn:keywords : LastChangedDate
>   svn:mergeinfo :
>   svn:eol-style : native
> 
> 
> Notice that the copy created an (empty) svn:mergeinfo property.  Is
> this expected?
> 

Even if this does turn out expected, it seems like a bad idea.  There's
no reason we should be creating empty-valued properties willy-nilly like
this.

Regards,
Malcolm

Re: spurious mergeinfo property created on copy?

Posted by Daniel Rall <dl...@collab.net>.
On Tue, 09 Oct 2007, Ben Collins-Sussman wrote:

> I asked about this behavior in IRC, and no-one's quite sure if this is
> a bug or not:
> 
> $ svn cp README README2
> A         README2
> 
> $ svn pl -v README2
> Properties on 'README2':
>   svn:keywords : LastChangedDate
>   svn:mergeinfo :
>   svn:eol-style : native
> 
> 
> Notice that the copy created an (empty) svn:mergeinfo property.  Is
> this expected?

Yes, this is expected when not using the '-g' option, since we can't
calculate the correct mergeinfo for the copied path without being able
to contact the repository.  Instead, we're dropping all mergeinfo for
the path.

We've discussed a couple times using copyfrom history at mergeinfo
usage time (as Mike just mentioned again in issue #2875), rather than
making the implied mergeinfo for copied paths explicit at copy/move
time.

This would -- potentially significantly -- increase the penalty for
mergeinfo calculation, but would also elegantly solve some of our
oustanding problems, including:

* Producing merge history for existing repositories for copied/moved paths

* WC -> WC copy/move operations need to contact the repository