You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Tor Ringstad <to...@pvv.org> on 2007/11/14 16:44:26 UTC

Copy/move-handling on update in 1.5

The 1.5 release-note gives the impression that "copy/move-handling on
update" has been improved (issue #503). I'm trying to understand more
specifically what use-cases this covers.

I tested the following, which should be more or less exactly the
use-case described in the release-note:

WC1:

  # Prepare for test

  % touch file1
  % svn add file1
  A         file1
  % svn commit -m "setup"
  Adding         file1
  Transmitting file data .
  Committed revision 107.
  % svn up
  At revision 107.

WC2: 

  # Rename file in other WC

  % svn up
  A    file1
  Updated to revision 107.
  % svn mv file1 file2
  A         file2
  D         file1
  % svn commit -m "renamed"
  Deleting       file1
  Adding         file2
  Committed revision 108.

WC1:

  # Modify local file, get rename via update

  % echo "blahblah" >> file1
  % svn st
  M      file1
  % svn up
  D    file1                    # note #1
  A    file2
  Updated to revision 108.
  % ls -l
  total 4
  -rw-rw-r-- 1 tri tri 7 Nov 14 17:20 file1
  -rw-rw-r-- 1 tri tri 0 Nov 14 17:20 file2
  % svn st
  ?      file1
  % cat file1
  blahblah
  % cat file2
  <empty>

So, the locally modified file got unversioned (but still contains the
changes), and the renamed file (which is versioned) does not contain
the changes. Which I believe is the same behaviour as with 1.4.

There is, however, a documented caveat:

  There are a few caveats: [...] Also, if an incoming move-operation
  deletes 'foo' before it attempts to copy it to 'bar', then the copy
  will fail, and the client reverts to the old behavior of fetching a
  pristine copy of the file from the repository.

