You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2008/01/16 16:37:13 UTC
current tree-conflicts branch status
Hello,
even though everyone has their heads wrapped around getting 1.5 out
the door, I'd like to report that Steve and I have gotten the tree
conflict branch to a milestone: Use cases 1 to 3 are now being handled
in a usable implementation.
Let me explain what this means in practice. Don't be afraid to read on
even if you've never heard of tree conflicts before.
I will try to describe what user-visible changes the tree-conflict
branch implements. Some of the following is copied and slightly adapted
from notes/tree-conflicts/use-cases.txt. See that file for reference
and some illustrative ASCII diagrams.
There are 3 use cases in which the tree-conflict branch's behaviour differs
from trunk's behaviour. I will illustrate the description of the first
use case with some commands and actual output so you can get a fairly good
idea of what the new behaviour looks like without having to checkout and
build the branch yourself. And if you want to see it for yourself no one
is stopping you from checking out the branch.
As usual, any feedback is welcome :)
Feedback on notes/tree-conflicts/detection.txt, which was recently committed
to trunk, would also be great. If you have the time to read it and have a
comment, we would like to hear from you.
-------------------
Use case 1:
Developer A modifies Foo.c and commits it to the repository.
$ cat Foo.c
foo
$ echo "Foo.c as modified by A" > Foo.c
$ svn ci -m "modified Foo.c"
Developer B has simultaneously moved Foo.c to Bar.c in his working
copy.
$ svn move Foo.c Bar.c
A Bar.c
D Foo.c
$ svn ci -m "renamed Foo.c to Bar.c"
Adding Bar.c
Deleting Foo.c
svn: Commit failed (details follow):
svn: File '/Foo.c' is out of date
B cannot commit because the working copy is out of date,
so B runs 'svn update'.
This is what now happens on current trunk (old behaviour):
The update will apply A's modifications to Foo.c in the
repository to Foo.c in B's working copy.
$ svn update
U Foo.c
Updated to revision 2.
Note again that Foo.c is marked for deletion in B's working copy.
So A's modification has been applied to a file marked as locally deleted.
The 'U Foo.c' may have escaped B especially if the update touches a lot
of files. B now does a commit.
$ svn ci -m "renamed Foo.c to Bar.c"
Adding Bar.c
Deleting Foo.c
Committed revision 3.
A's modification of Foo.c will effectively be reverted by B's new
revision. Foo.c will be deleted in the new revision, and Bar.c will be
added with the content of the original Foo.c before A's modifications.
Hence A will likely get angry with B.
Had B run "svn diff" before committing, he may have seen this:
$ svn diff Foo.c
Index: Foo.c
===================================================================
--- Foo.c (revision 2)
+++ Foo.c (working copy)
@@ -1 +0,0 @@
-Foo.c as modified by A
This is what happens on the tree conflict branch instead (new behaviour):
The update will apply A's modifications to Foo.c in the
repository to Foo.c in B's working copy. It will also put
the directory containing Foo.c into a state of conflict.
$ svn update
U Foo.c
C .
Updated to revision 2.
Note again that Foo.c is marked for deletion in B's working copy.
So A's modification has been applied to a file marked as locally deleted.
B now tries to do a commit, but the commit fails.
$ svn ci -m "renamed Foo.c to Bar.c"
svn: Commit failed (details follow):
svn: Aborting commit: '/tmp/wcB' remains in conflict
(Here, /tmp/wcB happens to be the working copy root, but a tree conflict
may be anchored at any directory in the working copy.)
B can now run "svn info" on the tree-conflicted directory to inquire
about the conflict, and decide what action to take to resolve it, possibly
discussing the proper fix with A.
$ svn info /tmp/wcB
Path: /tmp/wcB
URL: file:///tmp/repo
Repository Root: file:///tmp/repo
Repository UUID: eb86d84e-d4f0-407f-a0df-a893da9c5563
Revision: 2
Node Kind: directory
Schedule: normal
Last Changed Author: stsp
Last Changed Rev: 2
Last Changed Date: 2008-01-16 16:31:37 +0100 (Wed, 16 Jan 2008)
Tree conflicts:
The update edited the file 'Foo.c'.
You have deleted 'Foo.c' locally.
Maybe you renamed it?
Note the last few lines in the output. (Whether this is the right
place to put this information, and whether it has the right format
is still open for debate. See http://svn.haxx.se/dev/archive-2008-01/0098.shtml)
Once B has resolved the tree conflict, e.g. by moving the local
modifications made to the locally deleted Foo.c to Bar.c, B runs
"svn resolved" on the tree-conflicted directory.
$ svn diff Foo.c
Index: Foo.c
===================================================================
--- Foo.c (revision 2)
+++ Foo.c (working copy)
@@ -1 +0,0 @@
-Foo.c as modified by A
$ cat Bar.c
foo
$ echo "Bar.c as modified by A" > Bar.c
$ svn diff
Index: Foo.c
===================================================================
--- Foo.c (revision 2)
+++ Foo.c (working copy)
@@ -1 +0,0 @@
-Foo.c as modified by A
Index: Bar.c
===================================================================
--- Bar.c (revision 1)
+++ Bar.c (working copy)
@@ -1 +1 @@
-foo
+Bar.c as modified by A
Property changes on: Bar.c
___________________________________________________________________
Added: svn:mergeinfo
$ svn resolved /tmp/wcB
Resolved conflicted state of '/tmp/wcB'
B now does a commit. Barring no other conflicts (of any kind)
the commit will succeed.
$ svn ci -m "renamed Foo.c to Bar.c"
Adding Bar.c
Deleting Foo.c
Transmitting file data .
Committed revision 3.
-------------------
Use case 2:
Developer B modifies Foo.c in his working copy.
Developer A has simultaneously moved Foo.c to Bar.c and commits
the move to the repository.
B cannot commit because his working copy is out of date, so B runs
'svn update'.
This is what now happens on current trunk (old behaviour):
The update will add Bar.c (with the same content as the original Foo.c)
to B's working copy, and delete Foo.c from B's working copy.
Since B made local modifications to Foo.c, it will not be deleted from
disk but left behind unversioned.
B's source tree in the working copy likely builds fine because Foo.c
is still present on disk.
Assuming B does not notice that Foo.c fell out of version control,
an incomplete change set may get committed, possibly breaking the tree.
This is what happens on the tree conflict branch instead (new behaviour):
The update will add Bar.c (with the same content as the original Foo.c)
to B's working copy, and delete Foo.c from B's working copy.
The directory containing Foo.c will be put in a state of conflict.
Since B made local modifications to Foo.c, it will not be deleted from
disk but left behind unversioned.
B's source tree in the working copy likely builds fine because Foo.c
is still present on disk.
B now tries to do a commit, but the commit fails because of the
tree-conflicted directory.
B can now run "svn info" on the tree-conflicted directory to inquire
about the conflict, and decide what action to take to resolve it.
Once B has resolved the tree conflict, B runs "svn resolved" on the
tree-conflicted directory.
B now does a commit. Barring no other conflicts (of any kind)
the commit will succeed.
-------------------
Use case 3:
Developer A moves Foo.c to Bar.c and commits the move to the repository.
Developer B has moved Foo.c to Bix.c in his working copy.
B cannot commit because his working copy is out of date, so B runs
'svn update'.
This is what now happens on current trunk (old behaviour):
The update will add Bar.c to B's working copy and
delete Foo.c from B's working copy (the latter is a no-op).
B now does a commit.
After B's commit, the content of the original Foo.c will exist
twice in the source tree under two different paths, namely Bar.c
and Bix.c, respectively.
This is what happens on the tree conflict branch instead (new behaviour):
The update will add Bar.c to B's working copy and
delete Foo.c from B's working copy (the latter is a no-op).
The directory containing Foo.c will be put in a state of conflict.
B now tries to do a commit, but the commit fails because of the
tree-conflicted directory.
B can now run "svn info" on the tree-conflicted directory to inquire
about the conflict, and decide what action to take to resolve it.
Once B has resolved the tree conflict, B runs "svn resolved" on the
tree-conflicted directory.
B now does a commit. Barring no other conflicts (of any kind)
the commit will succeed.
--
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: current tree-conflicts branch status
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jan 17, 2008 at 03:40:24PM -0500, David Glasser wrote:
> On Jan 17, 2008 8:59 AM, Stefan Sperling <st...@elego.de> wrote:
> > On Wed, Jan 16, 2008 at 10:10:16PM +0100, Stefan Küng wrote:
> > >> I am not happy at all either with the current commit error message
> > >> of the CLI client. It should at least point the user where to get more
> > >> information. This applies to all conflicts.
> > >
> > > One think I don't quite understand: why is there such a limit in the svn
> > > client? Is this documented somewhere?
> >
> > http://subversion.tigris.org/hacking.html#error-messages
>
> That says 70 characters, not 50. And we have broken the newline rule
> before; see libsvn_wc/questions.c(compare_and_verify and
> svn_wc__check_format), say.
Right, so printing "run command xyz to get more information"
as a seperate line in an error message should be OK?
And what about including potentially rather long multi-line tree conflict
descriptions in error messages? Like the ones that are currently also
shown by "svn info" on the tree-conflicts branch?
--
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: current tree-conflicts branch status
Posted by David Glasser <gl...@davidglasser.net>.
On Jan 17, 2008 8:59 AM, Stefan Sperling <st...@elego.de> wrote:
> On Wed, Jan 16, 2008 at 10:10:16PM +0100, Stefan Küng wrote:
> >> I am not happy at all either with the current commit error message
> >> of the CLI client. It should at least point the user where to get more
> >> information. This applies to all conflicts.
> >
> > One think I don't quite understand: why is there such a limit in the svn
> > client? Is this documented somewhere?
>
> http://subversion.tigris.org/hacking.html#error-messages
That says 70 characters, not 50. And we have broken the newline rule
before; see libsvn_wc/questions.c(compare_and_verify and
svn_wc__check_format), say.
--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: current tree-conflicts branch status
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jan 16, 2008 at 10:10:16PM +0100, Stefan Küng wrote:
>> I am not happy at all either with the current commit error message
>> of the CLI client. It should at least point the user where to get more
>> information. This applies to all conflicts.
>
> One think I don't quite understand: why is there such a limit in the svn
> client? Is this documented somewhere?
http://subversion.tigris.org/hacking.html#error-messages
>> On the other hand the current style assumes that users have read the book.
>
> But that's a wrong assumption. I can guarantee you that most users don't
> read the book.
Quite possibly.
>> This is a good thing, too. It means that users are expected to already know
>> what a conflict is and how to deal with it when they see the error message.
>
> You're expecting way too much from your users.
I'm not. I was just saying that the current style of error messages
seems to expect educated users. And I said that I would prefer the
error messages to be more user friendly, too.
> For example, I know what a conflict is - after all I'm using Subversion
> (TSVN) since the early days. But when I saw your examples on how tree
> conflicts are now handled, I was a little bit confused about what to do to
> resolve that conflict. Only when I saw the output from 'svn info' in your
> example I knew what to do. But without that, I had no idea - it wasn't the
> file itself that was in conflict but the tree.
Yes, if the file itself was in conflict it would be a text or property
conflict. Note that text and property conflicts can mix with tree
conflicts. If you run 'svn resolved' on a directory that has both
a property conflict and a tree conflict, both conflicts are resolved.
>>> I would even suggest to drop the limit of the error messages, and in the
>>> svn client then simply drop whatever comes after a newline. That way, the
>>> svn library doesn't have that limitation and only the svn client limits
>>> itself (and not all other clients too) to 50 chars and no newlines.
So you suggest that instead of printing the tree conflict descriptions
from "svn status", they get printed in the error message? Or maybe both?
>> I think it would help if clients consistently showed the same or at
>> least very similar error messages.
>
> Well, yes, that would be good. But limit all clients just because one
> client can't handle long messages and/or newlines?
> All I'm asking for is that you should not put the limit in the library but
> only where it applies: in the svn command line client.
See the hacker's guide link above. This issue needs to be discussed
seperately from tree conflicts IMO.
--
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: current tree-conflicts branch status
Posted by Stefan Küng <to...@gmail.com>.
Stefan Sperling wrote:
> On Wed, Jan 16, 2008 at 07:12:14PM +0100, Stefan Küng wrote:
>>> The all-too-brief "remains in conflict" error message is currently used in
>>> the case of text or property conflicts, so we use it too.
>>>
>>> That said, we're open to suggestions for a better way to supply the full
>>> conflict description to clients.
>> In that case, I suggest adding some boolean flag when a commit fails and
>> has more information available so other clients which don't have the 50
>> char limitation can get the 'extended' error message, and of course a
>> documented way to get the extended error message.
>
> There is an API that clients can use to get tree conflict descriptions.
> So they can present them to the user any time they see fit.
>
> Quoting subversion/include/svn_wc.h on the tree-conflicts branch:
>
> /**
> * Read tree conflict descriptions from @a dir_entry.
> * Append pointers to newly allocated svn_wc_conflict_description_t
> * objects to the array pointed to by @a conflicts.
> * Do all allocations in @a pool.
> *
> * @since New in 1.6.
> */
> svn_error_t *
> svn_wc_read_tree_conflicts_from_entry(apr_array_header_t *conflicts,
> const svn_wc_entry_t *dir_entry,
> apr_pool_t *pool);
>
> /**
> * Append to @a descriptions a possibly localized human readable
> * description of a tree conflict described by @a conflict.
> *
> * @since New in 1.6.
> */
> svn_error_t *
> svn_wc_append_human_readable_tree_conflict_description(
> svn_stringbuf_t *descriptions,
> svn_wc_conflict_description_t *conflict,
> apr_pool_t *pool);
>
> This API is used by the CLI client and should provide all you need
> to present tree conflict descriptions in TortoiseSVN.
Looks ok.
But how about a function that appends that description to an svn_error_t
object? I could then use that function to append the 'human readable
tree conflict description' to the commit error object before I show it
to the user.
And of course, there has to be an easy way to know from a failed commit
(from the error object) that I should use those API's to get more
information about the failed commit.
>> I don't think it's a good idea to strip very good features just because the
>> command line client (one client among many others) can't handle it.
>
> I am not happy at all either with the current commit error message
> of the CLI client. It should at least point the user where to get more
> information. This applies to all conflicts.
One think I don't quite understand: why is there such a limit in the svn
client? Is this documented somewhere?
The reason I'm asking: pre-commit hook scripts can return an error
string too which is then shown in the client. And I have seen such
scripts which return strings that are much longer than 50 chars and even
contain newlines. At least with TSVN, those are shown correctly (haven't
tested with the svn client though).
> On the other hand the current style assumes that users have read the book.
But that's a wrong assumption. I can guarantee you that most users don't
read the book.
> This is a good thing, too. It means that users are expected to already know
> what a conflict is and how to deal with it when they see the error message.
You're expecting way too much from your users.
For example, I know what a conflict is - after all I'm using Subversion
(TSVN) since the early days. But when I saw your examples on how tree
conflicts are now handled, I was a little bit confused about what to do
to resolve that conflict. Only when I saw the output from 'svn info' in
your example I knew what to do. But without that, I had no idea - it
wasn't the file itself that was in conflict but the tree.
Now think about other users. They upgrade their svn client to the new
version, and one day they get a conflict. They try to resolve the
conflict as they did before (maybe they've even read the book before,
but not the new version which explains tree conflicts), but that doesn't
work. They try some more, start fiddling around the working copy, maybe
even inside the .svn folders (yes, users do that first, *then* ask on
the mailing list or read the docs) - and we have to deal with the mess.
>> I would even suggest to drop the limit of the error messages, and in the
>> svn client then simply drop whatever comes after a newline. That way, the
>> svn library doesn't have that limitation and only the svn client limits
>> itself (and not all other clients too) to 50 chars and no newlines.
>
> I think it would help if clients consistently showed the same or at
> least very similar error messages.
Well, yes, that would be good. But limit all clients just because one
client can't handle long messages and/or newlines?
All I'm asking for is that you should not put the limit in the library
but only where it applies: in the svn command line client.
My guess is that this limit comes from some console limitations. But all
other svn clients are not for the console and therefore don't have such
a limit. Let those clients have the much better error messages which
explain things better, and let the command line client deal with its own
limit.
If you need some analogy: if you write an image viewer for old computers
with only 8MB RAM, would you still keep that limit even if your app
would run on a modern computer? Would you reject showing an image which
requires 20MB RAM to show even though the modern PC has 1GB of free
memory available? Of course not! You would apply the limit only where it
occurs, not everywhere.
Another thing to remember: even the svn command line client sometimes
appends its own help text to error messages (e.g., 'run the cleanup
command' after a command failed due to a locked wc).
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: current tree-conflicts branch status
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jan 16, 2008 at 07:12:14PM +0100, Stefan Küng wrote:
>> The all-too-brief "remains in conflict" error message is currently used in
>> the case of text or property conflicts, so we use it too.
>>
>> That said, we're open to suggestions for a better way to supply the full
>> conflict description to clients.
>
> In that case, I suggest adding some boolean flag when a commit fails and
> has more information available so other clients which don't have the 50
> char limitation can get the 'extended' error message, and of course a
> documented way to get the extended error message.
There is an API that clients can use to get tree conflict descriptions.
So they can present them to the user any time they see fit.
Quoting subversion/include/svn_wc.h on the tree-conflicts branch:
/**
* Read tree conflict descriptions from @a dir_entry.
* Append pointers to newly allocated svn_wc_conflict_description_t
* objects to the array pointed to by @a conflicts.
* Do all allocations in @a pool.
*
* @since New in 1.6.
*/
svn_error_t *
svn_wc_read_tree_conflicts_from_entry(apr_array_header_t *conflicts,
const svn_wc_entry_t *dir_entry,
apr_pool_t *pool);
/**
* Append to @a descriptions a possibly localized human readable
* description of a tree conflict described by @a conflict.
*
* @since New in 1.6.
*/
svn_error_t *
svn_wc_append_human_readable_tree_conflict_description(
svn_stringbuf_t *descriptions,
svn_wc_conflict_description_t *conflict,
apr_pool_t *pool);
This API is used by the CLI client and should provide all you need
to present tree conflict descriptions in TortoiseSVN.
> I don't think it's a good idea to strip very good features just because the
> command line client (one client among many others) can't handle it.
I am not happy at all either with the current commit error message
of the CLI client. It should at least point the user where to get more
information. This applies to all conflicts.
On the other hand the current style assumes that users have read the book.
This is a good thing, too. It means that users are expected to already know
what a conflict is and how to deal with it when they see the error message.
> I would even suggest to drop the limit of the error messages, and in the
> svn client then simply drop whatever comes after a newline. That way, the
> svn library doesn't have that limitation and only the svn client limits
> itself (and not all other clients too) to 50 chars and no newlines.
I think it would help if clients consistently showed the same or at
least very similar error messages.
--
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: current tree-conflicts branch status
Posted by Stefan Küng <to...@gmail.com>.
Stephen Butler wrote:
> Quoting Stefan Küng <to...@gmail.com>:
>
>> Stefan Sperling wrote:
>> [snip]
>
>>> B can now run "svn info" on the tree-conflicted directory to
>>> inquire
>>> about the conflict, and decide what action to take to resolve it,
>>> possibly
>>> discussing the proper fix with A.
>>>
>>> $ svn info /tmp/wcB
>>> Path: /tmp/wcB
>>> URL: file:///tmp/repo
>>> Repository Root: file:///tmp/repo
>>> Repository UUID: eb86d84e-d4f0-407f-a0df-a893da9c5563
>>> Revision: 2
>>> Node Kind: directory
>>> Schedule: normal
>>> Last Changed Author: stsp
>>> Last Changed Rev: 2
>>> Last Changed Date: 2008-01-16 16:31:37 +0100 (Wed, 16 Jan 2008)
>>> Tree conflicts:
>>> The update edited the file 'Foo.c'.
>>> You have deleted 'Foo.c' locally.
>>> Maybe you renamed it?
>>>
>>> Note the last few lines in the output. (Whether this is the right
>>> place to put this information, and whether it has the right format
>>> is still open for debate. See
>>> http://svn.haxx.se/dev/archive-2008-01/0098.shtml)
>>
>> Why does only 'svn info' show the hint? I would prefer if that hint
>> would be shown in the failed commit. After all, that's what the user
>> wanted to do and failed, and showing the user *why* it failed should be
>> done in the commit error message.
>>
>> I guess I could do that in TSVN by calling svn_client_info() after a
>> failed commit, but I think most clients would want that info in the
>> error message, so IMHO it should be done in the svn library.
>
> Hi Stefan,
>
> Our original plan was to write the human-readable descriptions of all the
> tree conflicts in the commit error message.
>
> Unfortunately the svn client's error messages are not allowed to exceed
> 50 characters, and newlines are forbidden, so we had to find another
> place to
> write the text.
>
> The all-too-brief "remains in conflict" error message is currently used in
> the case of text or property conflicts, so we use it too.
>
> That said, we're open to suggestions for a better way to supply the full
> conflict description to clients.
In that case, I suggest adding some boolean flag when a commit fails and
has more information available so other clients which don't have the 50
char limitation can get the 'extended' error message, and of course a
documented way to get the extended error message.
I don't think it's a good idea to strip very good features just because
the command line client (one client among many others) can't handle it.
I would even suggest to drop the limit of the error messages, and in the
svn client then simply drop whatever comes after a newline. That way,
the svn library doesn't have that limitation and only the svn client
limits itself (and not all other clients too) to 50 chars and no newlines.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: current tree-conflicts branch status
Posted by Stephen Butler <sb...@elego.de>.
Quoting Stefan Küng <to...@gmail.com>:
> Stefan Sperling wrote:
> [snip]
>> B can now run "svn info" on the tree-conflicted directory to inquire
>> about the conflict, and decide what action to take to resolve it, possibly
>> discussing the proper fix with A.
>>
>> $ svn info /tmp/wcB
>> Path: /tmp/wcB
>> URL: file:///tmp/repo
>> Repository Root: file:///tmp/repo
>> Repository UUID: eb86d84e-d4f0-407f-a0df-a893da9c5563
>> Revision: 2
>> Node Kind: directory
>> Schedule: normal
>> Last Changed Author: stsp
>> Last Changed Rev: 2
>> Last Changed Date: 2008-01-16 16:31:37 +0100 (Wed, 16 Jan 2008)
>> Tree conflicts:
>> The update edited the file 'Foo.c'.
>> You have deleted 'Foo.c' locally.
>> Maybe you renamed it?
>>
>> Note the last few lines in the output. (Whether this is the right
>> place to put this information, and whether it has the right format
>> is still open for debate. See
>> http://svn.haxx.se/dev/archive-2008-01/0098.shtml)
>
> Why does only 'svn info' show the hint? I would prefer if that hint
> would be shown in the failed commit. After all, that's what the user
> wanted to do and failed, and showing the user *why* it failed should be
> done in the commit error message.
>
> I guess I could do that in TSVN by calling svn_client_info() after a
> failed commit, but I think most clients would want that info in the
> error message, so IMHO it should be done in the svn library.
Hi Stefan,
Our original plan was to write the human-readable descriptions of all the
tree conflicts in the commit error message.
Unfortunately the svn client's error messages are not allowed to
exceed 50 characters, and newlines are forbidden, so we had to find
another place to
write the text.
The all-too-brief "remains in conflict" error message is currently used in
the case of text or property conflicts, so we use it too.
That said, we're open to suggestions for a better way to supply the full
conflict description to clients.
Regards,
Steve
--
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: current tree-conflicts branch status
Posted by Stefan Küng <to...@gmail.com>.
Stefan Sperling wrote:
[snip]
> This is what happens on the tree conflict branch instead (new behaviour):
>
> The update will apply A's modifications to Foo.c in the
> repository to Foo.c in B's working copy. It will also put
> the directory containing Foo.c into a state of conflict.
>
> $ svn update
> U Foo.c
> C .
> Updated to revision 2.
>
> Note again that Foo.c is marked for deletion in B's working copy.
> So A's modification has been applied to a file marked as locally deleted.
>
> B now tries to do a commit, but the commit fails.
>
> $ svn ci -m "renamed Foo.c to Bar.c"
> svn: Commit failed (details follow):
> svn: Aborting commit: '/tmp/wcB' remains in conflict
>
> (Here, /tmp/wcB happens to be the working copy root, but a tree conflict
> may be anchored at any directory in the working copy.)
>
> B can now run "svn info" on the tree-conflicted directory to inquire
> about the conflict, and decide what action to take to resolve it, possibly
> discussing the proper fix with A.
>
> $ svn info /tmp/wcB
> Path: /tmp/wcB
> URL: file:///tmp/repo
> Repository Root: file:///tmp/repo
> Repository UUID: eb86d84e-d4f0-407f-a0df-a893da9c5563
> Revision: 2
> Node Kind: directory
> Schedule: normal
> Last Changed Author: stsp
> Last Changed Rev: 2
> Last Changed Date: 2008-01-16 16:31:37 +0100 (Wed, 16 Jan 2008)
> Tree conflicts:
> The update edited the file 'Foo.c'.
> You have deleted 'Foo.c' locally.
> Maybe you renamed it?
>
> Note the last few lines in the output. (Whether this is the right
> place to put this information, and whether it has the right format
> is still open for debate. See http://svn.haxx.se/dev/archive-2008-01/0098.shtml)
Why does only 'svn info' show the hint? I would prefer if that hint
would be shown in the failed commit. After all, that's what the user
wanted to do and failed, and showing the user *why* it failed should be
done in the commit error message.
I guess I could do that in TSVN by calling svn_client_info() after a
failed commit, but I think most clients would want that info in the
error message, so IMHO it should be done in the svn library.
[snip]
> This is what happens on the tree conflict branch instead (new behaviour):
>
> The update will add Bar.c (with the same content as the original Foo.c)
> to B's working copy, and delete Foo.c from B's working copy.
>
> The directory containing Foo.c will be put in a state of conflict.
>
> Since B made local modifications to Foo.c, it will not be deleted from
> disk but left behind unversioned.
>
> B's source tree in the working copy likely builds fine because Foo.c
> is still present on disk.
>
> B now tries to do a commit, but the commit fails because of the
> tree-conflicted directory.
>
> B can now run "svn info" on the tree-conflicted directory to inquire
> about the conflict, and decide what action to take to resolve it.
Again, why not just show the hint text of 'svn info' in the commit error
message?
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: current tree-conflicts branch status
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jan 28, 2008 at 09:18:59PM +0000, Julian Foad wrote:
>> I will try to describe what user-visible changes the tree-conflict
>> branch implements. Some of the following is copied and slightly adapted
>> from notes/tree-conflicts/use-cases.txt. See that file for reference
>> and some illustrative ASCII diagrams.
>
> Stefan,
>
> Thank you for this very clear explanation of what you have done.
No problem :)
> In these three use cases (file-rename conflicts during an update) you have
> successfully detected the conflict, reported it to the user, and made sure
> that a commit cannot occur until it has been marked as resolved.
>
> There is more work to do, of course, but do you know of any problems with
> your current implementation (other than the reporting of messages which
> Stefan Küng commented on) that would make it unsuitable for merging into
> the trunk?
This patch by Steve is an important bug fix for us and needs to be
reviewed and committed to trunk as time permits:
http://svn.haxx.se/dev/archive-2008-01/0601.shtml
I believe Steve is currently working on fixing another issue
on the tree-conflicts branch which involves working copy curruption,
I'll leave it to him to post further details on this one.
In any case, I think we should would wait with merging the tree
conflict branch into trunk at least until 1.5 is branched, and
I guess most developers agree with me on this one (especially
those trying to finally get it out the door ;)
--
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: current tree-conflicts branch status
Posted by Julian Foad <ju...@btopenworld.com>.
Stefan Sperling wrote:
> even though everyone has their heads wrapped around getting 1.5 out
> the door, I'd like to report that Steve and I have gotten the tree
> conflict branch to a milestone: Use cases 1 to 3 are now being handled
> in a usable implementation.
>
> Let me explain what this means in practice. Don't be afraid to read on
> even if you've never heard of tree conflicts before.
>
> I will try to describe what user-visible changes the tree-conflict
> branch implements. Some of the following is copied and slightly adapted
> from notes/tree-conflicts/use-cases.txt. See that file for reference
> and some illustrative ASCII diagrams.
Stefan,
Thank you for this very clear explanation of what you have done.
In these three use cases (file-rename conflicts during an update) you have
successfully detected the conflict, reported it to the user, and made sure that
a commit cannot occur until it has been marked as resolved.
There is more work to do, of course, but do you know of any problems with your
current implementation (other than the reporting of messages which Stefan Küng
commented on) that would make it unsuitable for merging into the trunk?
- Julian
> Feedback on notes/tree-conflicts/detection.txt, which was recently committed
> to trunk, would also be great. If you have the time to read it and have a
> comment, we would like to hear from you.
>
> -------------------
>
> Use case 1:
>
> Developer A modifies Foo.c and commits it to the repository.
[...]
> Developer B has simultaneously moved Foo.c to Bar.c in his working
> copy.
[...]
> B cannot commit because the working copy is out of date,
> so B runs 'svn update'.
[...]
> This is what happens on the tree conflict branch instead (new behaviour):
[...]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org