Fossil

Changes On Branch sqlCmdNoRepo
Login

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

Changes In Branch sqlCmdNoRepo Excluding Merge-Ins

This is equivalent to a diff from be81a2fd3c to 384482a87c

2016-01-14
05:34
Add the '--no-repository' option to the 'fossil sqlite3' command and make use of it for the merge5 test. check-in: 2e1ccc6a36 user: mistachkin tags: trunk
2016-01-13
11:53
Add the ".vfslist" command to "fossil sqlite" check-in: 42c4d8f2d5 user: jan.nijtmans tags: trunk
06:19
Simplify the previous check-in. Closed-Leaf check-in: 384482a87c user: mistachkin tags: sqlCmdNoRepo
01:31
Add the '--no-repository' option to the 'fossil sqlite3' command and make use of it for the merge5 test. check-in: 56f74a120d user: mistachkin tags: sqlCmdNoRepo
00:38
The test file directory saved by the test suite infrastructure should be normalized. check-in: be81a2fd3c user: mistachkin tags: trunk
2016-01-12
22:44
Fix a typo in a comment in cache.c. check-in: ca1e4ed3d6 user: drh tags: trunk

Changes to src/sqlcmd.c.

150
151
152
153
154
155
156
157

158
159

160
161
162
163




164
165
166
167
168
169
170
150
151
152
153
154
155
156

157
158

159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174







-
+

-
+




+
+
+
+







  g.db = db;
  return SQLITE_OK;
}

/*
** COMMAND: sqlite3
**
** Usage: %fossil sqlite3 ?DATABASE? ?OPTIONS?
** Usage: %fossil sqlite3 ?FOSSIL_OPTS? ?DATABASE? ?SHELL_OPTS?
**
** Run the standalone sqlite3 command-line shell on DATABASE with OPTIONS.
** Run the standalone sqlite3 command-line shell on DATABASE with SHELL_OPTS.
** If DATABASE is omitted, then the repository that serves the working
** directory is opened.  See https://www.sqlite.org/cli.html for additional
** information.
**
** Fossil Options:
**
**    --no-repository           Skip opening the repository database.
**
** WARNING:  Careless use of this command can corrupt a Fossil repository
** in ways that are unrecoverable.  Be sure you know what you are doing before
** running any SQL commands that modifies the repository database.
**
** The following extensions to the usual SQLite commands are provided:
**
**    content(X)                Return the contenxt of artifact X.  X can be a
192
193
194
195
196
197
198

199
200



201
202
203
204
205
206
207
196
197
198
199
200
201
202
203


204
205
206
207
208
209
210
211
212
213







+
-
-
+
+
+







** Usage example for files_of_checkin:
**
**     CREATE VIRTUAL TABLE temp.foci USING files_of_checkin;
**     SELECT * FROM foci WHERE checkinID=symbolic_name_to_rid('trunk');
*/
void cmd_sqlite3(void){
  extern int sqlite3_shell(int, char**);
  if( !find_option("no-repository", 0, 0)!=0 ){
  db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
  db_close(1);
    db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
    db_close(1);
  }
  sqlite3_shutdown();
  sqlite3_shell(g.argc-1, g.argv+1);
  sqlite3_cancel_auto_extension((void(*)(void))sqlcmd_autoinit);
  g.db = 0;
  g.zMainDbType = 0;
  g.repositoryOpen = 0;
  g.localOpen = 0;

Changes to test/merge5.test.

46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60







-
+







#
# Fossil will write data on $HOME, running 'fossil open' here.
# We need not to clutter the $HOME of the test caller.
set env(HOME) [pwd]

# Construct a test repository
#
exec sqlite3 m5.fossil <$testdir/${testfile}_repo.sql
exec fossil sqlite3 --no-repository m5.fossil <$testdir/${testfile}_repo.sql
fossil rebuild m5.fossil
fossil open m5.fossil
fossil user default drh --user drh
fossil update baseline
checkout-test 10 {
  da5c8346496f3421cb58f84b6e59e9531d9d424d  one.txt
  ed24d19d726d173f18dbf4a9a0f8514daa3e3ca4  three.txt