Is this what hits me? I can see (note #1) that the delete appears to
happen before the copy. Is this what the caveat is talking about?

In that case, is there actually any situation where the *user* will
notice any improvements with regard to copy/move-handling on update?


- Tor Ringstad -


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

Re: [PATCH] Copy/move-handling on update in 1.5

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jan 28, 2008 at 10:08:34PM +0000, Julian Foad wrote:
> (Just looking back through my mail...)
> 
> Freddie/David/anyone,
> 
> Did this ever go anywhere? Is there still a problem that needs solving?
> 
> - Julian

I'd like to see the patch in unidiff.

Thanks for bumping this Julian. The problem quoted below sounds exactly
like one of the problems we are working on on the tree-conflicts branch,
but this thread had escaped my attention so far.

More precisely it's actually tree conflict use case 3.
See notes/tree-conflicts/use-cases.txt on the subversion trunk:
http://svn.collab.net/viewvc/svn/trunk/notes/tree-conflicts/use-cases.txt?view=markup

>> On Dec 6, 2007 2:10 AM, Freddie Albertsman <c0...@cs.umu.se> wrote:
>>  > Hey Guys!
>>  > I have one question concerning concerning the "update ignores added
>>  > files/dirs":
>>  >
>>  > Consider the following scenario:
>>  >
>>  > repos. contains /trunk/foo
>>  >
>>  > #user A
>>  > rename foo -> bar
>>  > echo "HELLO BAR" > bar
>>  >
>>  > #user B
>>  > rename foo -> baz
>>  > echo "HELLO BAZ" > baz
>>  > commit
>>  >
>>  > #user A
>>  > update
>>  >
>>  > Now if the "newly" added file, bar, in user A's wc is ignored then the
>>  > server will throw a new file (baz coming from B). When user A commits after
>>  > updating, the file "bar" will be added as well and we end up with two files
>>  > in the repository where it should have been only one file.

With the current code on the tree-conflicts branch, user A should
get a conflict upon trying to commit from the working copy after
the update:

Note that the file "bar" will still be added to A's working copy
nonetheless, but because the commit is blocked until A has made
a concious decision about what to do with the files, the problem
is effectively stopped before it reaches the repository.

Can you try this branch and check if it provides an adequate solution
to the problem you are describing? To get the source, run:

    svn co https://svn.collab.net/repos/svn/branches/tree-conflicts

>>  > I think that
>>  > files which are added AND copied should not be ignored.
>>  > What do you think guys?

The file user A added with history is not being ignored. What is being
ignored is that the file baz coming down in the update has common ancestry
with the newly added file bar in A's working copy, and that the delete that
occurs on foo in A's working copy upon update is related to a rename operation
carried out by user B.

Because of the way the update editor works you only get to look at
a single file the update pushes to the working copy for a given add or
delete operation. So establishing relationships between files across the
whole working copy during an update operation is hard.

And with the current rename implementation (or rather, lack of)
there seems to be no reliable way to retroactively tell apart deletes
that occurred because of "svn move" from deletes that occurred because
of "svn delete".

See notes/tree-conflicts/detection.txt on the subversion trunk for a more
detailed explanation of these issues:
http://svn.collab.net/viewvc/svn/trunk/notes/tree-conflicts/detection.txt?view=markup

If you have any ideas about solving this problem a better way
I'd love to hear them.

Thanks,
-- 
Stefan Sperling <st...@elego.de>                 Software Developer
elego Software Solutions GmbH                            HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12        Tel:  +49 30 23 45 86 96 
13355 Berlin                              Fax:  +49 30 23 45 86 95
http://www.elego.de                 Geschaeftsfuehrer: Olaf Wagner

Re: [PATCH] Copy/move-handling on update in 1.5

Posted by Julian Foad <ju...@btopenworld.com>.
(Just looking back through my mail...)

Freddie/David/anyone,

Did this ever go anywhere? Is there still a problem that needs solving?

- Julian



Freddie Albertsman wrote:
> 
> Hey David!
> 
> Yes, I have a patch for this, it should be applied to 
> ../libsvn_repos/reporter.c.
> 
> There is a function (check_order) that checks if the entry is "special", 
> which means if it is be merged with a newer version with a different 
> names. In which case it will be deleted at the end. It works on linux 
> but i haven't tested in windows, but it should work there too. Sorry i 
> didn't send this before i was sick+busy.
> 
> Yours,
> Freddie
> 
> 
> On Dec 10, 2007 7:26 PM, David Glasser < glasser@davidglasser.net 
> <ma...@davidglasser.net>> wrote:
> 
>     On Dec 6, 2007 2:10 AM, Freddie Albertsman <c03fan@cs.umu.se
>     <ma...@cs.umu.se>> wrote:
>      > Hey Guys!
>      > I have one question concerning concerning the "update ignores added
>      > files/dirs":
>      >
>      > Consider the following scenario:
>      >
>      > repos. contains /trunk/foo
>      >
>      > #user A
>      > rename foo -> bar
>      > echo "HELLO BAR" > bar
>      >
>      > #user B
>      > rename foo -> baz
>      > echo "HELLO BAZ" > baz
>      > commit
>      >
>      > #user A
>      > update
>      >
>      > Now if the "newly" added file, bar, in user A's wc is ignored
>     then the
>      > server will throw a new file (baz coming from B). When user A
>     commits after
>      > updating, the file "bar" will be added as well and we end up with
>     two files
>      > in the repository where it should have been only one file. I
>     think that
>      > files which are added AND copied should not be ignored.
>      > What do you think guys?
> 
>     This point is interesting, but I don't think it's related to the new
>     1.5 feature; the behavior you point out occurs in 1.4 as well.
> 
>      > One more thing, I think I might have solved an issue about copying on
>      > updating described in this scenario:
>      >        1.User A checks out /repos/trunk/proj containing foo.c
>      >         2.User B checks out /repos/trunk/proj containing foo.c
>      >         3.User A makes changes to foo.c
>      >         4.User B renames foo.c to bar.c and makes some changes
>      >         5.User B commits
>      >         6.User A updates
>      >
>      >  Ben said that this scenario would if the deletetion of foo
>     happens AFTER
>      > the add of bar (when A does an update). Well, now it the deletion
>     of foo
>      > happens after the addition of bar if bar has a copyfrom that is
>     (foo). So
>      > when at step 6, A does an update, then the bar is merged with foo
>     and then
>      > bar is added and foo deleted.
> 
>     I can't follow if you're saying that you have a patch that
>     implements this?
> 
>     --dave

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

[PATCH] Copy/move-handling on update in 1.5

Posted by Freddie Albertsman <c0...@cs.umu.se>.
Hey David!

Yes, I have a patch for this, it should be applied to
../libsvn_repos/reporter.c.

There is a function (check_order) that checks if the entry is "special",
which means if it is be merged with a newer version with a different names.
In which case it will be deleted at the end. It works on linux but i haven't
tested in windows, but it should work there too. Sorry i didn't send this
before i was sick+busy.

Yours,
Freddie


On Dec 10, 2007 7:26 PM, David Glasser <gl...@davidglasser.net> wrote:

> On Dec 6, 2007 2:10 AM, Freddie Albertsman <c0...@cs.umu.se> wrote:
> > Hey Guys!
> > I have one question concerning concerning the "update ignores added
> > files/dirs":
> >
> > Consider the following scenario:
> >
> > repos. contains /trunk/foo
> >
> > #user A
> > rename foo -> bar
> > echo "HELLO BAR" > bar
> >
> > #user B
> > rename foo -> baz
> > echo "HELLO BAZ" > baz
> > commit
> >
> > #user A
> > update
> >
> > Now if the "newly" added file, bar, in user A's wc is ignored then the
> > server will throw a new file (baz coming from B). When user A commits
> after
> > updating, the file "bar" will be added as well and we end up with two
> files
> > in the repository where it should have been only one file. I think that
> > files which are added AND copied should not be ignored.
> > What do you think guys?
>
> This point is interesting, but I don't think it's related to the new
> 1.5 feature; the behavior you point out occurs in 1.4 as well.
>
> > One more thing, I think I might have solved an issue about copying on
> > updating described in this scenario:
> >        1.User A checks out /repos/trunk/proj containing foo.c
> >         2.User B checks out /repos/trunk/proj containing foo.c
> >         3.User A makes changes to foo.c
> >         4.User B renames foo.c to bar.c and makes some changes
> >         5.User B commits
> >         6.User A updates
> >
> >  Ben said that this scenario would if the deletetion of foo happens
> AFTER
> > the add of bar (when A does an update). Well, now it the deletion of foo
> > happens after the addition of bar if bar has a copyfrom that is (foo).
> So
> > when at step 6, A does an update, then the bar is merged with foo and
> then
> > bar is added and foo deleted.
>
> I can't follow if you're saying that you have a patch that implements
> this?
>
> --dave
>
> --
> David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
>

Re: Copy/move-handling on update in 1.5

Posted by David Glasser <gl...@davidglasser.net>.
On Dec 6, 2007 2:10 AM, Freddie Albertsman <c0...@cs.umu.se> wrote:
> Hey Guys!
> I have one question concerning concerning the "update ignores added
> files/dirs":
>
> Consider the following scenario:
>
> repos. contains /trunk/foo
>
> #user A
> rename foo -> bar
> echo "HELLO BAR" > bar
>
> #user B
> rename foo -> baz
> echo "HELLO BAZ" > baz
> commit
>
> #user A
> update
>
> Now if the "newly" added file, bar, in user A's wc is ignored then the
> server will throw a new file (baz coming from B). When user A commits after
> updating, the file "bar" will be added as well and we end up with two files
> in the repository where it should have been only one file. I think that
> files which are added AND copied should not be ignored.
> What do you think guys?

This point is interesting, but I don't think it's related to the new
1.5 feature; the behavior you point out occurs in 1.4 as well.

> One more thing, I think I might have solved an issue about copying on
> updating described in this scenario:
>        1.User A checks out /repos/trunk/proj containing foo.c
>         2.User B checks out /repos/trunk/proj containing foo.c
>         3.User A makes changes to foo.c
>         4.User B renames foo.c to bar.c and makes some changes
>         5.User B commits
>         6.User A updates
>
>  Ben said that this scenario would if the deletetion of foo happens AFTER
> the add of bar (when A does an update). Well, now it the deletion of foo
> happens after the addition of bar if bar has a copyfrom that is (foo). So
> when at step 6, A does an update, then the bar is merged with foo and then
> bar is added and foo deleted.

I can't follow if you're saying that you have a patch that implements this?

--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: Copy/move-handling on update in 1.5

Posted by Freddie Albertsman <c0...@cs.umu.se>.
Hey Guys!
I have one question concerning concerning the "update ignores added
files/dirs":

Consider the following scenario:

repos. contains /trunk/foo

#user A
rename foo -> bar
echo "HELLO BAR" > bar

#user B
rename foo -> baz
echo "HELLO BAZ" > baz
commit

#user A
update

Now if the "newly" added file, bar, in user A's wc is ignored then the
server will throw a new file (baz coming from B). When user A commits after
updating, the file "bar" will be added as well and we end up with two files
in the repository where it should have been only one file. I think that
files which are added AND copied should not be ignored.
What do you think guys?

One more thing, I think I might have solved an issue about copying on
updating described in this scenario:
       1.User A checks out /repos/trunk/proj containing foo.c
       2.User B checks out /repos/trunk/proj containing foo.c
       3.User A makes changes to foo.c
       4.User B renames foo.c to bar.c and makes some changes
       5.User B commits
       6.User A updates

Ben said that this scenario would if the deletetion of foo happens AFTER the
add of bar (when A does an update). Well, now it the deletion of foo happens
after the addition of bar if bar has a copyfrom that is (foo). So when at
step 6, A does an update, then the bar is merged with foo and then bar is
added and foo deleted.

PS
Ben, I'm coming out of the cave now! :-)


On Nov 15, 2007 8:04 PM, Ben Collins-Sussman <su...@red-bean.com> wrote:

> On Nov 15, 2007 11:54 AM, Tor Ringstad <to...@pvv.org> wrote:
>
> > So the bottom line still seems to be that nobody has ever seen a
> > scenario similar to that described in the release note, that is,
> > involving a move, where the local changes are handled correctly...
>
> Look at the  update_copied_from_replaced_and_changed test... it
> involves 2 moves.
>
>
> >
> > (Nice poem on r26957, by the way :)
>
> Oh noes, I've been discovered!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

Re: Copy/move-handling on update in 1.5

Posted by David Glasser <gl...@davidglasser.net>.
On Nov 15, 2007 11:51 AM, Tor Ringstad <to...@pvv.org> wrote:
> [Ben Collins-Sussman <sussman <at> red-bean.com>]
> > Look at the update_copied_from_replaced_and_changed test... it
> > involves 2 moves.
>
> But this is a different scenario than the one described in the release
> note, isn't it? There's no incoming move upon local modification here
> as far as I can see...?

My belief is that if you took something like update_handles_copyfrom
and changed it to use a move, it could work in certain circumstances,
including if the move is from a subdir to a parent.

Perhaps the relnotes need to do a better job of stating that we've
implemented part of the machinery but it won't completely work in all
cases; however, in any case there is no data loss.

--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: Copy/move-handling on update in 1.5

Posted by Tor Ringstad <to...@pvv.org>.
[Ben Collins-Sussman <sussman <at> red-bean.com>]
> Look at the update_copied_from_replaced_and_changed test... it
> involves 2 moves.

But this is a different scenario than the one described in the release
note, isn't it? There's no incoming move upon local modification here
as far as I can see...?


- Tor -


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

Re: Copy/move-handling on update in 1.5

Posted by Ben Collins-Sussman <su...@red-bean.com>.
On Nov 15, 2007 11:54 AM, Tor Ringstad <to...@pvv.org> wrote:

> So the bottom line still seems to be that nobody has ever seen a
> scenario similar to that described in the release note, that is,
> involving a move, where the local changes are handled correctly...

Look at the  update_copied_from_replaced_and_changed test... it
involves 2 moves.


>
> (Nice poem on r26957, by the way :)

Oh noes, I've been discovered!

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

Re: Copy/move-handling on update in 1.5

Posted by Tor Ringstad <to...@pvv.org>.
[Ben Collins-Sussman <sussman <at> red-bean.com>]
> Sure, we have several test cases that demonstrate it working. :-)

