[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Commit bug?

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-01-29 23:14:22 CET

Idea: what if we store a separate "property-revision" for this-dir in
the entries file?

   <entry
      committed-rev="1104"
      property-rev="1105"
      committed-date="Tue 29 Jan 2002 12:51:26 ..."
      name="svn:this_dir"
      url="http://svn.collab.net/repos/svn/trunk"
      last-author="cmpilato"
      kind="dir"
      prop-time="Mon 21 Jan 2002 12:55:54 ..."
      revision="1104"/>

(Btw, we really need to make "svn:this-dir" be "" again sometime soon.)

-K

Branko Čibej <brane@xbc.nu> writes:
> Something's wrong here. How is changing directory properties
> (conceptually!) different from adding a file to a directory? Does a
> directory have to be up-to-date if you want to commit an added file?
>
> I've a feeling this is a bit bogus. A changed property is a change. An
> added file is also a change. When you commit the propchange, and the
> server does the merge between your rev 7 + propchange and rev 8 (which
> is rev 7 + new file), it should either perform the merge and send back
> a delta that tells the client that a file was added, or reject the
> commit because of a conflict.
>
> If the directory did not change between revs 7 and 8, there's no
> reason not to commit the propchange.
>
> I think the current behaviour is a bug -- not in the implementation,
> but in the design.
>
> You have exactly the same situation if what you're trying to do is not
> a propchange, but adding another file to the directory. But in this
> case, we do the right thing:
>
> [brane@SILMARIL s]$ svnadmin create repo
> [brane_at_SILMARIL s]$ svn co file:///repo -d foo
> [brane_at_SILMARIL s]$ svn co file:///repo -d bar
> [brane@SILMARIL s]$ cd foo
> [brane@SILMARIL foo]$ touch a; svn add a; svn ci -m ''
> A a
> Adding s:/foo/a
> Committed revision 1.
> [brane@SILMARIL foo]$ cd ../bar
> [brane@SILMARIL bar]$ touch b; svn add b; svn ci -m ''
> A b
> Adding s:/bar/b
> Committed revision 2.
> [brane@SILMARIL bar]$ svn up
> A ./a
>
>
> See? The update after the commit of revision 2 pulls the file out of
> the repository. Why should SVN behave differently if revision 2 didn't
> add a file to the dir, but only changed a property on the dir?
>
> >This is why we insist on directories being up-to-date when committing
> >properties on them. Any commit will cause the committed item's
> >working revision to be "bumped", but in this case the bump could bring
> >about bad results. We need to make certain guarantees that when a
> >working copy directory is at version X, it actually has the same list
> >of entries (ignoring add/delete schedulings) as DIR:X on the server.
> >
> Well, how do we do it in the above case?
>
> --
> Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
>
>
>
>
> ---------------------------------------------------------------------
> 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
Received on Sat Oct 21 14:37:01 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.