You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Norbert Unterberg <ne...@gmx.net> on 2005/05/04 21:27:08 UTC

Bug or feature: added file with conflict not shown as conflict

Today I fell over some strange behaviour with TortoiseSVN, so I retried 
the operations with SVN and got the same results.

When you have an added file that has a non-resolved conflict, the 
conflicted state is not shown. This state can happen when you merge 
changes from one branch to another.

Here is a recipe (run under windows from folder d:/test/bt):

-----snip-----
if exist repo rd /s /q repo
if exist wc   rd /s /q wc

svnadmin create repo
svn co file:///d:/test/bt/repo wc
cd wc
md branch1
md branch2
svn add branch1 branch2
svn ci . -m "created test branches"
echo line1 > branch1\test.txt
svn add branch1\test.txt
svn ci branch1 -m "created test file"
echo line2 >> branch1\test.txt
svn ci branch1 -m "added Line2"
svn up .

cd branch2
svn merge -r1:2 ..\branch1
svn st
echo Line2 test >> test.txt
svn merge -r2:3 ..\branch1
svn ci -m "try to commit"
-----snip-----

This gives an error:
svn: Commit failed (details follow):
svn: Aborting commit: 'D:\test\bt\wc\branch2\test.txt' remains in conflict

But "svn st test.txt" still displays:

A  +   test.txt

I would suggest that the conflicted state overrides the added state, so 
the file should display as "C". And since the file's state is not 
reported as conflicted, TortoiseSVN does not show the "Resolved" menu.

Bug or Feature?

Norbert


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

Re: Bug or feature: added file with conflict not shown as conflict

Posted by Ben Collins-Sussman <su...@collab.net>.
On May 11, 2005, at 12:54 PM, Philip Martin wrote:

> Julian Foad <ju...@btopenworld.com> writes:
>
>
>> Ping!  Can anyone comment?
>>
>> - Julian
>>
>>
>> Norbert Unterberg wrote:
>>
>>> Today I fell over some strange behaviour with TortoiseSVN, so I
>>> retried the operations with SVN and got the same results.
>>> When you have an added file that has a non-resolved conflict, the
>>> conflicted state is not shown. This state can happen when you merge
>>> changes from one branch to another.
>>>
>
> Yes, I tend to agree that we should show 'C' rather than 'A'.
>
> The svn_wc_status_kind enum makes svn_wc_status_conflicted and
> svn_wc_status_added mutually exclusive, and svn_wc_status prefers add
> over conflicted.  I suppose we could reverse that to make
> svn_wc_status prefer conflicted over add, then the client would show
> 'C' rather than 'A'.
>
> It might be better to add a new enum value to indicate both added and
> conflicted, and let the caller make the decision about how to display
> it (potentially showing some currently unused letter).  I'm not sure
> whether that would qualify as an ABI change, old clients would get a
> value they don't know how to interpret e.g. a 1.2 svn binary using
> such a library would show '?'.


Should we file this as a bug?  It seems like it to me.


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

Re: Bug or feature: added file with conflict not shown as conflict

Posted by Philip Martin <ph...@codematters.co.uk>.
Julian Foad <ju...@btopenworld.com> writes:

> Ping!  Can anyone comment?
>
> - Julian
>
>
> Norbert Unterberg wrote:
>> Today I fell over some strange behaviour with TortoiseSVN, so I
>> retried the operations with SVN and got the same results.
>> When you have an added file that has a non-resolved conflict, the
>> conflicted state is not shown. This state can happen when you merge
>> changes from one branch to another.

Yes, I tend to agree that we should show 'C' rather than 'A'.

The svn_wc_status_kind enum makes svn_wc_status_conflicted and
svn_wc_status_added mutually exclusive, and svn_wc_status prefers add
over conflicted.  I suppose we could reverse that to make
svn_wc_status prefer conflicted over add, then the client would show
'C' rather than 'A'.

It might be better to add a new enum value to indicate both added and
conflicted, and let the caller make the decision about how to display
it (potentially showing some currently unused letter).  I'm not sure
whether that would qualify as an ABI change, old clients would get a
value they don't know how to interpret e.g. a 1.2 svn binary using
such a library would show '?'.

-- 
Philip Martin

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

Re: Bug or feature: added file with conflict not shown as conflict

Posted by Julian Foad <ju...@btopenworld.com>.
Ping!  Can anyone comment?

- Julian


Norbert Unterberg wrote:
> Today I fell over some strange behaviour with TortoiseSVN, so I retried 
> the operations with SVN and got the same results.
> 
> When you have an added file that has a non-resolved conflict, the 
> conflicted state is not shown. This state can happen when you merge 
> changes from one branch to another.
> 
> Here is a recipe (run under windows from folder d:/test/bt):
> 
> -----snip-----
> if exist repo rd /s /q repo
> if exist wc   rd /s /q wc
> 
> svnadmin create repo
> svn co file:///d:/test/bt/repo wc
> cd wc
> md branch1
> md branch2
> svn add branch1 branch2
> svn ci . -m "created test branches"
> echo line1 > branch1\test.txt
> svn add branch1\test.txt
> svn ci branch1 -m "created test file"
> echo line2 >> branch1\test.txt
> svn ci branch1 -m "added Line2"
> svn up .
> 
> cd branch2
> svn merge -r1:2 ..\branch1
> svn st
> echo Line2 test >> test.txt
> svn merge -r2:3 ..\branch1
> svn ci -m "try to commit"
> -----snip-----
> 
> This gives an error:
> svn: Commit failed (details follow):
> svn: Aborting commit: 'D:\test\bt\wc\branch2\test.txt' remains in conflict
> 
> But "svn st test.txt" still displays:
> 
> A  +   test.txt
> 
> I would suggest that the conflicted state overrides the added state, so 
> the file should display as "C". And since the file's state is not 
> reported as conflicted, TortoiseSVN does not show the "Resolved" menu.
> 
> Bug or Feature?
> 
> Norbert


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