[Groonga-commit] groonga/groonga at b8d60b8 [master] dump: add new lines for readability

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Apr 3 15:42:23 JST 2015


Kouhei Sutou	2015-04-03 15:42:23 +0900 (Fri, 03 Apr 2015)

  New Revision: b8d60b8ed4afbe09d671b21afef041918d1b684f
  https://github.com/groonga/groonga/commit/b8d60b8ed4afbe09d671b21afef041918d1b684f

  Message:
    dump: add new lines for readability

  Modified files:
    lib/proc.c
    test/command/suite/dump/record/lexicon.expected
    test/command/suite/dump/record/table_tokenizer_index_column.expected
    test/command/suite/dump/record/vector_long_key.expected
    test/command/suite/dump/record/weight_vector_type.expected
    test/command/suite/dump/schema/column/index/with_reference_column.expected
    test/command/suite/dump/schema/column/reference/each_other.expected
    test/command/suite/dump/schema/plugin/multiple.expected
    test/command/suite/dump/schema/plugin/native.expected
    test/command/suite/dump/schema/plugin/ruby.expected
    test/command/suite/dump/schema/table/double_array_trie/reference_key.expected
    test/command/suite/dump/schema/table/hash/reference_key.expected
    test/command/suite/dump/schema/table/patricia_trie/reference_key.expected

  Modified: lib/proc.c (+14 -4)
===================================================================
--- lib/proc.c    2015-04-03 15:26:53 +0900 (3f54129)
+++ lib/proc.c    2015-04-03 15:42:23 +0900 (ddad140)
@@ -2743,10 +2743,6 @@ dump_plugins(grn_ctx *ctx, grn_obj *outbuf)
   }
   grn_table_cursor_close(ctx, cursor);
 
-  if (grn_table_size(ctx, (grn_obj *)processed_paths) > 0) {
-    GRN_TEXT_PUTC(ctx, outbuf, '\n');
-  }
-
   grn_hash_close(ctx, processed_paths);
 }
 
@@ -3001,6 +2997,8 @@ dump_records(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table)
     goto exit;
   }
 
+  GRN_TEXT_PUTC(ctx, outbuf, '\n');
+
   GRN_TEXT_PUTS(ctx, outbuf, "load --table ");
   dump_obj_name(ctx, outbuf, table);
   GRN_TEXT_PUTS(ctx, outbuf, "\n[\n");
@@ -3142,6 +3140,10 @@ dump_table(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table,
     break;
   }
 
+  if (GRN_TEXT_LEN(outbuf) > 0) {
+    GRN_TEXT_PUTC(ctx, outbuf, '\n');
+  }
+
   GRN_TEXT_PUTS(ctx, outbuf, "table_create ");
   dump_obj_name(ctx, outbuf, table);
   GRN_TEXT_PUTC(ctx, outbuf, ' ');
@@ -3216,6 +3218,14 @@ dump_pending_columns(grn_ctx *ctx, grn_obj *outbuf, grn_obj *pending_columns)
   size_t i, n_columns;
 
   n_columns = GRN_BULK_VSIZE(pending_columns) / sizeof(grn_obj *);