I had a look at the two most relevant tests (37 and 39), and both of
them do copy, not move.

I have no problem producing examples where local modifications are
correctly handled on an incoming copy. I guess copy should always work
well (no dependency on semi-random ordering, etc)?

So the bottom line still seems to be that nobody has ever seen a
scenario similar to that described in the release note, that is,
involving a move, where the local changes are handled correctly...

(Nice poem on r26957, by the way :)


- Tor -


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

Re: Copy/move-handling on update in 1.5

Posted by Ben Collins-Sussman <su...@red-bean.com>.
On Nov 15, 2007 6:48 AM, Tor Ringstad <to...@pvv.org> wrote:

> So I'm kind of back to my initial question; are there actually any
> examples of the "Improved copy-handling during updates" functionality
> that is described in the release note:

Sure, we have several test cases that demonstrate it working.  :-)

I don't think getting the add before the delete is a *guarantee* it's
always going to work, just a prerequisite.  Still, I'd like to debug
your scenario and see where/why the algorithm is failing to identify
dir/file as a candidate to move.

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

Re: Copy/move-handling on update in 1.5

Posted by Ben Collins-Sussman <su...@red-bean.com>.
On Nov 15, 2007 8:02 AM, Freddie Albertsman <c0...@cs.umu.se> wrote:
> Hi Ben :)
>
> I'm working on the following revision 27110 that you committed (bug #503).

