Fossil

Check-in [06bc2fb7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:The "export" command now exports tags.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 06bc2fb7ccabba16a967ac8cc75cd415c2e85e77
User & Date: drh 2010-11-09 11:59:46
Context
2010-11-09
13:52
Make "init" an alias for "new". check-in: 21880ca1 user: drh tags: trunk
11:59
The "export" command now exports tags. check-in: 06bc2fb7 user: drh tags: trunk
11:05
Merge the import/export changes into trunk. Even though they are incomplete, they do not threaten the correctness of other commands and can be developed in trunk. check-in: 0f024d3e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/export.c.

174
175
176
177
178
179
180




















181
182
      printf("M %s :%d %s\n", zPerm, fid, pFile->zName);
    }
    manifest_destroy(p);
    printf("\n");
  }
  db_finalize(&q);
  bag_clear(&blobs);




















  bag_clear(&vers);
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
      printf("M %s :%d %s\n", zPerm, fid, pFile->zName);
    }
    manifest_destroy(p);
    printf("\n");
  }
  db_finalize(&q);
  bag_clear(&blobs);


  /* Output tags */
  db_prepare(&q,
     "SELECT tagname, rid, strftime('%%s',mtime)"
     "  FROM tagxref JOIN tag USING(tagid)"
     " WHERE tagtype=1 AND tagname GLOB 'sym-*'"
  );
  while( db_step(&q)==SQLITE_ROW ){
    const char *zTagname = db_column_text(&q, 0);
    int rid = db_column_int(&q, 1);
    sqlite3_int64 secSince1970 = db_column_int64(&q, 2);
    if( rid==0 || !bag_find(&vers, rid) ) continue;
    zTagname += 4;
    printf("tag %s\n", zTagname);
    printf("from :%d\n", rid);
    printf("tagger <tagger> %lld +0000\n", secSince1970);
    printf("data 0\n");
  }
  db_finalize(&q);
  bag_clear(&vers);
}