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

[WIP] Replace entry calls for revisions in svn_wc_status2_t

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Tue, 30 Mar 2010 21:37:42 +0200

Hi!

This patch passes make check with modifications to some tests to take
into account some changed behaviors. I've tried to justificate those
changes in the log message below.

Is this really right?
======================
When scanning for a deletion I never use the base_del_abspath parameter
of scan_deletion(). Shouldn't there be some tests that would fail since
we're not checking that? My idea was that the op root of a 'svn delete'
operation could only be detected with the base_del_abspath parameter.

I've set the revision, changed_rev and changed_author to their nil
values if the read_info() says we have an addition. changed_rev and
changed_author could only be values from previous revisions so if
revision is -1 they can only have their nil values.

Things I need to fix
=====================
I've disabled the entries check for some tests below. I should do this
in a more fine-grained manner. gstein suggested what I should do on
#svn-dev. I listened mindfully to what he had to say and then forgot all
about it. :-(

The update test sets the revision to '?' but it should be '0' I need to
change the logic of print_status() in svn/status.c to allow it to be
'0'. There should be some way to say that it is part of a copy (it's
parent is copied but itself is deleted).

[[[
As part of WC-NG, replace entry calls for revisions from
svn_wc_status2_t related code.

The entries code set the revision of newly added nodes to 0 but the db
sets them to -1. Since too many tests needs to be changed and 'svn info'
also uses 0, I'll change those values in a follow-up patch instead.

* subversion/tests/cmdline/copy_tests.py
  (repos_to_wc): Change revision to 0 since the node is added. Don't
    check against entries since the behavior differs.

* subversion/tests/cmdline/stat_tests.py
  (status_with_tree_conflicts): An copied node should not have a
    changed_rev or author.

* subversion/tests/cmdline/update_tests.py
  (tree_conflict_uc2_schedule_re_add): A scheduled delete in a copied
    tree. The parent operation decides what the revision should be.
    Don't check against entries since the behavior differs.

* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_status): Add new parameter check_entries. We only
    check the entries if check_entries is set to True.
  
* subversion/tests/cmdline/merge_tests.py
  (merge_into_missing): Add revision to status output for missing dir.
    Previously, missing dirs did not have a revision, only files had.
    Don't check entries since the behavior differs.

* subversion/svn/status.c
  (print_status): Replace checks for revisions using entries with the
    direct fields in svn_wc_status2_t. Set the revision for added and
    replaced nodes to 0. WC-NG sets those revisions to -1, but changing
    all the involved tests is for a follow-up.

* subversion/include/svn_wc.h
  (svn_wc_status2_t): Add fields revision, changed_rev and
    changed_author.

* subversion/libsvn_wc/status.c
  (assemble_status): Fill in the new fields with data from the wc db.
  (svn_wc_dup_status2): Copy the changed_author field.
]]]

cheers,
Daniel

Received on 2010-03-30 21:38:26 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.