You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by kf...@collab.net on 2005/05/30 16:58:55 UTC

Re: "svnlook changed" different for WC->URL and URL->URL copy

I'm CC'ing dev@, because this does sound like a bug, and I don't see
an issue filed on it.

Mike Pilato, I have a vague recollection that we've talked about this
problem before... Does it ring a bell?

<Se...@fujitsu-siemens.com> writes:
> When copying a working copy to an URL:
> 
>     svn copy trunk svn://host/repos/branches/B1,
> 
> the command
> 
>     svnlook changed -t "$TXN" "$REPOS" >&2
> 
> in the pre-commit hook shows the target directory and the files/subdirs
> therein:
> 
>     A   branches/B1/
>     A   branches/B1/file
>     A   branches/B1/dir
>     A   branches/B1/dir/file

Just to confirm: what's under trunk is a single-revision working copy,
not a mixed-revision one, right?  I.e., If you do this with a fresh,
unmodified checkout of trunk, the behavior is the same?

> But when copying the same tree specified as an URL source:
> 
>     svn copy svn://host/repos/trunk svn://host/repos/branches/B1,
> 
> just the top directory is shown:
> 
>     A   branches/B1/
> 
> Is this intended or a bug?  It makes it difficult to set up separate
> permissions for different paths.  I use svnperm.py and would like to
> give developers the right to change existing branches, branch
> maintainers the right to create and remove branches but not to change
> them, and repository administrators the rights to create top directories
> like "branches" but not to add any directories or files therein:
> 
>     branches/[^/]+/.* = @maintainers(add,remove)
>     branches/[^/]+/.+ = @developers(add,remove,update)
>     [^/]+/ = @admins(add,remove)
> 
> The permission check for @admins denies the right for a WC->URL copy,
> but allows an URL->URL copy of a tree into the top level directory:
> 
>     svn copy trunk svn://host/repos/B1			# denied
>     svn copy svn://host/repos/trunk svn://host/repos/B1	# allowed

I think the semantics of the two operations ought to be the same, and
that therefore this is a bug.

-Karl

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

Re: "svnlook changed" different for WC->URL and URL->URL copy

Posted by "C. Michael Pilato" <cm...@collab.net>.
I understand what you're talking about.  Two comments:

   - I believe that over ra_local and ra_svn, such not-really-mixed-rev
     working copies would still wind up doing what you would expect
     because libsvn_fs checks to see if a copy would result in no real
     change, and if so, does nothing.  ra_dav has a problem here, in
     that mod_dav flatly hijacks the ability for a copy to overwrite
     an existing object.  (There's an issue in our tracker that covers
     this.)

   - The full "fix" for what you're talking about likely involves the
     Subversion client code doing all the work that the Subversion
     server code does right now to determine if a copy would be a
     no-op.  Trust me -- replicating that logic is a bad idea (for
     performance).

kfogel@collab.net writes:

> "C. Michael Pilato" <cm...@collab.net> writes:
> > Karl, it looks like you've already nailed the probable cause --
> > mixed-revision working copy as the source of the copy.  While doing a
> > WC->URL copy, every time a file or directory's revision differs from
> > that of its parent, that object is transmitted as its own distinct
> > add-with-history operation.  This is the correct behavior for WC->URL
> > copies, though -- not a bug.
> 
> Well, not always, maybe?  There are "real" revision differences and
> "fake" ones.  For example, suppose I do this:
> 
>    $ svn co http://blahblahblah.com/repos/myproj/trunk/ myproj
>    [...]
>    Checked out revision 1729.
>    $ cd myproj
>    $ svn up -r 1728 foo.c
>    $ 
> 
> Let us assume that foo.c did not change in r1729 -- in fact, say foo.c
> hasn't changed since r1.  If I now do
> 
>    $ svn cp -m "Make branch."                                    \
>        http://blahblahblah.com/repos/myproj/trunk/               \
>        http://blahblahblah.com/repos/myproj/branches/newbranch/
>    Committed revision 1730.
>    $ 
> 
> ...would we expect to see exactly one path in the 'svn log -v' output
> for r1730, or two -- one add-with-history to create the branch from
> r1729 of trunk, and another to splice foo.c@r1728 into that branch?
> 
> I'm not doing a very good job of articulating what I mean by a truly
> mixed-revision working copy versus a fake one, but I think you see
> what I mean.  In a fake one, those cases where an object's revision
> differs from that of its parent are spurious: were you to update the
> object to its parent's revision, the node revision identity of the
> object wouldn't actually change.
> 
> -Karl

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

Re: "svnlook changed" different for WC->URL and URL->URL copy

Posted by "C. Michael Pilato" <cm...@collab.net>.
I understand what you're talking about.  Two comments:

   - I believe that over ra_local and ra_svn, such not-really-mixed-rev
     working copies would still wind up doing what you would expect
     because libsvn_fs checks to see if a copy would result in no real
     change, and if so, does nothing.  ra_dav has a problem here, in
     that mod_dav flatly hijacks the ability for a copy to overwrite
     an existing object.  (There's an issue in our tracker that covers
     this.)

   - The full "fix" for what you're talking about likely involves the
     Subversion client code doing all the work that the Subversion
     server code does right now to determine if a copy would be a
     no-op.  Trust me -- replicating that logic is a bad idea (for
     performance).

