tests/test-sqlitestore.t
changeset 41736 e1643a0455c8
parent 40938 5014e93a5696
child 46324 9c35267f01e0
equal deleted inserted replaced
41735:35158796f52f 41736:e1643a0455c8
    69   $ hg commit -A -m initial
    69   $ hg commit -A -m initial
    70   adding foo
    70   adding foo
    71 
    71 
    72 That results in a row being inserted into various tables
    72 That results in a row being inserted into various tables
    73 
    73 
    74   $ sqlite3 .hg/store/db.sqlite << EOF
    74   $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
    75   > SELECT * FROM filepath;
    75   > SELECT * FROM filepath;
    76   > EOF
    76   > EOF
    77   1|foo
    77   1|foo
    78 
    78 
    79   $ sqlite3 .hg/store/db.sqlite << EOF
    79   $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
    80   > SELECT * FROM fileindex;
    80   > SELECT * FROM fileindex;
    81   > EOF
    81   > EOF
    82   1|1|0|-1|-1|0|0|1||6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe (esc)
    82   1|1|0|-1|-1|0|0|1||6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe (esc)
    83 
    83 
    84   $ sqlite3 .hg/store/db.sqlite << EOF
    84   $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
    85   > SELECT * FROM delta;
    85   > SELECT * FROM delta;
    86   > EOF
    86   > EOF
    87   1|1|	\xd2\xaf\x8d\xd2"\x01\xdd\x8dH\xe5\xdc\xfc\xae\xd2\x81\xff\x94"\xc7|0 (esc)
    87   1|1|	\xd2\xaf\x8d\xd2"\x01\xdd\x8dH\xe5\xdc\xfc\xae\xd2\x81\xff\x94"\xc7|0 (esc)
    88   
    88   
    89 
    89 
    91 
    91 
    92   $ echo 1 > bar
    92   $ echo 1 > bar
    93   $ hg commit -A -m 'add bar'
    93   $ hg commit -A -m 'add bar'
    94   adding bar
    94   adding bar
    95 
    95 
    96   $ sqlite3 .hg/store/db.sqlite << EOF
    96   $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
    97   > SELECT * FROM filedata ORDER BY id ASC;
    97   > SELECT * FROM filedata ORDER BY id ASC;
    98   > EOF
    98   > EOF
    99   1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc)
    99   1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc)
   100   2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc)
   100   2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc)
   101 
   101 
   102 Multiple revisions of a file works
   102 Multiple revisions of a file works
   103 
   103 
   104   $ echo a >> foo
   104   $ echo a >> foo
   105   $ hg commit -m 'modify foo'
   105   $ hg commit -m 'modify foo'
   106 
   106 
   107   $ sqlite3 .hg/store/db.sqlite << EOF
   107   $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF
   108   > SELECT * FROM filedata ORDER BY id ASC;
   108   > SELECT * FROM filedata ORDER BY id ASC;
   109   > EOF
   109   > EOF
   110   1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc)
   110   1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc)
   111   2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc)
   111   2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc)
   112   3|1|foo|1|\xdd\xb3V\xcd\xde1p@\xf7\x8e\x90\xb8*\x8b,\xe9\x0e\xd6j+|0|-1|2|0|3|1 (esc)
   112   3|1|foo|1|\xdd\xb3V\xcd\xde1p@\xf7\x8e\x90\xb8*\x8b,\xe9\x0e\xd6j+|0|-1|2|0|3|1 (esc)