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

Overview
Comment:Make "fossil open" and "fossil rm" work on a repository which doesn't have any check-in. (the latter only undoes the effect of a previous "fossil add" then).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:aef638b61003fcf21cf2864d5e2a34d4205f16ba
User & Date: jan.nijtmans 2013-11-20 13:48:35
Context
2013-11-21
23:39
Update to the lastest SQLite that includes the OP_Column rewrite and the constant expression factoring logic. check-in: 8dc9d009 user: drh tags: trunk
01:47
Merge in latest from trunk. check-in: e2929a4b user: andybradford tags: hide-diff-on-vdiff_page
2013-11-20
13:48
Make "fossil open" and "fossil rm" work on a repository which doesn't have any check-in. (the latter only undoes the effect of a previous "fossil add" then). check-in: aef638b6 user: jan.nijtmans tags: trunk
08:57
Add "blame" WEBPAGE, just as "annotate" but giving comparable output as "fossil blame". check-in: d7160dc1 user: jan.nijtmans tags: trunk
Changes

Changes to src/add.c.

314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
** Options:
**   --case-sensitive <BOOL> override case-sensitive setting
**
** See also: addremove, add
*/
void delete_cmd(void){
  int i;
  int vid;
  Stmt loop;

  capture_case_sensitive_option();
  db_must_be_within_tree();
  vid = db_lget_int("checkout", 0);
  if( vid==0 ){
    fossil_fatal("no checkout to remove from");
  }
  db_begin_transaction();
  db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
                filename_collation());
  for(i=2; i<g.argc; i++){
    Blob treeName;
    char *zTreeName;








<




<
<
<
<







314
315
316
317
318
319
320

321
322
323
324




325
326
327
328
329
330
331
** Options:
**   --case-sensitive <BOOL> override case-sensitive setting
**
** See also: addremove, add
*/
void delete_cmd(void){
  int i;

  Stmt loop;

  capture_case_sensitive_option();
  db_must_be_within_tree();




  db_begin_transaction();
  db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
                filename_collation());
  for(i=2; i<g.argc; i++){
    Blob treeName;
    char *zTreeName;

Changes to src/db.c.

2031
2032
2033
2034
2035
2036
2037


2038
2039
2040
2041
2042
2043
2044
  oldArgv = g.argv;
  oldArgc = g.argc;
  azNewArgv[0] = g.argv[0];
  g.argv = azNewArgv;
  g.argc = 3;
  if( oldArgc==4 ){
    azNewArgv[g.argc-1] = oldArgv[3];


  }else{
    azNewArgv[g.argc-1] = db_get("main-branch", "trunk");
  }
  if( keepFlag ){
    azNewArgv[g.argc++] = "--keep";
  }
  checkout_cmd();







>
>







2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
  oldArgv = g.argv;
  oldArgc = g.argc;
  azNewArgv[0] = g.argv[0];
  g.argv = azNewArgv;
  g.argc = 3;
  if( oldArgc==4 ){
    azNewArgv[g.argc-1] = oldArgv[3];
  }else if( !db_exists("SELECT 1 FROM event WHERE type='ci'") ){
    azNewArgv[g.argc-1] = "--latest";
  }else{
    azNewArgv[g.argc-1] = db_get("main-branch", "trunk");
  }
  if( keepFlag ){
    azNewArgv[g.argc++] = "--keep";
  }
  checkout_cmd();