Hello WC-NG gurus,
I ran into a strange problem while working on issue 3899 "auto-resolve
conflicts at wc-wc copy/move destination". The 'svn status' command
and the entries-dump utility (for 1.6 compatibility) disagree.
See stat_tests.py 35 for details. It's quite short, so I'll paste it into this
message.
According to notes/api-errata/1.7/wc003.txt, nested copies that lead to
mixed revisions should be elided in the UI, because Subversion should
handle mixed revisions without ceremony. That's what entries-dump
does.
But IMHO the op_root of a nested copy destination should have
svn_wc_status_added (and copied) instead of svn_wc_status_normal
(and copied). Otherwise, how can the user tell where 'svn revert' is
permitted? I think we need to fix entries-dump and update the errata.
Guidance would be greatly appreciated.
Steve
[[[
@XFail()
def copy_with_mixed_revisions(sbox):
"""copy with mixed revisions"""
# Note: A "local edit, incoming delete upon update" tree conflict
# leads to the same situation.
sbox.build()
wc = sbox.ospath
# Make a change in a tree and commit.
svntest.main.file_append(wc('A/D/G/rho'), "Local edit\n")
sbox.simple_commit() # r2
sbox.simple_update()
# Set up mixed revisions.
svntest.main.run_svn(None, 'up', '-r', 1, wc('A/D/G'))
# Copy the tree into a newly-added directory.
sbox.simple_mkdir('copy-dest')
sbox.simple_copy('A/D', 'copy-dest')
### As of r1130919 (pre-1.7 trunk): If we expect status ' ' for D/G,
### the verification via 'svn status -vuq' fails. If we expect
### status 'A ', the verification via 'entries-dump' fails. Which
### one is right?
expected_status = svntest.wc.State(wc('copy-dest'), {
'' : Item(status='A ', wc_rev=0),
'D' : Item(status='A ', copied='+', wc_rev='-'),
'D/G' : Item(status=' ', copied='+', wc_rev='-'), # <---
'D/G/pi' : Item(status=' ', copied='+', wc_rev='-'),
'D/G/rho' : Item(status=' ', copied='+', wc_rev='-'),
'D/G/tau' : Item(status=' ', copied='+', wc_rev='-'),
'D/H' : Item(status=' ', copied='+', wc_rev='-'),
'D/H/chi' : Item(status=' ', copied='+', wc_rev='-'),
'D/H/omega' : Item(status=' ', copied='+', wc_rev='-'),
'D/H/psi' : Item(status=' ', copied='+', wc_rev='-'),
'D/gamma' : Item(status=' ', copied='+', wc_rev='-'),
})
svntest.actions.run_and_verify_status(wc('copy-dest'), expected_status)
]]]
--
Stephen Butler | Senior Consultant
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
tel: +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
Received on 2011-06-04 00:07:19 CEST