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

Re: svn commit: r28489 - branches/reintegrate/subversion/libsvn_fs_fs

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-12-15 01:53:31 CET

... however, I get a different failure on my Mac on update_tests 36,
despite it passing on Linux!

--dave

=============================================================
Expected 'B_COPY' and actual 'B_COPY' are different!
=============================================================
EXPECTED NODE TO BE:
=============================================================
 * Node name: B_COPY
    Path: __SVN_ROOT_NODE/A/B_COPY
    Contents: N/A (node is a directory)
    Properties: {}
    Attributes: {}
    Children: 3
=============================================================
ACTUAL NODE FOUND:
=============================================================
 * Node name: B_COPY
    Path: A/B_COPY
    Contents: N/A (node is a directory)
    Properties: {'svn:mergeinfo': ''}
    Attributes: {}
    Children: 3
Unequal at node B_COPY
Unequal at node A
EXCEPTION: SVNTreeUnequal
Traceback (most recent call last):
  File "/Users/glasser/Projects/Subversion/whole-branch-merge/subversion/tests/cmdline/svntest/main.py",
line 1042, in run
    rc = apply(self.pred.run, (), kw)
  File "/Users/glasser/Projects/Subversion/whole-branch-merge/subversion/tests/cmdline/svntest/testcase.py",
line 121, in run
    return self.func(sandbox)
  File "./update_tests.py", line 2950, in mergeinfo_update_elision
    '-r', '5', wc_dir)
  File "/Users/glasser/Projects/Subversion/whole-branch-merge/subversion/tests/cmdline/svntest/actions.py",
line 565, in run_and_verify_update
    check_props)
  File "/Users/glasser/Projects/Subversion/whole-branch-merge/subversion/tests/cmdline/svntest/actions.py",
line 477, in verify_update
    singleton_handler_b, b_baton)
  File "/Users/glasser/Projects/Subversion/whole-branch-merge/subversion/tests/cmdline/svntest/tree.py",
line 515, in compare_trees
    singleton_handler_b, b_baton)
  File "/Users/glasser/Projects/Subversion/whole-branch-merge/subversion/tests/cmdline/svntest/tree.py",
line 515, in compare_trees
    singleton_handler_b, b_baton)
  File "/Users/glasser/Projects/Subversion/whole-branch-merge/subversion/tests/cmdline/svntest/tree.py",
line 501, in compare_trees
    raise SVNTreeUnequal
SVNTreeUnequal
FAIL: update_tests.py 36: mergeinfo does not elide after update

