You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Pavel Lyalyakin via dev <de...@subversion.apache.org> on 2022/11/20 18:15:26 UTC

Tree conflict resolution removes unversioned files from the working copy

Hello,

As reported in this users@ thread[1][2], it appears that running `svn
update` can silently remove unversioned files in the working copy when
automatically resolving a tree conflict. Note that when I run `svn update`
with the `--accept postpone` option, the unversioned file remains in the
working copy.

Should I create a ticket in Jira? I have a reproduction script for Windows
and macOS. I guess that the macOS script also works on Linux.

Windows:

svn, version 1.14.2 (r1899510)
   compiled Aug 12 2022, 12:55:13 on x86_64-microsoft-windows6.2.9200
[[[
mkdir C:\marcel-bug-report
svnadmin create C:\marcel-bug-report\MyRepo
svn mkdir file:///C:/marcel-bug-report/MyRepo/MyDir -m "Adding a new
directory"

svn checkout file:///C:/marcel-bug-report/MyRepo/
C:\marcel-bug-report\working-copy-one
echo foo > C:\marcel-bug-report\working-copy-one\MyDir\myfile.txt
svn add C:\marcel-bug-report\working-copy-one\MyDir\myfile.txt
svn commit C:\marcel-bug-report\working-copy-one\ -m "Adding a new file"
echo bar > C:\marcel-bug-report\working-copy-one\MyDir\myfile.txt
echo baz > C:\marcel-bug-report\working-copy-one\MyDir\unversionedfile.txt

svn move file:///C:/marcel-bug-report/MyRepo/MyDir
file:///C:/marcel-bug-report/MyRepo/RenamedDir -m "Renaming a directory"

svn update C:\marcel-bug-report\working-copy-one
]]]

macOS

svn, version 1.14.2 (r1899510)
   compiled Apr 13 2022, 14:56:48 on arm-apple-darwin21.3.0
[[[
mkdir $HOME/marcel-bug-report
svnadmin create $HOME/marcel-bug-report/MyRepo
svn mkdir file:///$HOME/marcel-bug-report/MyRepo/MyDir -m "Adding a new
directory"

svn checkout file:///$HOME/marcel-bug-report/MyRepo/
$HOME/marcel-bug-report/working-copy-one
echo foo > $HOME/marcel-bug-report/working-copy-one/MyDir/myfile.txt
svn add $HOME/marcel-bug-report/working-copy-one/MyDir/myfile.txt
svn commit $HOME/marcel-bug-report/working-copy-one/ -m "Adding a new file"
echo bar > $HOME/marcel-bug-report/working-copy-one/MyDir/myfile.txt
echo baz >
$HOME/marcel-bug-report/working-copy-one/MyDir/unversionedfile.txt

svn move file:///$HOME/marcel-bug-report/MyRepo/MyDir
file:///$HOME/marcel-bug-report/MyRepo/RenamedDir -m "Renaming a directory"

svn update $HOME/marcel-bug-report/working-copy-one/
]]]

Thank you.

[1]: https://lists.apache.org/thread/qmg6xqs5xpjr6kyhblwxvnhykobxwm8x
[2]: https://lists.apache.org/thread/phpotj6pvvcmlt1vx9y7lbn6vof0d6y2

-- 
With best regards,
Pavel Lyalyakin
VisualSVN Team

Re: Tree conflict resolution removes unversioned files from the working copy

Posted by Pavel Lyalyakin via dev <de...@subversion.apache.org>.
On Sun, Nov 20, 2022 at 10:42 PM Daniel Sahlberg <
daniel.l.sahlberg@gmail.com> wrote:

> Den sön 20 nov. 2022 kl 19:16 skrev Pavel Lyalyakin via dev <
> dev@subversion.apache.org>:
>
>> Hello,
>>
>> As reported in this users@ thread[1][2], it appears that running `svn
>> update` can silently remove unversioned files in the working copy when
>> automatically resolving a tree conflict. Note that when I run `svn update`
>> with the `--accept postpone` option, the unversioned file remains in the
>> working copy.
>>
>> Should I create a ticket in Jira? I have a reproduction script for
>> Windows and macOS.
>>
>
> I think this qualifies for a ticket!
>
>
>> I guess that the macOS script also works on Linux.
>>
>
> The script seems to work under Linux (at least Ubuntu 22.04 running on
> WSL). As far as I understand, the issue is the same: unversionedfile.txt is
> missing after the rename).
>
> [[[
> daniel@DESKTOP-DT42993:~/marcel-bug-report/working-copy-one$ svn resolve
> Searching tree conflict details for 'RenamedDir/myfile.txt' in repository:
> Checking r2... done
> Tree conflict on 'RenamedDir/myfile.txt':
> A new file appeared during update to r3; it was added by daniel in r2.
> An unversioned file was found in the working copy.
> Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files, (h) Help,
>         (q) Quit resolution:
> ]]]
>
> Note that the error message mention "[a]n unversioned file", however the
> conflict is on the versioned file.
>
> Kind regards,
> Daniel
>

I've just created SVN-4910: https://issues.apache.org/jira/browse/SVN-4910

Thank you!

-- 
With best regards,
Pavel Lyalyakin
VisualSVN Team

Re: Tree conflict resolution removes unversioned files from the working copy

Posted by Daniel Sahlberg <da...@gmail.com>.
Den sön 20 nov. 2022 kl 19:16 skrev Pavel Lyalyakin via dev <
dev@subversion.apache.org>:

> Hello,
>
> As reported in this users@ thread[1][2], it appears that running `svn
> update` can silently remove unversioned files in the working copy when
> automatically resolving a tree conflict. Note that when I run `svn update`
> with the `--accept postpone` option, the unversioned file remains in the
> working copy.
>
> Should I create a ticket in Jira? I have a reproduction script for Windows
> and macOS.
>

I think this qualifies for a ticket!


> I guess that the macOS script also works on Linux.
>

The script seems to work under Linux (at least Ubuntu 22.04 running on
WSL). As far as I understand, the issue is the same: unversionedfile.txt is
missing after the rename).

[[[
daniel@DESKTOP-DT42993:~/marcel-bug-report/working-copy-one$ svn resolve
Searching tree conflict details for 'RenamedDir/myfile.txt' in repository:
Checking r2... done
Tree conflict on 'RenamedDir/myfile.txt':
A new file appeared during update to r3; it was added by daniel in r2.
An unversioned file was found in the working copy.
Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files, (h) Help,
        (q) Quit resolution:
]]]

Note that the error message mention "[a]n unversioned file", however the
conflict is on the versioned file.

Kind regards,
Daniel