You shouldn't be working with a static snapshot of code, you should be
using a trunk working copy that you update daily.  r27110 is over a
month old, and David Glasser has already made huge changes to the
existing solution. Thus, whatever you've done so far is very likely
out-of-date and hard to merge. This is what I mean by "staying
connected" to the development community.  You update daily, discuss
what others are doing, talk about what you're doing, get feedback,
post frequent patches that demonstrate things.  No cave-hiding
allowed!

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

Re: Copy/move-handling on update in 1.5

Posted by Freddie Albertsman <c0...@cs.umu.se>.
Hi Ben :)

I'm working on the following revision 27110 that you committed (bug #503).
You're right, I should be more public and open-sourcy in my work :) I'll
give you update
as soon as I have something at hand. Thanx for the reponse!

//Freddie

On Nov 15, 2007 2:49 PM, Ben Collins-Sussman <su...@red-bean.com> wrote:

> Try looking at update tests 37 thru 39, guys.  It demonstrates the
> feature.   And to see the algorithm being used, look at
> libsvn_wc/update_editor.c:add_file_with_history.
>
> Freddie:  I hope you're working on improving the existing solution in
> the latest trunk code, rather than planning to offer up a completely
> different solution out of the blue?   That wouldn't be very...
> open-sourcey.  :).  Open source is inherently a social activity, and
> involves lots of discussion and collaboration.  If you're working in
> an isolated cave, please come out of hiding and show us what you're
> doing!
>
>
> On 11/15/07, Freddie Albertsman <c0...@cs.umu.se> wrote:
> > Hi Tor!
> >
> > I'm working on the copy-on-update problem; it works actually when the
> delete
> > happens after the add. I'm working on a solution that would always make
> the
> > delete happens at the very end.
> >
> > I haven't come across any example either that makes the scenario you
> > presented (copy on update) behave normally.
> >
> > //Freddie
> >
> > On Nov 15, 2007 1:48 PM, Tor Ringstad <to...@pvv.org> wrote:
> >
> > > [Mark Phippard <markphip <at> gmail.com>]
> > > > I am not sure if this is predictable via filename. You could do:
> > > >
> > > > svn mv file2 afile2
> > > >
> > > > And see if that is different.
> > >
> > > I've experimented a bit, but I'm not able to construct any scenario
> > > where an add comes before the delete. In fact, it almost looks like
> > > *all* deletes always comes first, then *all* adds (for pure renames,
> > > that is).
> > >
> > > > Moving a file from a subdir into its parent should do it.
> > >
> > > Well, just sort of. I redid the test from my initial post, but instead
> > > of just plainly renaming the file, i moved it out of a subdir.
> > >
> > > Initial setup is a directory "dir" with a single empty file "file",
> > > and two up-to-date working copies.
> > >
> > > WC2:
> > >
> > >  # Move file
> > >
> > >  % svn mv dir/file .
> > >  A         file
> > >  D         dir/file
> > >  % svn commit -m "moved"
> > >  Deleting       dir/file
> > >  Adding         file
> > >  Committed revision 128.
> > >
> > > WC1:
> > >
> > >  # Modify local file, get move via update
> > >
> > >  % echo foobar >> dir/file
> > >  % svn st
> > >  M      dir/file
> > >  % svn up
> > >  A    file                        # note #1
> > >  D    dir/file
> > >  Updated to revision 128.
> > >  % svn st
> > >  ?      dir/file
> > >  % cat file
> > >  <empty>
> > >  % cat dir/file
> > >  foobar
> > >
> > > Now the add actually comes before the delete (note #1), but the local
> > > modifications are still "lost" in the now unversioned dir/file.
> > >
> > > So I'm kind of back to my initial question; are there actually any
> > > examples of the "Improved copy-handling during updates" functionality
> > > that is described in the release note:
> > >
> > >
> http://subversion.tigris.org/svn_1.5_releasenotes.html#leverage-copyfrom
> > >
> > > Is this text perhaps promising a bit much? I have to say I got high
> > > expectations after reading it, and I'm sure a lot of others will as
> > > well.
> > >
> > >
> > > - Tor Ringstad -
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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: Copy/move-handling on update in 1.5

Posted by Ben Collins-Sussman <su...@red-bean.com>.
Try looking at update tests 37 thru 39, guys.  It demonstrates the
feature.   And to see the algorithm being used, look at
libsvn_wc/update_editor.c:add_file_with_history.

Freddie:  I hope you're working on improving the existing solution in
the latest trunk code, rather than planning to offer up a completely
different solution out of the blue?   That wouldn't be very...
open-sourcey.  :).  Open source is inherently a social activity, and
involves lots of discussion and collaboration.  If you're working in
an isolated cave, please come out of hiding and show us what you're
doing!