On Dec 14, 2007 4:51 PM, David Glasser <glasser@davidglasser.net> wrote:
> See r28495: it turns out that negative numbers shouldn't go into
> unsigned variables :-)
>
> --dave
>
>
> On Dec 14, 2007 4:30 PM, David Glasser <glasser@davidglasser.net> wrote:
> > er, update_tests 36.
> >
> > --dave
> >
> >
> > On Dec 14, 2007 4:29 PM, David Glasser <glasser@davidglasser.net> wrote:
> > > Hmm, something is wrong, maybe with this commit... update_tests.py has
> > > a crazy error:
> > >
> > > svn: Can't increment mergeinfo count on *file* node-revision 4.1.t7-7
> > > to 18446744073709551615 (> 1)
> > >
> > >
> > >
> > > On Dec 14, 2007 3:02 PM, <glasser@tigris.org> wrote:
> > > > Author: glasser
> > > > Date: Fri Dec 14 15:02:30 2007
> > > > New Revision: 28489
> > > >
> > > > Log:
> > > > Change type of "mergeinfo-count" variable to apr_uint64_t from int
> > > > everywhere.
> > > >
> > > > * subversion/libsvn_fs_fs/dag.c
> > > > (svn_fs_fs__dag_get_mergeinfo_count,
> > > > svn_fs_fs__dag_set_proplist,
> > > > svn_fs_fs__dag_increment_mergeinfo_count): Adjust (and I18N-ize
> > > > some error messages).
> > > >
> > > > * subversion/libsvn_fs_fs/dag.h
> > > > (svn_fs_fs__dag_get_mergeinfo_count,
> > > > svn_fs_fs__dag_increment_mergeinfo_count): Adjust.
> > > >
> > > > * subversion/libsvn_fs_fs/fs.h
> > > > (node_revision_t): Adjust.
> > > >
> > > > * subversion/libsvn_fs_fs/fs_fs.c
> > > > (svn_fs_fs__get_node_revision, write_noderev_txn): Adjust.
> > > >
> > > > * subversion/libsvn_fs_fs/tree.c
> > > > (increment_mergeinfo_up_tree, fs_change_node_prop, merge,
> > > > fs_delete_node, copy_helper): Adjust.
> > > >
> > > >
> > > > Modified:
> > > > branches/reintegrate/subversion/libsvn_fs_fs/dag.c
> > > > branches/reintegrate/subversion/libsvn_fs_fs/dag.h
> > > > branches/reintegrate/subversion/libsvn_fs_fs/fs.h
> > > > branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c
> > > > branches/reintegrate/subversion/libsvn_fs_fs/tree.c
> > > >
> > > > Modified: branches/reintegrate/subversion/libsvn_fs_fs/dag.c
> > > > URL: http://svn.collab.net/viewvc/svn/branches/reintegrate/subversion/libsvn_fs_fs/dag.c?pathrev=28489&r1=28488&r2=28489
> > > > ==============================================================================
> > > > --- branches/reintegrate/subversion/libsvn_fs_fs/dag.c (original)
> > > > +++ branches/reintegrate/subversion/libsvn_fs_fs/dag.c Fri Dec 14 15:02:30 2007
> > > > @@ -239,7 +239,7 @@
> > > > }
> > > >
> > > > svn_error_t *
> > > > -svn_fs_fs__dag_get_mergeinfo_count(int *count,
> > > > +svn_fs_fs__dag_get_mergeinfo_count(apr_uint64_t *count,
> > > > dag_node_t *node,
> > > > apr_pool_t *pool)
> > > > {
> > > > @@ -500,7 +500,7 @@
> > > >
> > > > svn_error_t *
> > > > svn_fs_fs__dag_increment_mergeinfo_count(dag_node_t *node,
> > > > - int increment,
> > > > + apr_uint64_t increment,
> > > > apr_pool_t *pool)
> > > > {
> > > > node_revision_t *noderev;
> > > > @@ -527,8 +527,8 @@
> > > > svn_string_t *idstr = svn_fs_fs__id_unparse(node->id, pool);
> > > > return svn_error_createf
> > > > (SVN_ERR_FS_CORRUPT, NULL,
> > > > - "Can't increment mergeinfo count on node-revision %s to negative "
> > > > - "value %d",
> > > > + _("Can't increment mergeinfo count on node-revision %s to negative "
> > > > + "value %llu"),
> > > > idstr->data, noderev->mergeinfo_count);
> > > > }
> > > > if (noderev->mergeinfo_count > 1 && noderev->kind == svn_node_file)
> > > > @@ -536,8 +536,8 @@
> > > > svn_string_t *idstr = svn_fs_fs__id_unparse(node->id, pool);
> > > > return svn_error_createf
> > > > (SVN_ERR_FS_CORRUPT, NULL,
> > > > - "Can't increment mergeinfo count on *file* node-revision %s to %d "
> > > > - "(> 1)",
> > > > + _("Can't increment mergeinfo count on *file* node-revision %s to "
> > > > + "%llu (> 1)"),
> > > > idstr->data, noderev->mergeinfo_count);
> > > > }
> > > >
> > > >
> > > > Modified: branches/reintegrate/subversion/libsvn_fs_fs/dag.h
> > > > URL: http://svn.collab.net/viewvc/svn/branches/reintegrate/subversion/libsvn_fs_fs/dag.h?pathrev=28489&r1=28488&r2=28489
> > > > ==============================================================================
> > > > --- branches/reintegrate/subversion/libsvn_fs_fs/dag.h (original)
> > > > +++ branches/reintegrate/subversion/libsvn_fs_fs/dag.h Fri Dec 14 15:02:30 2007
> > > > @@ -110,7 +110,7 @@
> > > >
> > > > /* Set *COUNT to the number of node under NODE (inclusive) with
> > > > svn:mergeinfo properties, allocating from POOL. */
> > > > -svn_error_t *svn_fs_fs__dag_get_mergeinfo_count(int *count,
> > > > +svn_error_t *svn_fs_fs__dag_get_mergeinfo_count(apr_uint64_t *count,
> > > > dag_node_t *node,
> > > > apr_pool_t *pool);
> > > >
> > > > @@ -155,7 +155,7 @@
> > > > /* Increment the mergeinfo_count field on NODE by INCREMENT. The node
> > > > being changed must be mutable. */
> > > > svn_error_t *svn_fs_fs__dag_increment_mergeinfo_count(dag_node_t *node,
> > > > - int increment,
> > > > + apr_uint64_t increment,
> > > > apr_pool_t *pool);
> > > >
> > > > /* Set the has-mergeinfo flag on NODE to HAS_MERGEINFO. The node
> > > >
> > > > Modified: branches/reintegrate/subversion/libsvn_fs_fs/fs.h
> > > > URL: http://svn.collab.net/viewvc/svn/branches/reintegrate/subversion/libsvn_fs_fs/fs.h?pathrev=28489&r1=28488&r2=28489
> > > > ==============================================================================
> > > > --- branches/reintegrate/subversion/libsvn_fs_fs/fs.h (original)
> > > > +++ branches/reintegrate/subversion/libsvn_fs_fs/fs.h Fri Dec 14 15:02:30 2007
> > > > @@ -306,9 +306,7 @@
> > > >
> > > > /* Number of nodes with svn:mergeinfo properties that are
> > > > descendents of this node (including it itself) */
> > > > - /* ### TODO(reint): worry about overflow; probably use key-gen.h things
> > > > - instead (use apr_uint64_t here, perhaps)? */
> > > > - int mergeinfo_count;
> > > > + apr_uint64_t mergeinfo_count;
> > > >
> > > > /* Does this node itself have svn:mergeinfo? */
> > > > svn_boolean_t has_mergeinfo;
> > > >
> > > > Modified: branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c
> > > > URL: http://svn.collab.net/viewvc/svn/branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c?pathrev=28489&r1=28488&r2=28489
> > > > ==============================================================================
> > > > --- branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c (original)
> > > > +++ branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c Fri Dec 14 15:02:30 2007
> > > > @@ -1571,7 +1571,7 @@
> > > >
> > > > /* Get the mergeinfo count. */
> > > > value = apr_hash_get(headers, HEADER_MINFO_CNT, APR_HASH_KEY_STRING);
> > > > - noderev->mergeinfo_count = (value == NULL) ? 0 : atoi(value);
> > > > + noderev->mergeinfo_count = (value == NULL) ? 0 : apr_atoi64(value);
> > > >
> > > > /* Get whether *this* node has mergeinfo. */
> > > > value = apr_hash_get(headers, HEADER_MINFO_HERE, APR_HASH_KEY_STRING);
> > > > @@ -1660,7 +1660,8 @@
> > > > SVN_ERR(svn_stream_printf(outfile, pool, HEADER_FRESHTXNRT ": y\n"));
> > > >
> > > > if (noderev->mergeinfo_count > 0)
> > > > - SVN_ERR(svn_stream_printf(outfile, pool, HEADER_MINFO_CNT ": %d\n",
> > > > + SVN_ERR(svn_stream_printf(outfile, pool, HEADER_MINFO_CNT ": "
> > > > + APR_UINT64_T_FMT "\n",
> > > > noderev->mergeinfo_count));
> > > >
> > > > if (noderev->has_mergeinfo)
> > > >
> > > > Modified: branches/reintegrate/subversion/libsvn_fs_fs/tree.c
> > > > URL: http://svn.collab.net/viewvc/svn/branches/reintegrate/subversion/libsvn_fs_fs/tree.c?pathrev=28489&r1=28488&r2=28489
> > > > ==============================================================================
> > > > --- branches/reintegrate/subversion/libsvn_fs_fs/tree.c (original)
> > > > +++ branches/reintegrate/subversion/libsvn_fs_fs/tree.c Fri Dec 14 15:02:30 2007
> > > > @@ -1022,7 +1022,7 @@
> > > >
> > > > static svn_error_t *
> > > > increment_mergeinfo_up_tree(parent_path_t *pp,
> > > > - int increment,
> > > > + apr_uint64_t increment,
> > > > apr_pool_t *pool)
> > > > {
> > > > for (; pp; pp = pp->parent)
> > > > @@ -1074,7 +1074,7 @@
> > > >
> > > > if (strcmp (name, SVN_PROP_MERGEINFO) == 0)
> > > > {
> > > > - int increment = 0;
> > > > + apr_uint64_t increment = 0;
> > > > svn_boolean_t had_mergeinfo;
> > > > SVN_ERR(svn_fs_fs__dag_has_mergeinfo(&had_mergeinfo, parent_path->node,
> > > > pool));
> > > > @@ -1219,7 +1219,7 @@
> > > > dag_node_t *source,
> > > > dag_node_t *ancestor,
> > > > const char *txn_id,
> > > > - int *mergeinfo_increment_out,
> > > > + apr_uint64_t *mergeinfo_increment_out,
> > > > apr_pool_t *pool)
> > > > {
> > > > const svn_fs_id_t *source_id, *target_id, *ancestor_id;
> > > > @@ -1228,7 +1228,7 @@
> > > > svn_fs_t *fs;
> > > > apr_pool_t *iterpool;
> > > > int pred_count;
> > > > - int mergeinfo_increment = 0;
> > > > + apr_uint64_t mergeinfo_increment = 0;
> > > >
> > > > /* Make sure everyone comes from the same filesystem. */
> > > > fs = svn_fs_fs__dag_get_fs(ancestor);
> > > > @@ -1410,7 +1410,7 @@
> > > > else if (t_entry && svn_fs_fs__id_eq(a_entry->id, t_entry->id))
> > > > {
> > > > dag_node_t *t_ent_node;
> > > > - int mergeinfo_start;
> > > > + apr_uint64_t mergeinfo_start;
> > > > SVN_ERR(svn_fs_fs__dag_get_node(&t_ent_node, fs,
> > > > t_entry->id, iterpool));
> > > > SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&mergeinfo_start,
> > > > @@ -1421,7 +1421,7 @@
> > > > if (s_entry)
> > > > {
> > > > dag_node_t *s_ent_node;
> > > > - int mergeinfo_end;
> > > > + apr_uint64_t mergeinfo_end;
> > > > SVN_ERR(svn_fs_fs__dag_get_node(&s_ent_node, fs,
> > > > s_entry->id, iterpool));
> > > > SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&mergeinfo_end,
> > > > @@ -1447,7 +1447,7 @@
> > > > {
> > > > dag_node_t *s_ent_node, *t_ent_node, *a_ent_node;
> > > > const char *new_tpath;
> > > > - int sub_mergeinfo_increment;
> > > > + apr_uint64_t sub_mergeinfo_increment;
> > > >
> > > > /* If SOURCE-ENTRY and TARGET-ENTRY are both null, that's a
> > > > double delete; flag a conflict. */
> > > > @@ -1517,7 +1517,7 @@
> > > > void *val;
> > > > apr_ssize_t klen;
> > > > dag_node_t *s_ent_node;
> > > > - int mergeinfo_s;
> > > > + apr_uint64_t mergeinfo_s;
> > > >
> > > > svn_pool_clear(iterpool);
> > > >
> > > > @@ -1893,7 +1893,7 @@
> > > > {
> > > > parent_path_t *parent_path;
> > > > const char *txn_id = root->txn;
> > > > - int mergeinfo_count;
> > > > + apr_uint64_t mergeinfo_count;
> > > >
> > > > if (! root->is_txn_root)
> > > > return SVN_FS__NOT_TXN(root);
> > > > @@ -2021,8 +2021,8 @@
> > > > svn_fs_path_change_kind_t kind;
> > > > dag_node_t *new_node;
> > > > const char *from_canonpath;
> > > > - int mergeinfo_start;
> > > > - int mergeinfo_end;
> > > > + apr_uint64_t mergeinfo_start;
> > > > + apr_uint64_t mergeinfo_end;
> > > >
> > > > /* If TO_PATH already existed prior to the copy, note that this
> > > > operation is a replacement, not an addition. */
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> > > > For additional commands, e-mail: svn-help@subversion.tigris.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
> > >
> >
> >
> >
> > --
> > David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
> >
>
>
>
> --
>
> David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
>

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 15 02:14:14 2007

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.