kfogel@collab.net writes:

> "C. Michael Pilato" <cm...@collab.net> writes:
> > Karl, it looks like you've already nailed the probable cause --
> > mixed-revision working copy as the source of the copy.  While doing a
> > WC->URL copy, every time a file or directory's revision differs from
> > that of its parent, that object is transmitted as its own distinct
> > add-with-history operation.  This is the correct behavior for WC->URL
> > copies, though -- not a bug.
> 
> Well, not always, maybe?  There are "real" revision differences and
> "fake" ones.  For example, suppose I do this:
> 
>    $ svn co http://blahblahblah.com/repos/myproj/trunk/ myproj
>    [...]
>    Checked out revision 1729.
>    $ cd myproj
>    $ svn up -r 1728 foo.c
>    $ 
> 
> Let us assume that foo.c did not change in r1729 -- in fact, say foo.c
> hasn't changed since r1.  If I now do
> 
>    $ svn cp -m "Make branch."                                    \
>        http://blahblahblah.com/repos/myproj/trunk/               \
>        http://blahblahblah.com/repos/myproj/branches/newbranch/
>    Committed revision 1730.
>    $ 
> 
> ...would we expect to see exactly one path in the 'svn log -v' output
> for r1730, or two -- one add-with-history to create the branch from
> r1729 of trunk, and another to splice foo.c@r1728 into that branch?
> 
> I'm not doing a very good job of articulating what I mean by a truly
> mixed-revision working copy versus a fake one, but I think you see
> what I mean.  In a fake one, those cases where an object's revision
> differs from that of its parent are spurious: were you to update the
> object to its parent's revision, the node revision identity of the
> object wouldn't actually change.
> 
> -Karl

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

Re: "svnlook changed" different for WC->URL and URL->URL copy

Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> Karl, it looks like you've already nailed the probable cause --
> mixed-revision working copy as the source of the copy.  While doing a
> WC->URL copy, every time a file or directory's revision differs from
> that of its parent, that object is transmitted as its own distinct
> add-with-history operation.  This is the correct behavior for WC->URL
> copies, though -- not a bug.

Well, not always, maybe?  There are "real" revision differences and
"fake" ones.  For example, suppose I do this:

   $ svn co http://blahblahblah.com/repos/myproj/trunk/ myproj
   [...]
   Checked out revision 1729.
   $ cd myproj
   $ svn up -r 1728 foo.c
   $ 

Let us assume that foo.c did not change in r1729 -- in fact, say foo.c
hasn't changed since r1.  If I now do

   $ svn cp -m "Make branch."                                    \
       http://blahblahblah.com/repos/myproj/trunk/               \
       http://blahblahblah.com/repos/myproj/branches/newbranch/
   Committed revision 1730.
   $ 

...would we expect to see exactly one path in the 'svn log -v' output
for r1730, or two -- one add-with-history to create the branch from
r1729 of trunk, and another to splice foo.c@r1728 into that branch?

I'm not doing a very good job of articulating what I mean by a truly
mixed-revision working copy versus a fake one, but I think you see
what I mean.  In a fake one, those cases where an object's revision
differs from that of its parent are spurious: were you to update the
object to its parent's revision, the node revision identity of the
object wouldn't actually change.

-Karl

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

Re: "svnlook changed" different for WC->URL and URL->URL copy

Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> Karl, it looks like you've already nailed the probable cause --
> mixed-revision working copy as the source of the copy.  While doing a
> WC->URL copy, every time a file or directory's revision differs from
> that of its parent, that object is transmitted as its own distinct
> add-with-history operation.  This is the correct behavior for WC->URL
> copies, though -- not a bug.

Well, not always, maybe?  There are "real" revision differences and
"fake" ones.  For example, suppose I do this:

   $ svn co http://blahblahblah.com/repos/myproj/trunk/ myproj
   [...]
   Checked out revision 1729.
   $ cd myproj
   $ svn up -r 1728 foo.c
   $ 

Let us assume that foo.c did not change in r1729 -- in fact, say foo.c
hasn't changed since r1.  If I now do

   $ svn cp -m "Make branch."                                    \
       http://blahblahblah.com/repos/myproj/trunk/               \
       http://blahblahblah.com/repos/myproj/branches/newbranch/
   Committed revision 1730.
   $ 

...would we expect to see exactly one path in the 'svn log -v' output
for r1730, or two -- one add-with-history to create the branch from
r1729 of trunk, and another to splice foo.c@r1728 into that branch?

I'm not doing a very good job of articulating what I mean by a truly
mixed-revision working copy versus a fake one, but I think you see
what I mean.  In a fake one, those cases where an object's revision
differs from that of its parent are spurious: were you to update the
object to its parent's revision, the node revision identity of the
object wouldn't actually change.

-Karl

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

Re: "svnlook changed" different for WC->URL and URL->URL copy

