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

[PATCH v4] - issue 3342 summary of conflicts and skips

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Mon, 3 Aug 2009 18:12:53 +0200

> > ===================================================================
> > --- basic_tests.py (revision 38504)
> > +++ basic_tests.py (arbetskopia)
> > @@ -198,7 +198,8 @@
> > # path, are skipped and do not raise an error
> > xx_path = os.path.join(wc_dir, 'xx', 'xx')
> > exit_code, out, err = svntest.actions.run_and_verify_svn(
> > - "update xx/xx", ["Skipped '"+xx_path+"'\n"], [],
> > + "update xx/xx",
> > + ["Skipped '"+xx_path+"'\nSummary of conflicts:\n Skipped paths: 1\n"], [],
> > 'update', xx_path)
> > exit_code, out, err = svntest.actions.run_and_verify_svn(
> > "update xx/xx", [], [],

> > The funny thing is that I can't spot any diff between the expected and
> > actual output. Line endings? Nothing shows up in vim. UTF-8?
> >
>
> The first is three one-line strings, the second is one three-lines string?
>
> (Look for examples how run_and_verify_svn() is used with multiline values.)

Thanks! My python is a bit rusty (hrm now I know some).

Make check passed but with two failures in basic_tests.py. When skipping
no summary was printed before. That was caused by theese lines in
subversion/libsvn_client/update.c:

  344 err = svn_client__update_internal(&result_rev, path, revision, depth,
  345 depth_is_sticky, ignore_externals,
  346 allow_unver_obstructions,
  347 &sleep, TRUE, ctx, subpool);
  348 if (err && err->apr_err != SVN_ERR_WC_NOT_DIRECTORY)
  349 {
  350 return svn_error_return(err);
  351 }
  352 else if (err)
  353 {
  354 /* SVN_ERR_WC_NOT_DIRECTORY: it's not versioned */
  355 svn_error_clear(err);
  356 err = SVN_NO_ERROR;
  357 result_rev = SVN_INVALID_REVNUM;
  358 if (ctx->notify_func2)
  359 (*ctx->notify_func2)(ctx->notify_baton2,
  360 svn_wc_create_notify(path,
  361 svn_wc_notify_skip,
  362 subpool), subpool);
  363 }

A svn_wc_notify_skip was sent after the svn_wc_notify_update_completed.
But now when the summary is not printed in response to an update
completed notification but after the call to svn_client_update3 a
summary will be printed even if the only action is skipping one
directory. Since the summary includes a line for skips I think that the
test should be changed and has done so. The patch now passes make
check.

 [[[
 Fix issue #3342: Summary of conflicts printed at end of up/sw/merge
 * subversion/svn/merge-cmd.c
   (svn_cl__merge): Call svn_cl__print_conflict_stats.

 * subversion/svn/cl.h
   (svn_cl__print_conflict_stats): Added declaration.

 * subversion/svn/update-cmd.c
   (svn_cl__update): Call svn_cl__print_conflict_stats.

 * subversion/svn/switch-cmd.c
   (svn_cl__switch): Call svn_cl__print_conflict_stats.

 * subversion/svn_notify.c
   (svn_cl__print_conflict_stats): Changed name from print_conflict_stats.

 * subversion/svn_notify.c
   (notify): Remove references to print_conflict_stats. Do not clear
    counters for conflicts.

 * subversion/tests/cmdline/basic_tests.py
   (basic_update): Changed tests involving skipping to include summary.
 ]]]

Mvh
Daniel Nslund

Received on 2009-08-03 18:13:14 CEST

This is an archived mail posted to the Subversion Dev mailing list.