Re: [fossil-users] proposed patch: symlinks appear as regular files even when allow-symlinks is on
On Fri, Oct 31, 2014 at 8:17 AM, Stephan Beal sgb...@googlemail.com wrote: + char zValue[4] = {0,0,0,0}; + int i; + snprintf(zValue, sizeof(zValue), %s, blob_str(content)); Minor nitpick: snprintf() is not c89. i would recommend using another blob for zValue, and blob_appendf(). Or, since we only care if zValue is on or off, expand the if() around that and set zValue to either on or off directly, as opposed to copying the value from content. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do. -- Bigby Wolf ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Larger diff possible?
Hello All, Take a look at this change: http://www.fossil-scm.org/fossil/vinfo/de17e35bf12a8585f5c151c8b4ab3f8d36b6f0c8?sbs=1 We have the left and right view of the change. Is there a way to maximize this view to have a side-by-side view of the diffs? I see that you can undiff to make it color code the changes, but the text is still rather small. Thanks, jb -- inum: 883510009027723 sip: jungleboo...@sip2sip.info xmpp: jungle-boo...@jit.si ___ 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] Larger diff possible?
On Fri, Oct 31, 2014 at 11:01 AM, Jungle Boogie jungleboog...@gmail.com wrote: Hello All, Take a look at this change: http://www.fossil-scm.org/fossil/vinfo/de17e35bf12a8585f5c151c8b4ab3f 8d36b6f0c8?sbs=1 We have the left and right view of the change. Is there a way to maximize this view to have a side-by-side view of the diffs? How is the link above not a side-by-side view of the diff? -- D. Richard Hipp d...@sqlite.org ___ 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] Larger diff possible?
Dear Richard, From: Richard Hipp d...@sqlite.org Sent: Fri, 31 Oct 2014 11:19:04 -0400 To: Fossil SCM user's discussion fossil-users@lists.fossil-scm.org Subject: Re: [fossil-users] Larger diff possible? On Fri, Oct 31, 2014 at 11:01 AM, Jungle Boogie jungleboog...@gmail.com wrote: Hello All, Take a look at this change: http://www.fossil-scm.org/fossil/vinfo/de17e35bf12a8585f5c151c8b4ab3f 8d36b6f0c8?sbs=1 We have the left and right view of the change. Is there a way to maximize this view to have a side-by-side view of the diffs? How is the link above not a side-by-side view of the diff? It absolutely is a side-by-side. I'm asking if its possible to maximize or display the diffs in a larger format with larger font. Thanks, J -- inum: 883510009027723 sip: jungleboo...@sip2sip.info xmpp: jungle-boo...@jit.si ___ 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] Larger diff possible?
Jungle Boogie wrote: It absolutely is a side-by-side. I'm asking if its possible to maximize or display the diffs in a larger format with larger font. Try holding down the Control key and then hitting the Equals key = on your keyboard a few times. In most browers these days, that zooms in the whole page while trying to keep things in relative proportion. You can zoom back out by holding down Control and hitting the Minus key -. -- Eric A. Rubin-Smith Aterlo Networks, Inc. http://aterlo.com ___ 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] Larger diff possible?
On Fri, Oct 31, 2014 at 4:53 PM, Eric Rubin-Smith eas@gmail.com wrote: Try holding down the Control key and then hitting the Equals key = on your keyboard a few times. In most browers these days, that zooms in the whole page while trying to keep things in relative proportion. Ctrl-mousewheel does the same in most. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do. -- Bigby Wolf ___ 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] proposed patch: symlinks appear as regular files even when allow-symlinks is on
Since you all are looking at symlinks someone reported to me that there are problems when a symlink is replaced with a directory or vice versa. Here is the script that he generated to illustrate the issue: ## Create repo and initial population fossil init bare.repo mkdir link_target_dir touch link_target_file mkdir work1 cd work1 fossil open ../bare.repo touch file mkdir dir1 touch dir1/file1 ln -s ../link_target_file . ln -s ../link_target_dir . fossil add * fossil commit -m add initial files . ## Clone repo cd .. mkdir work2 cd work2 fossil open ../bare.repo ## Change file types in repo cd ../work1 echo Removing targets fossil rm dir1 file link_target_dir link_target_file fossil commit -m remove all . chmod -R 700 dir1 file link_target_dir link_target_file rm -rf dir1 file link_target_dir link_target_file echo Creating new targets swapping types ln -s ../link_target_dir dir1 ln -s ../link_target_file file mkdir link_target_dir touch link_target_file touch link_target_dir/file2 echo Adding to fossil fossil add * echo Commiting fossil commit -m switch all types . ## Attempt pull in clone cd ../work2 ## At this command Fossil fails because it cannot swap the directory dir1 for the link that was created in it's place fossil update exit On Fri, Oct 31, 2014 at 3:11 AM, Richard Hipp d...@sqlite.org wrote: On Fri, Oct 31, 2014 at 3:17 AM, Stephan Beal sgb...@googlemail.com wrote: + char zValue[4] = {0,0,0,0}; + int i; + snprintf(zValue, sizeof(zValue), %s, blob_str(content)); Minor nitpick: snprintf() is not c89. i would recommend using another blob for zValue, and blob_appendf(). sqlite3_snprintf() is guaranteed to be available. Note, though, that the first two parameters are reversed. :-\ -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- Matt -=- 90% of the nations wealth is held by 2% of the people. Bummer to be in the majority... ___ 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] Larger diff possible?
Dear Stephan, From: Stephan Beal sgb...@googlemail.com Sent: Fri, 31 Oct 2014 17:03:55 +0100 To: Fossil SCM user's discussion fossil-users@lists.fossil-scm.org Subject: Re: [fossil-users] Larger diff possible? On Fri, Oct 31, 2014 at 4:53 PM, Eric Rubin-Smith eas@gmail.com wrote: Try holding down the Control key and then hitting the Equals key = on your keyboard a few times. In most browers these days, that zooms in the whole page while trying to keep things in relative proportion. Ctrl-mousewheel does the same in most. So the answer is: the side-by-side diff view is the largest and only image available. You can zoom in on the image via web browser but this will maximize everything--not just the diff. -- inum: 883510009027723 sip: jungleboo...@sip2sip.info xmpp: jungle-boo...@jit.si ___ 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] Larger diff possible?
Thus said Jungle Boogie on Fri, 31 Oct 2014 09:17:33 -0700: So the answer is: the side-by-side diff view is the largest and only image available. You can zoom in on the image via web browser but this will maximize everything--not just the diff. I think you can change the font size of the side-by-side diff using CSS. The default uses a font-size: xx-small, but you can override that with whatever you choose. Andy -- TAI64 timestamp: 40005453bd2b ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Fossil Emacs
Is http://chiselapp.com/user/venks/repository/emacs-fossil/doc/tip/doc/index.wiki known ? If not, consider this as an FYI ;) -- Andreas Kupries Senior Tcl Developer Code to Cloud: Smarter, Safer, Fasterâ„¢ F: 778.786.1133 andre...@activestate.com, http://www.activestate.com Learn about Stackato for Private PaaS: http://www.activestate.com/stackato 21'st Tcl/Tk Conference: Nov 10-14, Portland, OR, USA -- http://www.tcl.tk/community/tcl2014/ Send mail to tclconfere...@googlegroups.com, by Sep 8 Registration is open. ___ 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] Larger diff possible?
Dear Andy, Fossil-users, From: Andy Bradford amb-sendok-1417366026.oiljbdnhldcckggde...@bradfords.org Sent: 31 Oct 2014 10:47:05 -0600 To: Jungle Boogie Cc: fossil-users@lists.fossil-scm.org Subject: Re: [fossil-users] Larger diff possible? Thus said Jungle Boogie on Fri, 31 Oct 2014 09:17:33 -0700: So the answer is: the side-by-side diff view is the largest and only image available. You can zoom in on the image via web browser but this will maximize everything--not just the diff. I think you can change the font size of the side-by-side diff using CSS. The default uses a font-size: xx-small, but you can override that with whatever you choose. Oh, yes, this did it! I should correct myself and say this is not an image but text. Thanks everyone who responded! Andy -- TAI64 timestamp: 40005453bd2b -- inum: 883510009027723 sip: jungleboo...@sip2sip.info xmpp: jungle-boo...@jit.si ___ 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] fossil export to git unsupported command: blob
It has been almost 2 years, and I'm still having the same issue. fossil export --git ..\cerod.fossil | git fast-import fatal: Unsupported command: blob fast-import: dumping crash report to .git/fast_import_crash_4416 If anyone has any thoughts, they would be much appreciated. On Tue, Jan 29, 2013 at 4:46 PM, E. Timothy Uy t...@loqu8.com wrote: Incidentally, I'm using git version 1.8.0.msysgit.0 On Tue, Jan 29, 2013 at 4:44 PM, E. Timothy Uy t...@loqu8.com wrote: Hi, I'm currently using fossil 1.24 and have a requirement to export to git. However, in running fossil export --git ..\repo.fossil | git fast-import I ran into unsupported command: blob. Any idea why this might be happening? fatal: Unsupported command: blob fast-import: dumping crash report to .git/fast_import_crash_140 Here's the crash report: fast-import crash report: fast-import process: 140 parent process : 1 at Tue Jan 29 16:40:28 2013 fatal: Unsupported command: blob Most Recent Commands Before Crash - * blob Active Branch LRU - active_branches = 0 cur, 5 max pos clock name ~ Inactive Branches - Marks - --- END OF CRASH REPORT ___ 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] fossil export to git unsupported command: blob
Perhaps this sheds a clue? http://repo.or.cz/w/sqlite-export.git/blob/master:/README.txt On Fri, Oct 31, 2014 at 1:33 PM, E. Timothy Uy t...@loqu8.com wrote: It has been almost 2 years, and I'm still having the same issue. fossil export --git ..\cerod.fossil | git fast-import fatal: Unsupported command: blob fast-import: dumping crash report to .git/fast_import_crash_4416 If anyone has any thoughts, they would be much appreciated. On Tue, Jan 29, 2013 at 4:46 PM, E. Timothy Uy t...@loqu8.com wrote: Incidentally, I'm using git version 1.8.0.msysgit.0 On Tue, Jan 29, 2013 at 4:44 PM, E. Timothy Uy t...@loqu8.com wrote: Hi, I'm currently using fossil 1.24 and have a requirement to export to git. However, in running fossil export --git ..\repo.fossil | git fast-import I ran into unsupported command: blob. Any idea why this might be happening? fatal: Unsupported command: blob fast-import: dumping crash report to .git/fast_import_crash_140 Here's the crash report: fast-import crash report: fast-import process: 140 parent process : 1 at Tue Jan 29 16:40:28 2013 fatal: Unsupported command: blob Most Recent Commands Before Crash - * blob Active Branch LRU - active_branches = 0 cur, 5 max pos clock name ~ Inactive Branches - Marks - --- END OF CRASH REPORT ___ 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] fossil export to git unsupported command: blob
Looks like there is a ticket to this and it related to CRLF on Windows - http://www.fossil-scm.org/index.html/tktview?name=feeb8a91eb - will try Mac. On Fri, Oct 31, 2014 at 1:46 PM, E. Timothy Uy t...@loqu8.com wrote: Perhaps this sheds a clue? http://repo.or.cz/w/sqlite-export.git/blob/master:/README.txt On Fri, Oct 31, 2014 at 1:33 PM, E. Timothy Uy t...@loqu8.com wrote: It has been almost 2 years, and I'm still having the same issue. fossil export --git ..\cerod.fossil | git fast-import fatal: Unsupported command: blob fast-import: dumping crash report to .git/fast_import_crash_4416 If anyone has any thoughts, they would be much appreciated. On Tue, Jan 29, 2013 at 4:46 PM, E. Timothy Uy t...@loqu8.com wrote: Incidentally, I'm using git version 1.8.0.msysgit.0 On Tue, Jan 29, 2013 at 4:44 PM, E. Timothy Uy t...@loqu8.com wrote: Hi, I'm currently using fossil 1.24 and have a requirement to export to git. However, in running fossil export --git ..\repo.fossil | git fast-import I ran into unsupported command: blob. Any idea why this might be happening? fatal: Unsupported command: blob fast-import: dumping crash report to .git/fast_import_crash_140 Here's the crash report: fast-import crash report: fast-import process: 140 parent process : 1 at Tue Jan 29 16:40:28 2013 fatal: Unsupported command: blob Most Recent Commands Before Crash - * blob Active Branch LRU - active_branches = 0 cur, 5 max pos clock name ~ Inactive Branches - Marks - --- END OF CRASH REPORT ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] fossil export to git fatal: mark :60713 not declared
I was able to import see.fossil and cerod.fossil from Cygwin with no issues. However for SQLite, $ fossil export --git ../../../sqlite.fossil | git fast-import fatal: mark :60713 not declared fast-import: dumping crash report to ./.git/modules/src/sqlite/fast_import_crash_1168 From the crash report: fast-import crash report: fast-import process: 1168 parent process : 1 at Fri Oct 31 22:59:48 2014 fatal: mark :60713 not declared commit refs/heads/trunk mark :60705 committer drh drh 1257341402 + data 83 from :60691 M 100644 :60706 src/main.c M 100644 :60698 src/sqliteInt.h commit refs/heads/shunning_error mark :60721 committer drh drh 1257360677 + data 24 * from :60713 ___ 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] proposed patch: symlinks appear as regular files even when allow-symlinks is on
Richard Hipp wrote: sqlite3_snprintf() is guaranteed to be available. Note, though, that the first two parameters are reversed. :-\ Well, I only really want to copy up to 3 bytes, so we can keep it simple, stupid and just not make a function call. The revised patch is below. But in further testing, I noticed that there is a series of fossil calls involving a sequence of on/off settings to allow-symlinks intermixed with 'fossil update', 'rm', etc that would result in fossil starting to return errors on 'update'. I'm not convinced yet that it is a regression, but the below should be treated with caution until I've had a chance to look at it further. I probably won't get back to that for at least 10 days, though. Someone else can feel free to pick it up from here if they would like. To Stephan's earlier point about just looking specifically for on and off: I would prefer not to do that, since it duplicates logic from is_truth(). (Maybe the fossil devs will want to allow y in the future or something, and I wouldn't want a little gotcha lurking in the present patch when that happens. And in any case just looking for yes would skip the present valid values of 1, on, and true.) [miami:src] $ fossil diff Index: src/vfile.c == --- src/vfile.c +++ src/vfile.c @@ -268,21 +268,29 @@ int promptFlag /* Prompt user to confirm overwrites */ ){ Stmt q; Blob content; int nRepos = strlen(g.zLocalRoot); + char bSawSymlinkSetting = 0; + /* In order to properly write out symlinks rather than regular files, + ** we must first observe the .fossil-settings/allow-symlinks file if it + ** exists. If it does, we want to make sure we see it prior to any + ** symlink files. This is why we sort ascending by 'islink'. + */ if( vid0 id==0 ){ db_prepare(q, SELECT id, %Q || pathname, mrid, isexe, islink FROM vfile -WHERE vid=%d AND mrid0, +WHERE vid=%d AND mrid0 +ORDER BY islink ASC, g.zLocalRoot, vid); }else{ assert( vid==0 id0 ); db_prepare(q, SELECT id, %Q || pathname, mrid, isexe, islink FROM vfile -WHERE id=%d AND mrid0, +WHERE id=%d AND mrid0 +ORDER BY islink ASC, g.zLocalRoot, id); } while( db_step(q)==SQLITE_ROW ){ int id, rid, isExe, isLink; const char *zName; @@ -291,10 +299,21 @@ zName = db_column_text(q, 1); rid = db_column_int(q, 2); isExe = db_column_int(q, 3); isLink = db_column_int(q, 4); content_get(rid, content); +if( !bSawSymlinkSetting +zName[nRepos]=='.' zName[nRepos+1]=='f' zName[nRepos+2]=='o' +strcmp(zName[nRepos], .fossil-settings/allow-symlinks)==0 +){ + char zValue[4] = {0,0,0,0}; + int i=0; + bSawSymlinkSetting = 1; + const char* zCont = blob_str(content); + while( i3 zCont[i]!=0 zCont[i]!='\n' ){zValue[i]=zCont[i]; ++i;} + g.allowSymlinks = is_truth(zValue); +} if( file_is_the_same(content, zName) ){ blob_reset(content); if( file_wd_setexe(zName, isExe) ){ db_multi_exec(UPDATE vfile SET mtime=%lld WHERE id=%d, file_wd_mtime(zName), id); -- Eric A. Rubin-Smith Aterlo Networks, Inc. http://aterlo.com ___ 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] proposed patch: symlinks appear as regular files even when allow-symlinks is on
Another iteration. We need to add an extra byte in case the true value is the string true. I've re-expressed the loop as a 'for' loop while I was at it. Sorry for the spam. Again, please treat the below with caution until I have (or someone else has) a chance to exercise it better. Index: src/vfile.c == --- src/vfile.c +++ src/vfile.c @@ -268,21 +268,29 @@ int promptFlag /* Prompt user to confirm overwrites */ ){ Stmt q; Blob content; int nRepos = strlen(g.zLocalRoot); + char bSawSymlinkSetting = 0; + /* In order to properly write out symlinks rather than regular files, + ** we must first observe the .fossil-settings/allow-symlinks file if it + ** exists. If it does, we want to make sure we see it prior to any + ** symlink files. This is why we sort ascending by 'islink'. + */ if( vid0 id==0 ){ db_prepare(q, SELECT id, %Q || pathname, mrid, isexe, islink FROM vfile -WHERE vid=%d AND mrid0, +WHERE vid=%d AND mrid0 +ORDER BY islink ASC, g.zLocalRoot, vid); }else{ assert( vid==0 id0 ); db_prepare(q, SELECT id, %Q || pathname, mrid, isexe, islink FROM vfile -WHERE id=%d AND mrid0, +WHERE id=%d AND mrid0 +ORDER BY islink ASC, g.zLocalRoot, id); } while( db_step(q)==SQLITE_ROW ){ int id, rid, isExe, isLink; const char *zName; @@ -291,10 +299,21 @@ zName = db_column_text(q, 1); rid = db_column_int(q, 2); isExe = db_column_int(q, 3); isLink = db_column_int(q, 4); content_get(rid, content); +if( !bSawSymlinkSetting +zName[nRepos]=='.' zName[nRepos+1]=='f' zName[nRepos+2]=='o' +strcmp(zName[nRepos], .fossil-settings/allow-symlinks)==0 +){ + char zValue[5] = {0,0,0,0,0}; + int i; + bSawSymlinkSetting = 1; + const char* zCont = blob_str(content); + for(i=0; i4 zCont[i]!=0 zCont[i]!='\n';++i ){ zValue[i]=zCont[i]; } + g.allowSymlinks = is_truth(zValue); +} if( file_is_the_same(content, zName) ){ blob_reset(content); if( file_wd_setexe(zName, isExe) ){ db_multi_exec(UPDATE vfile SET mtime=%lld WHERE id=%d, file_wd_mtime(zName), id); -- Eric A. Rubin-Smith Aterlo Networks, Inc. http://aterlo.com ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users