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

RE: svn commit: r953302 - in /subversion/trunk/subversion: include/svn_diff.h libsvn_client/diff.c

From: Bert Huijben <bert_at_vmoo.com>
Date: Thu, 10 Jun 2010 15:03:51 +0200

-----Original Message-----
From: dannas_at_apache.org [mailto:dannas_at_apache.org]
Sent: donderdag 10 juni 2010 14:25
To: commits_at_subversion.apache.org
Subject: svn commit: r953302 - in /subversion/trunk/subversion: include/svn_diff.h libsvn_client/diff.c

Author: dannas
Date: Thu Jun 10 12:24:39 2010
New Revision: 953302

URL: http://svn.apache.org/viewvc?rev=953302&view=rev
Log:
Make the 'diff_operation' type public.

When we parse a 'git format' diff we need to pass on what operation should be performed on the file to the patch code.

The actual parsing is not yet implemented, just making preparations.

* subversion/libsvn_client/diff.c
  (diff_operation): Rename and move this from here to ..

* subversion/include/svn_diff.h
  (svn_diff_operation_kind_t): .. Here.
  (svn_patch_t): Add 'svn_diff_operation_kind_t' field.

Modified:
    subversion/trunk/subversion/include/svn_diff.h
    subversion/trunk/subversion/libsvn_client/diff.c

Modified: subversion/trunk/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_diff.h?rev=953302&r1=953301&r2=953302&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_diff.h (original)
+++ subversion/trunk/subversion/include/svn_diff.h Thu Jun 10 12:24:39
+++ 2010
@@ -771,6 +771,21 @@ svn_diff_mem_string_output_merge(svn_str
  * rather than parse it, see svn_client_patch(). */
 
 /**
+ * Describes what operation has been performed on a file.
+ *
+ * @since New in 1.7.
+ */
+typedef enum svn_diff_operation_kind_e
+{
+ diff_op_added,
+ diff_op_deleted,
+ diff_op_copied,
+ diff_op_moved,
+ /* There's no tree changes, just text modifications. */
+ diff_op_modified
+}svn_diff_operation_kind_t;

The values need a svn_ prefix, as they will be part of the global namespace.

        Bert
+
+/**
  * A single hunk inside a patch
  *
  * @since New in 1.7. */
@@ -852,6 +867,10 @@ typedef struct svn_patch_t {
    * An array containing an svn_hunk_t object for each hunk parsed
    * from the patch. */
   apr_array_header_t *hunks;
+
+ /**
+ * Represents the operation performed on the file. */
+ svn_diff_operation_kind_t operation;
 } svn_patch_t;
 
 /**

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=953302&r1=953301&r2=953302&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Jun 10 12:24:39
+++ 2010
@@ -393,17 +393,6 @@ print_git_diff_header_modified(svn_strea
 }
 #endif
 
-enum diff_operation
-{
- diff_op_added,
- diff_op_deleted,
- diff_op_copied,
- diff_op_moved,
- /* There's no tree changes, just text modifications. */
- diff_op_modified
-};
-
-
 /*-----------------------------------------------------------------*/
 

 /*** Callbacks for 'svn diff', invoked by the repos-diff editor. ***/
@@ -528,7 +517,7 @@ diff_content_changed(const char *path,
                      svn_revnum_t rev2,
                      const char *mimetype1,
                      const char *mimetype2,
- enum diff_operation operation,
+ svn_diff_operation_kind_t operation,
                      void *diff_baton)
 {
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
Received on 2010-06-10 15:04:35 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.