On 11/15/07, Freddie Albertsman <c0...@cs.umu.se> wrote:
> Hi Tor!
>
> I'm working on the copy-on-update problem; it works actually when the delete
> happens after the add. I'm working on a solution that would always make the
> delete happens at the very end.
>
> I haven't come across any example either that makes the scenario you
> presented (copy on update) behave normally.
>
> //Freddie
>
> On Nov 15, 2007 1:48 PM, Tor Ringstad <to...@pvv.org> wrote:
>
> > [Mark Phippard <markphip <at> gmail.com>]
> > > I am not sure if this is predictable via filename. You could do:
> > >
> > > svn mv file2 afile2
> > >
> > > And see if that is different.
> >
> > I've experimented a bit, but I'm not able to construct any scenario
> > where an add comes before the delete. In fact, it almost looks like
> > *all* deletes always comes first, then *all* adds (for pure renames,
> > that is).
> >
> > > Moving a file from a subdir into its parent should do it.
> >
> > Well, just sort of. I redid the test from my initial post, but instead
> > of just plainly renaming the file, i moved it out of a subdir.
> >
> > Initial setup is a directory "dir" with a single empty file "file",
> > and two up-to-date working copies.
> >
> > WC2:
> >
> >  # Move file
> >
> >  % svn mv dir/file .
> >  A         file
> >  D         dir/file
> >  % svn commit -m "moved"
> >  Deleting       dir/file
> >  Adding         file
> >  Committed revision 128.
> >
> > WC1:
> >
> >  # Modify local file, get move via update
> >
> >  % echo foobar >> dir/file
> >  % svn st
> >  M      dir/file
> >  % svn up
> >  A    file                        # note #1
> >  D    dir/file
> >  Updated to revision 128.
> >  % svn st
> >  ?      dir/file
> >  % cat file
> >  <empty>
> >  % cat dir/file
> >  foobar
> >
> > Now the add actually comes before the delete (note #1), but the local
> > modifications are still "lost" in the now unversioned dir/file.
> >
> > So I'm kind of back to my initial question; are there actually any
> > examples of the "Improved copy-handling during updates" functionality
> > that is described in the release note:
> >
> >  http://subversion.tigris.org/svn_1.5_releasenotes.html#leverage-copyfrom
> >
> > Is this text perhaps promising a bit much? I have to say I got high
> > expectations after reading it, and I'm sure a lot of others will as
> > well.
> >
> >
> > - Tor Ringstad -
> >
> >
> > ---------------------------------------------------------------------
> > 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: Copy/move-handling on update in 1.5

Posted by Ben Collins-Sussman <su...@red-bean.com>.
On Nov 15, 2007 8:18 AM, Erik Huelsmann <eh...@gmail.com> wrote:
> On 11/15/07, Mark Phippard <ma...@gmail.com> wrote:
> > On Nov 15, 2007 8:58 AM, Erik Huelsmann <eh...@gmail.com> wrote:
> > > On 11/15/07, Freddie Albertsman <c0...@cs.umu.se> wrote:
> > > > Hi Tor!
> > > >
> > > > I'm working on the copy-on-update problem; it works actually when the delete
> > > > happens after the add. I'm working on a solution that would always make the
> > > > delete happens at the very end.
> > > >
> > > > I haven't come across any example either that makes the scenario you
> > > > presented (copy on update) behave normally.
> > >
> > > If I'm correct, deletes are inherently sent before adds because we had
> > > problems with case-sensitivity before: if a file is renamed from
> > > THIS-FILE to this-file and the Add is sent before the delete, Windows
> > > gets confused (heavily). To resolve this problem, Adds are sent before
> > > Deletes, afaik.
> >
> > That is also what I thought ... except I think you meant to say
> > Deletes are sent before Adds.
>
> Heh. ofcourse I meant to say that.

I think that what you mean to say is that *within a single directory*,
deletes are always sent before adds.

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

Re: Copy/move-handling on update in 1.5

Posted by Erik Huelsmann <eh...@gmail.com>.
On 11/15/07, Mark Phippard <ma...@gmail.com> wrote:
> On Nov 15, 2007 8:58 AM, Erik Huelsmann <eh...@gmail.com> wrote:
> > On 11/15/07, Freddie Albertsman <c0...@cs.umu.se> wrote:
> > > Hi Tor!
> > >
> > > I'm working on the copy-on-update problem; it works actually when the delete
> > > happens after the add. I'm working on a solution that would always make the
> > > delete happens at the very end.
> > >
> > > I haven't come across any example either that makes the scenario you
> > > presented (copy on update) behave normally.
> >
> > If I'm correct, deletes are inherently sent before adds because we had
> > problems with case-sensitivity before: if a file is renamed from
> > THIS-FILE to this-file and the Add is sent before the delete, Windows
> > gets confused (heavily). To resolve this problem, Adds are sent before
> > Deletes, afaik.
>
> That is also what I thought ... except I think you meant to say
> Deletes are sent before Adds.

Heh. ofcourse I meant to say that.

bye,

Erik.

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

Re: Copy/move-handling on update in 1.5

Posted by Mark Phippard <ma...@gmail.com>.
On Nov 15, 2007 8:58 AM, Erik Huelsmann <eh...@gmail.com> wrote:
> On 11/15/07, Freddie Albertsman <c0...@cs.umu.se> wrote:
> > Hi Tor!
> >
> > I'm working on the copy-on-update problem; it works actually when the delete
> > happens after the add. I'm working on a solution that would always make the
> > delete happens at the very end.
> >
> > I haven't come across any example either that makes the scenario you
> > presented (copy on update) behave normally.
>
> If I'm correct, deletes are inherently sent before adds because we had
> problems with case-sensitivity before: if a file is renamed from
> THIS-FILE to this-file and the Add is sent before the delete, Windows
> gets confused (heavily). To resolve this problem, Adds are sent before
> Deletes, afaik.

That is also what I thought ... except I think you meant to say
Deletes are sent before Adds.


-- 
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: Copy/move-handling on update in 1.5

Posted by Erik Huelsmann <eh...@gmail.com>.
On 11/15/07, Freddie Albertsman <c0...@cs.umu.se> wrote:
> Hi Tor!
>
> I'm working on the copy-on-update problem; it works actually when the delete
> happens after the add. I'm working on a solution that would always make the
> delete happens at the very end.
>
> I haven't come across any example either that makes the scenario you
> presented (copy on update) behave normally.

If I'm correct, deletes are inherently sent before adds because we had
problems with case-sensitivity before: if a file is renamed from
THIS-FILE to this-file and the Add is sent before the delete, Windows
gets confused (heavily). To resolve this problem, Adds are sent before
Deletes, afaik.

bye,


Erik.

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

Re: Copy/move-handling on update in 1.5

Posted by Freddie Albertsman <c0...@cs.umu.se>.
Hi Tor!

I'm working on the copy-on-update problem; it works actually when the delete
happens after the add. I'm working on a solution that would always make the
delete happens at the very end.

I haven't come across any example either that makes the scenario you
presented (copy on update) behave normally.

//Freddie

On Nov 15, 2007 1:48 PM, Tor Ringstad <to...@pvv.org> wrote:

> [Mark Phippard <markphip <at> gmail.com>]
> > I am not sure if this is predictable via filename. You could do:
> >
> > svn mv file2 afile2
> >
> > And see if that is different.
>
> I've experimented a bit, but I'm not able to construct any scenario
> where an add comes before the delete. In fact, it almost looks like
> *all* deletes always comes first, then *all* adds (for pure renames,
> that is).
>
> > Moving a file from a subdir into its parent should do it.
>
> Well, just sort of. I redid the test from my initial post, but instead
> of just plainly renaming the file, i moved it out of a subdir.
>
> Initial setup is a directory "dir" with a single empty file "file",
> and two up-to-date working copies.
>
> WC2:
>
>  # Move file
>
>  % svn mv dir/file .
>  A         file
>  D         dir/file
>  % svn commit -m "moved"
>  Deleting       dir/file
>  Adding         file
>  Committed revision 128.
>
> WC1:
>
>  # Modify local file, get move via update
>
>  % echo foobar >> dir/file
>  % svn st
>  M      dir/file
>  % svn up
>  A    file                        # note #1
>  D    dir/file
>  Updated to revision 128.
>  % svn st
>  ?      dir/file
>  % cat file
>  <empty>
>  % cat dir/file
>  foobar
>
> Now the add actually comes before the delete (note #1), but the local
> modifications are still "lost" in the now unversioned dir/file.
>
> So I'm kind of back to my initial question; are there actually any
> examples of the "Improved copy-handling during updates" functionality
> that is described in the release note:
>
>  http://subversion.tigris.org/svn_1.5_releasenotes.html#leverage-copyfrom
>
> Is this text perhaps promising a bit much? I have to say I got high
> expectations after reading it, and I'm sure a lot of others will as
> well.
>
>
> - Tor Ringstad -
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

Re: Copy/move-handling on update in 1.5

Posted by Tor Ringstad <to...@pvv.org>.
[Mark Phippard <markphip <at> gmail.com>]
> I am not sure if this is predictable via filename. You could do:
>
> svn mv file2 afile2
>
> And see if that is different.

I've experimented a bit, but I'm not able to construct any scenario
where an add comes before the delete. In fact, it almost looks like
*all* deletes always comes first, then *all* adds (for pure renames,
that is).

> Moving a file from a subdir into its parent should do it.

Well, just sort of. I redid the test from my initial post, but instead
of just plainly renaming the file, i moved it out of a subdir.

Initial setup is a directory "dir" with a single empty file "file",
and two up-to-date working copies.

WC2:

  # Move file

  % svn mv dir/file .
  A         file
  D         dir/file
  % svn commit -m "moved"
  Deleting       dir/file
  Adding         file
  Committed revision 128.

WC1:

  # Modify local file, get move via update

  % echo foobar >> dir/file 
  % svn st
  M      dir/file
  % svn up
  A    file                        # note #1
  D    dir/file
  Updated to revision 128.
  % svn st     
  ?      dir/file
  % cat file
  <empty>
  % cat dir/file 
  foobar

Now the add actually comes before the delete (note #1), but the local
modifications are still "lost" in the now unversioned dir/file.

So I'm kind of back to my initial question; are there actually any
examples of the "Improved copy-handling during updates" functionality
that is described in the release note:

  http://subversion.tigris.org/svn_1.5_releasenotes.html#leverage-copyfrom

Is this text perhaps promising a bit much? I have to say I got high
expectations after reading it, and I'm sure a lot of others will as
well.


- Tor Ringstad -


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

Re: Copy/move-handling on update in 1.5

Posted by David Glasser <gl...@davidglasser.net>.
On Nov 14, 2007 8:49 AM, Mark Phippard <ma...@gmail.com> wrote:
> On 11/14/07, Tor Ringstad <to...@pvv.org> wrote:
> >   There are a few caveats: [...] Also, if an incoming move-operation
> >   deletes 'foo' before it attempts to copy it to 'bar', then the copy
> >   will fail, and the client reverts to the old behavior of fetching a
> >   pristine copy of the file from the repository.
> >
> > Is this what hits me? I can see (note #1) that the delete appears to
> > happen before the copy. Is this what the caveat is talking about?
>
> Yes.
>
> > In that case, is there actually any situation where the *user* will
> > notice any improvements with regard to copy/move-handling on update?
>
> Yes.  When the file is copied before it is deleted.  I am not sure if
> this is predictable via filename.  You could do:

It is not "predictable" (specifically, in the current implementation
it is based on APR hash iterator ordering).

There are plans to make this work better in future versions (by saving
the deleted file, etc), but we really do want to get 1.5 released and
a partial feature is better than nothing.

> Moving a file from a subdir into its parent should do it.

I think so, yeah.

--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: Copy/move-handling on update in 1.5

Posted by Mark Phippard <ma...@gmail.com>.
On 11/14/07, Tor Ringstad <to...@pvv.org> wrote:
>   There are a few caveats: [...] Also, if an incoming move-operation
>   deletes 'foo' before it attempts to copy it to 'bar', then the copy
>   will fail, and the client reverts to the old behavior of fetching a
>   pristine copy of the file from the repository.
>
> Is this what hits me? I can see (note #1) that the delete appears to
> happen before the copy. Is this what the caveat is talking about?

Yes.

> In that case, is there actually any situation where the *user* will
> notice any improvements with regard to copy/move-handling on update?

Yes.  When the file is copied before it is deleted.  I am not sure if
this is predictable via filename.  You could do:

svn mv file2 afile2

And see if that is different.

Moving a file from a subdir into its parent should do it.

-- 
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