Posted by "C. Michael Pilato" <cm...@collab.net>.
Karl, it looks like you've already nailed the probable cause --
mixed-revision working copy as the source of the copy.  While doing a
WC->URL copy, every time a file or directory's revision differs from
that of its parent, that object is transmitted as its own distinct
add-with-history operation.  This is the correct behavior for WC->URL
copies, though -- not a bug.

kfogel@collab.net writes:

> I'm CC'ing dev@, because this does sound like a bug, and I don't see
> an issue filed on it.
> 
> Mike Pilato, I have a vague recollection that we've talked about this
> problem before... Does it ring a bell?
> 
> <Se...@fujitsu-siemens.com> writes:
> > When copying a working copy to an URL:
> > 
> >     svn copy trunk svn://host/repos/branches/B1,
> > 
> > the command
> > 
> >     svnlook changed -t "$TXN" "$REPOS" >&2
> > 
> > in the pre-commit hook shows the target directory and the files/subdirs
> > therein:
> > 
> >     A   branches/B1/
> >     A   branches/B1/file
> >     A   branches/B1/dir
> >     A   branches/B1/dir/file
> 
> Just to confirm: what's under trunk is a single-revision working copy,
> not a mixed-revision one, right?  I.e., If you do this with a fresh,
> unmodified checkout of trunk, the behavior is the same?
> 
> > But when copying the same tree specified as an URL source:
> > 
> >     svn copy svn://host/repos/trunk svn://host/repos/branches/B1,
> > 
> > just the top directory is shown:
> > 
> >     A   branches/B1/
> > 
> > Is this intended or a bug?  It makes it difficult to set up separate
> > permissions for different paths.  I use svnperm.py and would like to
> > give developers the right to change existing branches, branch
> > maintainers the right to create and remove branches but not to change
> > them, and repository administrators the rights to create top directories
> > like "branches" but not to add any directories or files therein:
> > 
> >     branches/[^/]+/.* = @maintainers(add,remove)
> >     branches/[^/]+/.+ = @developers(add,remove,update)
> >     [^/]+/ = @admins(add,remove)
> > 
> > The permission check for @admins denies the right for a WC->URL copy,
> > but allows an URL->URL copy of a tree into the top level directory:
> > 
> >     svn copy trunk svn://host/repos/B1			# denied
> >     svn copy svn://host/repos/trunk svn://host/repos/B1	# allowed
> 
> I think the semantics of the two operations ought to be the same, and
> that therefore this is a bug.
> 
> -Karl

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

Re: "svnlook changed" different for WC->URL and URL->URL copy

Posted by "C. Michael Pilato" <cm...@collab.net>.
Karl, it looks like you've already nailed the probable cause --
mixed-revision working copy as the source of the copy.  While doing a
WC->URL copy, every time a file or directory's revision differs from
that of its parent, that object is transmitted as its own distinct
add-with-history operation.  This is the correct behavior for WC->URL
copies, though -- not a bug.

kfogel@collab.net writes:

> I'm CC'ing dev@, because this does sound like a bug, and I don't see
> an issue filed on it.
> 
> Mike Pilato, I have a vague recollection that we've talked about this
> problem before... Does it ring a bell?
> 
> <Se...@fujitsu-siemens.com> writes:
> > When copying a working copy to an URL:
> > 
> >     svn copy trunk svn://host/repos/branches/B1,
> > 
> > the command
> > 
> >     svnlook changed -t "$TXN" "$REPOS" >&2
> > 
> > in the pre-commit hook shows the target directory and the files/subdirs
> > therein:
> > 
> >     A   branches/B1/
> >     A   branches/B1/file
> >     A   branches/B1/dir
> >     A   branches/B1/dir/file
> 
> Just to confirm: what's under trunk is a single-revision working copy,
> not a mixed-revision one, right?  I.e., If you do this with a fresh,
> unmodified checkout of trunk, the behavior is the same?
> 
> > But when copying the same tree specified as an URL source:
> > 
> >     svn copy svn://host/repos/trunk svn://host/repos/branches/B1,
> > 
> > just the top directory is shown:
> > 
> >     A   branches/B1/
> > 
> > Is this intended or a bug?  It makes it difficult to set up separate
> > permissions for different paths.  I use svnperm.py and would like to
> > give developers the right to change existing branches, branch
> > maintainers the right to create and remove branches but not to change
> > them, and repository administrators the rights to create top directories
> > like "branches" but not to add any directories or files therein:
> > 
> >     branches/[^/]+/.* = @maintainers(add,remove)
> >     branches/[^/]+/.+ = @developers(add,remove,update)
> >     [^/]+/ = @admins(add,remove)
> > 
> > The permission check for @admins denies the right for a WC->URL copy,
> > but allows an URL->URL copy of a tree into the top level directory:
> > 
> >     svn copy trunk svn://host/repos/B1			# denied
> >     svn copy svn://host/repos/trunk svn://host/repos/B1	# allowed
> 
> I think the semantics of the two operations ought to be the same, and
> that therefore this is a bug.
> 
> -Karl

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