Re: [fossil-users] Windows GUI that allows diff between two, revisions?
> 1. Could you explain how to configure Fossil to use WinMerge to diff > two revisions?One-off: fossil gdiff --command "\"C:\Program Files (x86)\WinMerge\WinMergeU.exe\"" --from FROM_VERSION --to TO_VERSION To use WinMerge as the visual diff tool: fossil settings gdiff-command --global "\"C:\Program Files (x86)\WinMerge\WinMergeU.exe\"" then simply drop the '--command' argument from 'fossil gdiff'. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Linker warnings with VS2015
Hi, This does not look to be a problem with serious consequences, but if one wants to have a completely clean build, it might be interesting to investigate this further. When compiling version 048738b28 with VS2015 I get two "locally defined" linking warnings coming from zlib: zlib.lib(zutil.obj) : warning LNK4217: locally defined symbol _free imported in function _zcfree zlib.lib(zutil.obj) : warning LNK4217: locally defined symbol _malloc imported in function _zcalloc After googling it [1], it looks like this is due to mismatch between zlib and fossil compiler options for runtime selection (static multi-threaded vs. dynamic). Indeed zlib.lib is compiled with -MD (line 29 in compat\zlib\win32\Makefile.msc) and fossil static with -MT (line 235 in win\Makefile.msc). Compiling zlib with -MT eliminates the warnings, neverless when doing this from the fossil Makefile (by adding `LOC=-MT' in line 677) one gets another VS warning about overriding options (which cannot be disabled). I am not an expert, what could be a clean solution here (without touching zlib's Makefile)? Best regards, Daniel [1] https://stackoverflow.com/a/6979586 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Curiosity question: is there a recap of add/change/remove on a per-file report
Hi, A patch (against trunk, 14d8d31b1a) that adds the option '--numstat' to 'fossil diff' for functionality similar to 'git diff --numstat': for each file in the diff a line is output with three elements: number of added lines, number of removed lines, and the file path, separated with tabs. Best regards, Daniel Am 19.06.2017 um 23:19 schrieb Ross Berteig: > On 6/18/2017 7:22 PM, The Tick wrote: >> Just wondering if this exists or if it would have to be scripted -- a >> way to get a per-file recap of added/changed/removed lines for the >> files in a commit. It would be a way to quickly gauge the amount of >> changes that had occurred. > > Of course there's the simple list provided by "fossil changes", but that > only shows file names which changed. > > There's aksi "fossil diff --brief", which also only shows file names > with changes. Without the --brief option, it shows the entire change, > which is more than you wanted. But it does support the --checkin option > which shows what changed in that particular checkin. > > If you configure fossil to use an external diff utility, you might be > able to find one that has a summary mode that is more verbose than > --brief and less complete than the usual output. The somewhat elderly > GNU diff I have here on my Windows box (version 2.8.7 built in 2004 > apparently) does not have such an option. Read about "fossil set > diff-command" for how to do that. > Index: src/diff.c == --- src/diff.c +++ src/diff.c @@ -39,2 +39,3 @@ #define DIFF_LINENO ((u64)0x4000) /* Show line numbers */ +#define DIFF_NUMSTAT ((u64)0x8000) /* Show statistics */ #define DIFF_NOOPT(((u64)0x01)<<32) /* Suppress optimizations (debug) */ @@ -1958,2 +1959,3 @@ ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS +** --numstat Display statistics DIFF_NUMSTAT */ @@ -1988,2 +1990,3 @@ if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO; + if( find_option("numstat",0,0)!=0 ) diffFlags |= DIFF_NUMSTAT; if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT; Index: src/diffcmd.c == --- src/diffcmd.c +++ src/diffcmd.c @@ -111,3 +111,3 @@ void diff_print_index(const char *zFile, u64 diffFlags){ - if( (diffFlags & (DIFF_SIDEBYSIDE|DIFF_BRIEF))==0 ){ + if( (diffFlags & (DIFF_SIDEBYSIDE|DIFF_BRIEF|DIFF_NUMSTAT))==0 ){ char *z = mprintf("Index: %s\n%.66c\n", zFile, '='); @@ -200,2 +200,18 @@ } + } + else if( diffFlags & DIFF_NUMSTAT ){ + int *R; + int r; + int linesDeleted = 0; + int linesAdded = 0; + if( fSwapDiff ) { + R = text_diff(, pFile1, 0, 0, diffFlags); + }else{ + R = text_diff(pFile1, , 0, 0, diffFlags); + } + for(r=0; R[r] || R[r+1] || R[r+2]; r += 3){ + linesDeleted += R[r+1]; + linesAdded += R[r+2]; + } + fossil_print("%d\t%d\t%s\n", linesAdded, linesDeleted, zName); }else{ @@ -309,2 +325,15 @@ if( diffFlags & DIFF_BRIEF ) return; + if( diffFlags & DIFF_NUMSTAT ){ + int *R; + int r; + int linesDeleted = 0; + int linesAdded = 0; + R = text_diff(pFile1, pFile2, 0, 0, diffFlags); + for(r=0; R[r] || R[r+1] || R[r+2]; r += 3){ + linesDeleted += R[r+1]; + linesAdded += R[r+2]; + } + fossil_print("%d\t%d\t%s\n", linesAdded, linesDeleted, zName); + return; + } if( zDiffCmd==0 ){ @@ -860,2 +889,3 @@ int againstUndo = 0; /* Diff against files in the undo buffer */ + int numStat = 0; /* Print diff statistics */ u64 diffFlags = 0; /* Flags to control the DIFF */ ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Password prompt with SSH protocol on Windows?
On 11.12.2015 06:19, Andy Bradford said: >> when called as a process [1]. I don't know if this can be solved >> inside fossil; a workaround is to use a modified plink, e.g. that from >> TortoiseSVN. > > You can configure Fossil to use the modified plink. Use: > > fossil clone --ssh-command /path/to/modified/plink.exe -T -e none ... That is exactly what I've done (and more, i.e. "fossil settings --global ssh-command PATH"). > >> Still there seems to be another problem with fossil: it does not pass >> the password to plink when it was given on the command line as in >> user:pass@host:port. > This is because Fossil does not interact with SSH, the end user does. > Fossil forks an SSH command, and you, the user, interact with any > prompts the SSH process issues. When you have completed entering > password information into SSH, Fossil now has a set of encrypted pipes > to read/write to via stdin/stdout. I agree. Still the documentation (e.g. fossil clone) mentions this possibility for ssh URL's ([userid[:password]@]host), so in my opinion either fossil passes the password further to plink (it cannot do this on Linux to ssh, since that one has no password argument), or it removes this altogether from documentation. Would it be an idea to detect the case Windows and no Pageant (or maybe add some new "-p" fossil argument) and implement password prompt inside fossil? Just contemplating... Side note: as for the security risk, I agree in principle, but since the user has already decided to type in his password on fossil's command line, the evil is there and passing it to plink makes it no worse. Daniel ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Password prompt with SSH protocol on Windows?
> Why can’t you just use SSH keys? The wish for automated login without > leaking passwords is exactly the problem they solve. I can and I do. But maybe other users cannot, and they get tempted by that :password bit. Or they like to carry on a stick plink next to their fossil executable, so they are really portable and not depend on the host's software. By the way: Does the whole reasoning not hold for https URLs? They allow a password on the command line, too. >> remove this altogether from documentation. > Agreed. Was done. The user name is still cut off at a possible colon (now undocumented), but I guess that's ok, given the usual [a-z_][a-z0-9_-]*[$] rule for user names. >> Side note: as for the security risk, I agree in principle, but since the >> user has already decided to type in his password on fossil's command >> line, the evil is there and passing it to plink makes it no worse. > > A password interactively typed into ssh/plink is as secure as the box it’s > running on. My example was for cases where the user does *not* type his password into plink since, well, vanilla plink launched by another process does not prompt for a password - the initial reason for my post. Maybe it is best to mention this issue in the (html) documentation and suggest alternatives, i.e. either use TortoisePlink or plink -i (or Pageant, of course). Daniel ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Password prompt with SSH protocol on Windows?
Hi, Coming back to my own unanswered question: it seems like it has to do with standard (PuTTY) plink's inability to hook itself to console input when called as a process [1]. I don't know if this can be solved inside fossil; a workaround is to use a modified plink, e.g. that from TortoiseSVN. Still there seems to be another problem with fossil: it does not pass the password to plink when it was given on the command line as in user:pass@host:port. Maybe something along these lines ("-p pass")? http://www.fossil-scm.org/index.html/artifact/c6f2ce84?ln=104-106 Thanks, Daniel [1] http://stackoverflow.com/questions/3947551/cant-type-password-or-anything-else-into-plink-with-svnssh On 04.12.2015 11:48, Daniel Dumitriu wrote: > Hi, > > I'm having problems using Fossil with the SSH protocol on Windows 8.1. > Somehow the password is not being prompted for. Interestingly enough, > when I run the relevant plink command by itself, the password prompt > comes up and connection succeeds. > > Using keys (Pageant) works though - at least if one ignores the "Unable > to write to standard output: The pipe is being closed." message. > > Below are the relevant output excerpts. > > Thanks, > Daniel ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Password prompt with SSH protocol on Windows?
Hi, I'm having problems using Fossil with the SSH protocol on Windows 8.1. Somehow the password is not being prompted for. Interestingly enough, when I run the relevant plink command by itself, the password prompt comes up and connection succeeds. Using keys (Pageant) works though - at least if one ignores the "Unable to write to standard output: The pipe is being closed." message. Below are the relevant output excerpts. Thanks, Daniel $ fossil version This is fossil version 1.34 [5032c50d14] 2015-12-04 00:40:25 UTC $ plink -V plink: Release 0.66 $ fossil clone --once --sshtrace --verbose --ssh-command "plink -ssh -T -v" ssh://p**@d***.**:2224/repos/fossil/testssh.fossil testssh.fossil Bytes Cards Artifacts Deltas waiting for server... plink -ssh -T -v -P 2224 p**@d***.** fossil test-http repos/fossil/testssh.fossil Looking up host "d***.**" Connecting to *.*.***.43 port 2224 We claim version: SSH-2.0-PuTTY_Release_0.66 Server version: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 We believe remote version has SSH-2 channel request bug Using SSH protocol version 2 Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange with hash SHA-256 Host key fingerprint is: ssh-rsa 4096 20:b2:**:**:**:**:**:**:**:**:**:**:**:**:**:** Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA-256 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA-256 server->client MAC algorithm Using username "p**". $ plink -ssh -T -v -P 2224 p**@d***.** fossil test-http repos/fossil/testssh.fossil Looking up host "d***.**" Connecting to *.*.***.** port 2224 We claim version: SSH-2.0-PuTTY_Release_0.66 Server version: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 We believe remote version has SSH-2 channel request bug Using SSH protocol version 2 Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange with hash SHA-256 Host key fingerprint is: ssh-rsa 4096 20:b2:**:**:**:**:**:**:**:**:**:**:**:**:**:** Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA-256 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA-256 server->client MAC algorithm Using username "p**". p**@d***.**'s password: > fossil clone --once --sshtrace --verbose --ssh-command "plink -ssh -T -v" ssh://p**@d***.**:2224/repos/fossil/testssh.fossil testssh.fossil Bytes Cards Artifacts Deltas waiting for server... plink -ssh -T -v -P 2224 p**@d***.** fossil test-http repos/fossil/testssh.fossil Looking up host "d***.**" Connecting to *.*.***.43 port 2224 We claim version: SSH-2.0-PuTTY_Release_0.66 Server version: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 We believe remote version has SSH-2 channel request bug Using SSH protocol version 2 Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange with hash SHA-256 Host key fingerprint is: ssh-rsa 4096 20:b2:**:**:**:**:**:**:**:**:**:**:**:**:**:** Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA-256 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA-256 server->client MAC algorithm Pageant is running. Requesting keys. Pageant has 1 SSH-2 keys Using username "p**". Trying Pageant key #0 Authenticating with public key "d***-*_-**-**" from agent Sending Pageant's response Access granted Opening session as main channel Opened main channel Started a shell/command Got line: [Status: 200 OK] Got line: [X-Frame-Options: SAMEORIGIN] Got line: [Cache-control: no-cache] Got line: [Content-Type: application/x-fossil-uncompressed; charset=utf-8] Got line: [Content-Length: 638] Got line: [] Reading 638 bytes with 1 on hand... Got 638 bytes Sent: 53 1 0 0 Received: 638 9 3 0 waiting for server...Got line: [Status: 200 OK] Got line: [X-Frame-Options: SAMEORIGIN] Got line: [Cache-control: no-cache] Got line: [Content-Type: application/x-fossil; charset=utf-8] Got line: [Content-Length: 404] Got line: [] Reading 404 bytes with 0 on hand... Got 404 bytes Sent: 58 2 0 0 Received: 694 5 0 0 Clone done, sent: 567 received: 1343 ip: d***.** Sent EOF message Unable to write to standard output: The pipe is being closed. Rebuilding repository meta-data... 100.0% complete... Extra delta compression... Vacuuming the database... project-id: c0f7a2da10af3a2fb8ffe6c2124b672756c96382 server-id: b210faec39b4c2d0792c71d618f2e34ef073387f admin-user: p** (password is "872519") ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users