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

Re: tree-conflicts: please review to determine desired behaviour in detail

From: Neels Hofmeyr <neels_at_elego.de>
Date: Thu, 04 Sep 2008 03:19:30 +0200

Hi,

I think there's still a problem with the new expected results of
tree-conflicts-on-update tests, in 2_1 and 2_2, where there are local changes.

2_1)
(tree_conflicts_on_update_2_1)
  Local leaf edit, incoming tree delete.

  expected_output = wc.State('', {
    'F' : Item(status='C '),
    'D' : Item(status='C '),
    'DF' : Item(status='C '),
    'DD' : Item(status='C '),
    'DDF' : Item(status='C '),
    'DDD' : Item(status='C '),
    })

  expected_disk = state_after_leaf_edit

  expected_status = state_after_leaf_edit.copy()
  expected_status.add({ '' : Item(status=' ') }) # also set root's attributes
  expected_status.tweak(wc_rev=3)
  expected_status.tweak('F', 'D', 'DF', 'DD', 'DDF', 'DDD', status='C ')

The output is fine, so is the disk.

But the status should also reflect the local changes, right?
The status after a leaf edit without conflicts is:

  '' : Item(status=' ', wc_rev='2'),
  'F' : Item(status=' ', wc_rev='2'),
  'F/alpha' : Item(status='M ', wc_rev='2'),
  'DD' : Item(status=' ', wc_rev='2'),
  'DD/D1' : Item(status=' ', wc_rev='2'),
  'DD/D1/D2' : Item(status=' ', wc_rev='2'),
  'DD/D1/D2/epsilon' : Item(status='A ', wc_rev='0'),
  'DF' : Item(status=' ', wc_rev='2'),
  'DF/D1' : Item(status=' ', wc_rev='2'),
  'DF/D1/beta' : Item(status='M ', wc_rev='2'),
  'DDD' : Item(status=' ', wc_rev='2'),
  'DDD/D1' : Item(status=' ', wc_rev='2'),
  'DDD/D1/D2' : Item(status=' ', wc_rev='2'),
  'DDD/D1/D2/D3' : Item(status=' ', wc_rev='2'),
  'DDD/D1/D2/D3/zeta' : Item(status='A ', wc_rev='0'),
  'DDF' : Item(status=' ', wc_rev='2'),
  'DDF/D1' : Item(status=' ', wc_rev='2'),
  'DDF/D1/D2' : Item(status=' ', wc_rev='2'),
  'DDF/D1/D2/gamma' : Item(status='M ', wc_rev='2'),
  'D' : Item(status=' ', wc_rev='2'),
  'D/D1' : Item(status=' ', wc_rev='2'),
  'D/D1/delta' : Item(status='A ', wc_rev='0'),

2_2)
(tree_conflicts_on_update_2_2)
Local leaf delete, incoming tree delete.

Same as above, and the status tree after a leaf delete without conflicts is:

  '' : Item(status=' ', wc_rev='2'),
  'F' : Item(status=' ', wc_rev='2'),
  'F/alpha' : Item(status='D ', wc_rev='2'),
  'DD' : Item(status=' ', wc_rev='2'),
  'DD/D1' : Item(status=' ', wc_rev='2'),
  'DD/D1/D2' : Item(status='D ', wc_rev='2'),
  'DF' : Item(status=' ', wc_rev='2'),
  'DF/D1' : Item(status=' ', wc_rev='2'),
  'DF/D1/beta' : Item(status='D ', wc_rev='2'),
  'DDD' : Item(status=' ', wc_rev='2'),
  'DDD/D1' : Item(status=' ', wc_rev='2'),
  'DDD/D1/D2' : Item(status=' ', wc_rev='2'),
  'DDD/D1/D2/D3' : Item(status='D ', wc_rev='2'),
  'DDF' : Item(status=' ', wc_rev='2'),
  'DDF/D1' : Item(status=' ', wc_rev='2'),
  'DDF/D1/D2' : Item(status=' ', wc_rev='2'),
  'DDF/D1/D2/gamma' : Item(status='D ', wc_rev='2'),
  'D' : Item(status=' ', wc_rev='2'),
  'D/D1' : Item(status='D ', wc_rev='2'),

Thus, I come up with this patch:

[[[
Further fix two tree-conflicts tests.

* subversion/tests/cmdline/update_tests.py (tree_conflicts_on_update_2_1,
   tree_conflicts_on_update_2_2): Adjust expected status to reflect the
    local changes.
]]]

~Neels

-- 
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696  mobile: +49 177 2345869  fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

Received on 2008-09-04 03:21:46 CEST

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.