Fossil

Check-in [e11bec70]
Login

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

Overview
Comment:Fixed the is-this-server-mode check to avoid updating cmd_usage stats in server/ui mode even if there is a local checkout.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | usage-command
Files: files | file ages | folders
SHA1: e11bec70efae36e94dee293d1a02f224a00f0dbf
User & Date: stephan 2013-09-03 20:15:25
Context
2013-09-03
21:51
Added -n|-count ### option to list the most recent (or all) history entries, ordered descending by time. check-in: b613c52b user: stephan tags: usage-command
20:15
Fixed the is-this-server-mode check to avoid updating cmd_usage stats in server/ui mode even if there is a local checkout. check-in: e11bec70 user: stephan tags: usage-command
20:04
Fixed a missing db_finalize() in the -clear case. check-in: 3579d1cb user: stephan tags: usage-command
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

505
506
507
508
509
510
511
512


513
514
515
516
517
518
519
      sqlite3_snprintf(sizeof(zCode),zCode,"error code %d",iCode);
    }
  }
  return zCode;
}

static void update_cmd_usage_stats(char const * zCommand){
  if(!g.zLocalRoot) return /* we need a checkout */;


  db_multi_exec("CREATE TABLE IF NOT EXISTS cmd_usage (name,mtime FLOAT);"
                "INSERT INTO cmd_usage (name,mtime) VALUES (%Q,julianday('now'));",
                zCommand);

}

/*







|
>
>







505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
      sqlite3_snprintf(sizeof(zCode),zCode,"error code %d",iCode);
    }
  }
  return zCode;
}

static void update_cmd_usage_stats(char const * zCommand){
  if(g.isHTTP || !g.zLocalRoot) return
    /* we need a checkout and do not want to log the 'ui' bits forked
       by local ui mode.*/;
  db_multi_exec("CREATE TABLE IF NOT EXISTS cmd_usage (name,mtime FLOAT);"
                "INSERT INTO cmd_usage (name,mtime) VALUES (%Q,julianday('now'));",
                zCommand);

}

/*