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

Re: svn commit: r961784 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c wc_db.h workqueue.c

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 8 Jul 2010 13:39:46 -0400

On Thu, Jul 8, 2010 at 10:27, <rhuijben_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu Jul  8 14:27:22 2010
> @@ -400,7 +400,7 @@ INSERT OR REPLACE INTO BASE_NODE (
>   changed_author, properties, repos_id, repos_relpath, checksum, changed_date,
>   depth, symlink_target, dav_cache)
>  /* NOTE: ?6 is duplicated because we insert the same value in two columns.  */
> -VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14, ?15);
> +VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14, ?15, ?16);

A little awareness would be nice. You know... like that comment JUST
ABOVE the line you changed?

>...
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Jul  8 14:27:22 2010
> @@ -5353,9 +5353,10 @@ struct commit_baton {
>   svn_wc__db_pdh_t *pdh;
>   const char *local_relpath;
>
> -  svn_revnum_t new_revision;
> -  apr_time_t new_date;
> -  const char *new_author;
> +  apr_int64_t new_revision;
> +  apr_int64_t changed_rev;

What? You mean svn_revnum_t.

Don't change the structure. Keep it semantics. The only point where it
needs to be an apr_int64_t is when you bind it. Change the semantics
*there*. Shoot... maybe we'll add an "r" code at some point to bind
revnums.

Using the wrong type for a given semantic... leads to problems.

>...
> @@ -5485,29 +5486,30 @@ commit_node(void *baton, svn_sqlite__db_
>
>   SVN_ERR(svn_sqlite__get_statement(&stmt, cb->pdh->wcroot->sdb,
>                                     STMT_APPLY_CHANGES_TO_BASE));
> -  SVN_ERR(svn_sqlite__bindf(stmt, "issttisb",
> +  SVN_ERR(svn_sqlite__bindf(stmt, "issttiisb",
>                             cb->pdh->wcroot->wc_id, cb->local_relpath,
>                             parent_relpath,
>                             presence_map, new_presence,
>                             kind_map, new_kind,
> -                            (apr_int64_t)cb->new_revision,
> -                            cb->new_author,
> +                            cb->new_revision,
> +                            cb->changed_rev,

Keep the cast.

>...

Cheers,
-g
Received on 2010-07-08 19:41:15 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.