Fossil

Check-in [03b68698]
Login

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

Overview
Comment:Enable linenoise multiline editing so long commands and queries may be seen all at once therefore highlighted and copied from xterms
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 03b6869856814edbff3cbec3792797a999e33e59
User & Date: andygoth 2016-11-16 19:29:21
Context
2016-11-18
08:22
Remove some unnecessary spaces. check-in: 467c4269 user: jan.nijtmans tags: trunk
2016-11-16
21:59
Begin work merging new_brlist_page() into brlist_page().

Annoyance: The new open/closed checkboxes don't quite work the way I want them to work. Deselecting both has the effect of selecting both. This makes sense in that if neither the open nor closed query parameters are given, everything should be displayed, rather than nothing. Yet, the user interface would be nicer if deselecting the only selected checkbox causes the other checkbox to be selected. This can't be done with straight HTML because deselecting the checkbox removes it from the query string, and the server does not know which checkbox was deselected so it cannot force the other one to become selected. As far as I know, JavaScript is required.

Bug: Non-aggregate HAVING clause expressions are evaluated on an arbitrarily chosen row within each group. This breaks closed and open filtering for the command-line branch command and the new checkboxes. But shouldn't this also break non-aggregate result expressions?

Wish: Filter on normal/hidden branches too.

Wish: If a merged-to branch is hidden, don't show it in the resolution column, instead show something else. The latest merged-to? The earliest merged-to?

Wish: Branch name filters, just like on the timeline page. check-in: a6a44820 user: andygoth tags: andygoth-branch-list

19:29
Enable linenoise multiline editing so long commands and queries may be seen all at once therefore highlighted and copied from xterms check-in: 03b68698 user: andygoth tags: trunk
19:25
Only #include "linenoise.h" in fshell.c on non-Windows platforms check-in: 9c90682b user: andygoth tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/fshell.c.

59
60
61
62
63
64
65

66
67
68
69
70
71
72
  int fDebug;
  pid_t childPid;
  char *zLine = 0;
  fDebug = find_option("debug", 0, 0)!=0;
  db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
  db_close(0);
  sqlite3_shutdown();

  while( (free(zLine), zLine = linenoise("fossil> ")) ){
    /* Remember shell history within the current session */
    linenoiseHistoryAdd(zLine);

    /* Parse the line of input */
    n = (int)strlen(zLine);
    for(i=0, nArg=1; i<n; i++){







>







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  int fDebug;
  pid_t childPid;
  char *zLine = 0;
  fDebug = find_option("debug", 0, 0)!=0;
  db_find_and_open_repository(OPEN_ANY_SCHEMA|OPEN_OK_NOT_FOUND, 0);
  db_close(0);
  sqlite3_shutdown();
  linenoiseSetMultiLine(1);
  while( (free(zLine), zLine = linenoise("fossil> ")) ){
    /* Remember shell history within the current session */
    linenoiseHistoryAdd(zLine);

    /* Parse the line of input */
    n = (int)strlen(zLine);
    for(i=0, nArg=1; i<n; i++){

Changes to src/sqlcmd.c.

25
26
27
28
29
30
31




32
33
34
35
36
37
38
...
198
199
200
201
202
203
204



205
206
207
208
209
210
211
#if defined(FOSSIL_ENABLE_MINIZ)
#  define MINIZ_HEADER_FILE_ONLY
#  include "miniz.c"
#else
#  include <zlib.h>
#endif





/*
** Implementation of the "content(X)" SQL function.  Return the complete
** content of artifact identified by X as a blob.
*/
static void sqlcmd_content(
  sqlite3_context *context,
  int argc,
................................................................................
  extern int sqlite3_shell(int, char**);
  noRepository = find_option("no-repository", 0, 0)!=0;
  if( !noRepository ){
    db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
  }
  fossil_close(1, noRepository);
  sqlite3_shutdown();



  sqlite3_shell(g.argc-1, g.argv+1);
  sqlite3_cancel_auto_extension((void(*)(void))sqlcmd_autoinit);
  fossil_close(0, noRepository);
}

/*
** This routine is called by the patched sqlite3 command-line shell in order







>
>
>
>







 







>
>
>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
#if defined(FOSSIL_ENABLE_MINIZ)
#  define MINIZ_HEADER_FILE_ONLY
#  include "miniz.c"
#else
#  include <zlib.h>
#endif

#ifndef _WIN32
#  include "linenoise.h"
#endif

/*
** Implementation of the "content(X)" SQL function.  Return the complete
** content of artifact identified by X as a blob.
*/
static void sqlcmd_content(
  sqlite3_context *context,
  int argc,
................................................................................
  extern int sqlite3_shell(int, char**);
  noRepository = find_option("no-repository", 0, 0)!=0;
  if( !noRepository ){
    db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
  }
  fossil_close(1, noRepository);
  sqlite3_shutdown();
#ifndef _WIN32
  linenoiseSetMultiLine(1);
#endif
  sqlite3_shell(g.argc-1, g.argv+1);
  sqlite3_cancel_auto_extension((void(*)(void))sqlcmd_autoinit);
  fossil_close(0, noRepository);
}

/*
** This routine is called by the patched sqlite3 command-line shell in order