Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Rename the "fossil chat backup" command to "fossil chat pull". |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
8ee8f03a77f23d3630c6c0264f08cdeb |
| User & Date: | drh 2022-02-18 20:49:05.623 |
Context
|
2022-02-18
| ||
| 22:05 | Do not try to uncompress generic HTTP content when the NOCOMPRESS flag is set. ... (check-in: 66ef906118 user: drh tags: trunk) | |
| 20:49 | Rename the "fossil chat backup" command to "fossil chat pull". ... (check-in: 8ee8f03a77 user: drh tags: trunk) | |
| 20:32 | For "fossil chat backup", when transfering content from the transfer table into the repository, be explicit about column names, as the column names might be in a different order. ... (check-in: e983a7dc93 user: drh tags: trunk) | |
Changes
Changes to src/chat.c.
| ︙ | ︙ | |||
820 821 822 823 824 825 826 827 828 829 830 831 832 833 |
/*
** WEBPAGE: chat-backup hidden
**
** Download an SQLite database containing all chat content with a
** message-id larger than the "msgid" query parameter. Setup
** privilege is required to use this URL.
*/
void chat_backup_webpage(void){
int msgid;
unsigned char *pDb = 0;
sqlite3_int64 szDb = 0;
Blob chatDb;
login_check_credentials();
| > > | 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 |
/*
** WEBPAGE: chat-backup hidden
**
** Download an SQLite database containing all chat content with a
** message-id larger than the "msgid" query parameter. Setup
** privilege is required to use this URL.
**
** This is used to implement the "fossil chat pull" command.
*/
void chat_backup_webpage(void){
int msgid;
unsigned char *pDb = 0;
sqlite3_int64 szDb = 0;
Blob chatDb;
login_check_credentials();
|
| ︙ | ︙ | |||
866 867 868 869 870 871 872 | ** ** When there is no SUBCOMMAND (when this command is simply "fossil chat") ** the response is to bring up a web-browser window to the chatroom ** on the default system web-browser. You can accomplish the same by ** typing the appropriate URL into the web-browser yourself. This ** command is merely a convenience for command-line oriented people. ** | | | | 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 | ** ** When there is no SUBCOMMAND (when this command is simply "fossil chat") ** the response is to bring up a web-browser window to the chatroom ** on the default system web-browser. You can accomplish the same by ** typing the appropriate URL into the web-browser yourself. This ** command is merely a convenience for command-line oriented people. ** ** > fossil chat pull ** ** Copy chat content from the server down into the local clone, ** as a backup or archive. Setup privilege is required on the server. ** ** --all Download all chat content. Normally only ** previously undownloaded content is retrieved. ** --debug Additional debugging output. ** --out DATABASE Store CHAT table in separate database file ** DATABASE rather that adding to local clone ** --unsafe Allow the use of unencrypted http:// |
| ︙ | ︙ | |||
1021 1022 1023 1024 1025 1026 1027 |
fossil_print("ERROR: username and/or password is incorrect\n");
}else{
fossil_print("ERROR: %s\n", blob_str(&down));
}
fossil_fatal("unable to send the chat message");
}
blob_reset(&down);
| | | 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
fossil_print("ERROR: username and/or password is incorrect\n");
}else{
fossil_print("ERROR: %s\n", blob_str(&down));
}
fossil_fatal("unable to send the chat message");
}
blob_reset(&down);
}else if( strcmp(g.argv[2],"pull")==0 ){
/* Pull the CHAT table from the default server down into the repository
** here on the local side */
int allowUnsafe = find_option("unsafe",0,0)!=0;
int bDebug = find_option("debug",0,0)!=0;
const char *zOut = find_option("out",0,1);
int bAll = find_option("all",0,0)!=0;
int mFlags = HTTP_GENERIC | HTTP_QUIET | HTTP_NOCOMPRESS;
|
| ︙ | ︙ |