+  if (n_columns == 0) {
+    return;
+  }
+
+  if (GRN_TEXT_LEN(outbuf) > 0) {
+    GRN_TEXT_PUTC(ctx, outbuf, '\n');
+  }
+
   for (i = 0; i < n_columns; i++) {
     grn_obj *table, *column;
 

  Modified: test/command/suite/dump/record/lexicon.expected (+3 -0)
===================================================================
--- test/command/suite/dump/record/lexicon.expected    2015-04-03 15:26:53 +0900 (d114bc2)
+++ test/command/suite/dump/record/lexicon.expected    2015-04-03 15:42:23 +0900 (e1be500)
@@ -14,8 +14,11 @@ load --table Memos
 dump
 table_create Memos TABLE_NO_KEY
 column_create Memos content COLUMN_SCALAR ShortText
+
 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
+
 column_create Terms memos_content_index COLUMN_INDEX|WITH_POSITION Memos content
+
 load --table Memos
 [
 ["_id","content"],

  Modified: test/command/suite/dump/record/table_tokenizer_index_column.expected (+4 -0)
===================================================================
--- test/command/suite/dump/record/table_tokenizer_index_column.expected    2015-04-03 15:26:53 +0900 (191e78b)
+++ test/command/suite/dump/record/table_tokenizer_index_column.expected    2015-04-03 15:42:23 +0900 (5c67b4b)
@@ -23,9 +23,12 @@ load --table Queries
 dump
 table_create Queries TABLE_HASH_KEY UInt32
 column_create Queries content COLUMN_SCALAR ShortText
+
 table_create Words TABLE_HASH_KEY ShortText --default_tokenizer TokenDelimit
 column_create Words boost COLUMN_SCALAR UInt32
+
 column_create Words index COLUMN_INDEX Queries content
+
 load --table Queries
 [
 ["_key","content"],
@@ -38,6 +41,7 @@ load --table Queries
 [7,"Animation Raccoon"],
 [8,"Animation Music"]
 ]
+
 load --table Words
 [
 ["_key","boost"],

  Modified: test/command/suite/dump/record/vector_long_key.expected (+3 -0)
===================================================================
--- test/command/suite/dump/record/vector_long_key.expected    2015-04-03 15:26:53 +0900 (0bf560a)
+++ test/command/suite/dump/record/vector_long_key.expected    2015-04-03 15:42:23 +0900 (696e007)
@@ -11,8 +11,11 @@ load --table Users
 [[0,0.0,0.0],1]
 dump
 table_create Tags TABLE_HASH_KEY ShortText
+
 table_create Users TABLE_HASH_KEY ShortText
+
 column_create Users tags COLUMN_VECTOR Tags
+
 load --table Users
 [
 ["_key","tags"],

  Modified: test/command/suite/dump/record/weight_vector_type.expected (+1 -0)
===================================================================
--- test/command/suite/dump/record/weight_vector_type.expected    2015-04-03 15:26:53 +0900 (e5bee3f)
+++ test/command/suite/dump/record/weight_vector_type.expected    2015-04-03 15:42:23 +0900 (193a608)
@@ -16,6 +16,7 @@ load --table Memos
 dump
 table_create Memos TABLE_HASH_KEY ShortText
 column_create Memos tags COLUMN_VECTOR|WITH_WEIGHT ShortText
+
 load --table Memos
 [
 ["_key","tags"],

  Modified: test/command/suite/dump/schema/column/index/with_reference_column.expected (+4 -0)
===================================================================
--- test/command/suite/dump/schema/column/index/with_reference_column.expected    2015-04-03 15:26:53 +0900 (9224c8d)
+++ test/command/suite/dump/schema/column/index/with_reference_column.expected    2015-04-03 15:42:23 +0900 (d6bee94)
@@ -15,9 +15,13 @@ column_create Terms users_name_index COLUMN_INDEX|WITH_POSITION Users name
 dump
 table_create Bookmarks TABLE_HASH_KEY ShortText
 column_create Bookmarks title COLUMN_SCALAR ShortText
+
 table_create Users TABLE_HASH_KEY ShortText
 column_create Users name COLUMN_SCALAR ShortText
+
 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
+
 column_create Users bookmark COLUMN_SCALAR Bookmarks
+
 column_create Terms users_name_index COLUMN_INDEX|WITH_POSITION Users name
 

  Modified: test/command/suite/dump/schema/column/reference/each_other.expected (+2 -0)
===================================================================
--- test/command/suite/dump/schema/column/reference/each_other.expected    2015-04-03 15:26:53 +0900 (ee798b0)
+++ test/command/suite/dump/schema/column/reference/each_other.expected    2015-04-03 15:42:23 +0900 (c3afc52)
@@ -13,8 +13,10 @@ column_create Bookmarks user COLUMN_SCALAR Users
 dump
 table_create Bookmarks TABLE_HASH_KEY ShortText
 column_create Bookmarks title COLUMN_SCALAR ShortText
+
 table_create Users TABLE_HASH_KEY ShortText
 column_create Users name COLUMN_SCALAR ShortText
+
 column_create Bookmarks user COLUMN_SCALAR Users
 column_create Users bookmark COLUMN_SCALAR Bookmarks
 

  Modified: test/command/suite/dump/schema/plugin/multiple.expected (+0 -1)
===================================================================
--- test/command/suite/dump/schema/plugin/multiple.expected    2015-04-03 15:26:53 +0900 (8c8c601)
+++ test/command/suite/dump/schema/plugin/multiple.expected    2015-04-03 15:42:23 +0900 (9bb11f0)
@@ -6,4 +6,3 @@ dump
 plugin_register token_filters/stop_word
 plugin_register query_expanders/tsv
 
-

  Modified: test/command/suite/dump/schema/plugin/native.expected (+0 -1)
===================================================================
--- test/command/suite/dump/schema/plugin/native.expected    2015-04-03 15:26:53 +0900 (6a9bb3b)
+++ test/command/suite/dump/schema/plugin/native.expected    2015-04-03 15:42:23 +0900 (31cb23e)
@@ -3,4 +3,3 @@ plugin_register token_filters/stop_word
 dump
 plugin_register token_filters/stop_word
 
-

  Modified: test/command/suite/dump/schema/plugin/ruby.expected (+0 -1)
===================================================================
--- test/command/suite/dump/schema/plugin/ruby.expected    2015-04-03 15:26:53 +0900 (3c0a514)
+++ test/command/suite/dump/schema/plugin/ruby.expected    2015-04-03 15:42:23 +0900 (e3da468)
@@ -3,4 +3,3 @@ plugin_register sharding
 dump
 plugin_register sharding
 
-

  Modified: test/command/suite/dump/schema/table/double_array_trie/reference_key.expected (+1 -0)
===================================================================
--- test/command/suite/dump/schema/table/double_array_trie/reference_key.expected    2015-04-03 15:26:53 +0900 (cac735b)
+++ test/command/suite/dump/schema/table/double_array_trie/reference_key.expected    2015-04-03 15:42:23 +0900 (0ab9a1d)
@@ -4,5 +4,6 @@ table_create Users TABLE_DAT_KEY Names
 [[0,0.0,0.0],true]
 dump
 table_create Names TABLE_PAT_KEY ShortText
+
 table_create Users TABLE_DAT_KEY Names
 

  Modified: test/command/suite/dump/schema/table/hash/reference_key.expected (+1 -0)
===================================================================
--- test/command/suite/dump/schema/table/hash/reference_key.expected    2015-04-03 15:26:53 +0900 (8af12d2)
+++ test/command/suite/dump/schema/table/hash/reference_key.expected    2015-04-03 15:42:23 +0900 (a3a5079)
@@ -4,5 +4,6 @@ table_create Users TABLE_HASH_KEY Names
 [[0,0.0,0.0],true]
 dump
 table_create Names TABLE_PAT_KEY ShortText
+
 table_create Users TABLE_HASH_KEY Names
 

  Modified: test/command/suite/dump/schema/table/patricia_trie/reference_key.expected (+1 -0)
===================================================================
--- test/command/suite/dump/schema/table/patricia_trie/reference_key.expected    2015-04-03 15:26:53 +0900 (2e247f4)
+++ test/command/suite/dump/schema/table/patricia_trie/reference_key.expected    2015-04-03 15:42:23 +0900 (c98aeb6)
@@ -4,5 +4,6 @@ table_create Users TABLE_PAT_KEY Names
 [[0,0.0,0.0],true]
 dump
 table_create Names TABLE_PAT_KEY ShortText
+
 table_create Users TABLE_PAT_KEY Names
 
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index