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

[PATCH] print conflict statistics after update/merge

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 17 Oct 2008 15:35:27 +0100

Hi,

We now support 3 different types of conflicts in trunk (text, prop,
tree). I have for been contemplating the idea of reporting how many
conflicts of each type occured during an update or merge.
Here is a patch that implements this idea.

With the patch applied, the output looks like this:

  Conflict discovered in 'alpha'.
  Select: (p) postpone, (df) diff-full, (e) edit,
          (mc) mine-conflict, (tc) theirs-conflict,
          (s) show all options: p
  --- Merging r2 through r5 into '.':
  C alpha
  U epsilon/zeta
  U beta
  There was 1 text conflict.
 
More complicated example:

  --- Merging r2 through r5 into '.':
  C epsilon
  Conflict discovered in 'beta'.
  Select: (p) postpone, (df) diff-full, (e) edit,
          (mc) mine-conflict, (tc) theirs-conflict,
          (s) show all options: p
  C beta
  C .
  There was 1 text conflict and 2 tree conflicts.
  2 paths were skipped.

In case of multi-working-copy updates, stats are currently
reported separatly for each working copy:

  Conflict discovered in 'trunk2/alpha'.
  Select: (p) postpone, (df) diff-full, (e) edit,
          (mc) mine-conflict, (tc) theirs-conflict,
          (s) show all options: p
  C trunk2/alpha
  U trunk2/epsilon/zeta
  U trunk2/beta
  Updated to revision 5.
  There was 1 text conflict.
  Conflict discovered in 'trunk3/alpha'.
  Select: (p) postpone, (df) diff-full, (e) edit,
          (mc) mine-conflict, (tc) theirs-conflict,
          (s) show all options: p
  C trunk3/alpha
  U trunk3/epsilon/zeta
  U trunk3/beta
  Updated to revision 5.
  There was 1 text conflict.

I think this is OK, because reporting stats in one batch
for all working copies at the very end would complicate
the code a lot :-P

Comments?

Patch attached, log message below.

I'll do the same thing for 'svn status' if people agree with
the general idea.

Thanks,
Stefan

[[[
Report statistics about conflicts and skipped paths during
an update or merge operation.

* subversion/svn/notify.c
  (notify_baton): Add new members text_conflicts, prop_conflicts,
   tree_conflicts, and skipped_paths.
  (print_conflict_stats): New function.
  (notify): Gather conflict stats during notifications.
  (svn_cl__get_notifier): Initialise new notify_baton members.

* subversion/include/svn_wc.h
  (svn_wc_notify_action_t): New constant svn_wc_notify_merge_completed.
   This is needed to trigger stat reporting in case of a merge.

* subversion/libsvn_client/merge.c
  (do_merge): Send a notification when the merge is done.
]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-10-17 16:36: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.