Re: Cloud storage and web view
On 21-06-15 22:02, Dirk Hohndel wrote: Another morning of hacking, and another set of patches are pushed... This time around I added the ability to store pictures in a git repository. Instead of just storing a reference to a local file we now actually store the pictures themselves in the git repository. We try to be clever about this, so if loading from git, if we can find the pictures (using the picture hash featuer in case they were moved) we don't bother writing the pictures from the repository out into local files. But if we can't find them we do just that. With this I can save my repo to cloud storage and then see my pictures on the web view. In order for that to work you need to open your data file with the latest Subsurface and then save to the cloud again - your local Subsurface needs to be new enough to push the actual pictures out to the server... I did some testing. My log did not contain any pictures, so I added one picture to one dive. Working locally, I saved, and after that forced a save to cloud. Opened the cloud storage, and the picture does show correctly (on the desktop machine that has the picture on disk). Went to the cloud website, see that the modified dive is correctly stored. However, I do not see any reference to the stored picture. Checked the HTML source, and see that there is a div id=divephotos. This does not show any pictures (eg. the one picture I added to one dive). Checked on a second machine. Open cloud in ssrf. I do not see the picture. I do see the reference to the picture (including the path it is stored (on hover on the photos tab) on the (first) desktop machine. I also see a dot where the small thumbnail in the profile is shown. Verified that ssrf is looking at the location of the picture on the originating machine. Verified the local cache and see the file (for the specific dive), in the Pictures subdir. It contains a reference to the picture on the originating machine (so no actual image). Off course, I might be confused how it is supposed to work, but I expected an image in the local cache. Off course, above test with latest master :-) best, --jan ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Hi Jan, as discussed on IRC, here's a quick patch, just to get some idea on what's going wrong for you... Save it somewhere and apply it with patch -p1 /tmp/diff rebuild and run Subsurface, make a small change and save to the cloud again then please send me the stderr output Thanks /D diff --git a/save-git.c b/save-git.c index 1914a07eed78..3fbfa6a923c8 100644 --- a/save-git.c +++ b/save-git.c @@ -564,8 +564,10 @@ static int blob_insert_fromdisk(git_repository *repo, struct dir *tree, const ch git_oid blob_id; ret = git_blob_create_fromdisk(blob_id, repo, filepath); - if (ret) + if (ret) { + fprintf(stderr, error when inserting the blob\n); return ret; + } return tree_insert(tree-files, filename, 1, blob_id, GIT_FILEMODE_BLOB); } @@ -624,13 +626,16 @@ static int save_one_picture(git_repository *repo, struct dir *dir, struct pictur offset -= h *3600; error = blob_insert(repo, dir, buf, %c%02u=%02u=%02u, sign, h, FRACTION(offset, 60)); + fprintf(stderr, stored picture information for %s, error code %d\n, pic-filename, error); if (!error) { /* next store the actual picture; we prefix all picture names * with PIC- to make things easier on the parsing side */ struct membuffer namebuf = { 0 }; const char *localfn = local_file_path(pic); + fprintf(stderr, based on the hashes, the actual file is at %s\n, localfn); put_format(namebuf, PIC-%s, pic-hash); error = blob_insert_fromdisk(repo, dir, localfn, mb_cstring(namebuf)); + fprintf(stderr, inserted the picture as %s, error code %d\n, mb_cstring(namebuf), error); free((void *)localfn); } return error; ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Hi Jan, thanks for testing! On Mon, Jun 22, 2015 at 11:14:55AM +0200, Jan Mulder wrote: I did some testing. My log did not contain any pictures, so I added one picture to one dive. Working locally, I saved, and after that forced a save to cloud. Opened the cloud storage, and the picture does show correctly (on the desktop machine that has the picture on disk). Yes, that has always worked because we simply save the reference to the local file path in the cloud. So opening on the same machine gives you the existing path back and all is good. Went to the cloud website, see that the modified dive is correctly stored. However, I do not see any reference to the stored picture. Checked the HTML source, and see that there is a div id=divephotos. This does not show any pictures (eg. the one picture I added to one dive). Checked on a second machine. Open cloud in ssrf. I do not see the picture. I do see the reference to the picture (including the path it is stored (on hover on the photos tab) on the (first) desktop machine. I also see a dot where the small thumbnail in the profile is shown. Verified that ssrf is looking at the location of the picture on the originating machine. Verified the local cache and see the file (for the specific dive), in the Pictures subdir. It contains a reference to the picture on the originating machine (so no actual image). Off course, I might be confused how it is supposed to work, but I expected an image in the local cache. Off course, above test with latest master :-) I took the liberty of looking at your git repository and I can see that you saved twice with -853 and that Subsurface decided not to upload the picture to the remote server (and that of course prevented the HTML export from working). Now I need to figure out what Subsurface didn't push the picture... it did for me in my test with two different accounts. Dirk Bugs Are Us investigating... /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Jun 21, 2015, at 04:53, Salvador Cuñat salvador.cu...@gmail.com wrote: Good morning. 2015-06-21 1:40 GMT+02:00 Dirk Hohndel d...@hohndel.org: After this it worked (well, almost worked), didn't get the 404 error, the html export page shown but without any dive. Now that's strange :-( More to investigate... Tried again: another change on the log, another save to cloud storage and ... the full divelog appears in the html page. So we can think two changes are needed, 1st to create the directory, 2nd to populate it. Unintuitive but, may be, necessary from a git point of view ?? No, I fixed yet another little bug. That's why I ask people to try this. It's the only way to find all these little corner cases. /D___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On 21-06-15 14:32, Dirk Hohndel wrote: 2015-06-21 1:40 GMT+02:00 Dirk Hohndel d...@hohndel.org mailto:d...@hohndel.org: After this it worked (well, almost worked), didn't get the 404 error, the html export page shown but without any dive. Now that's strange :-( More to investigate... Tried again: another change on the log, another save to cloud storage and ... the full divelog appears in the html page. So we can think two changes are needed, 1st to create the directory, 2nd to populate it. Unintuitive but, may be, necessary from a git point of view ?? No, I fixed yet another little bug. That's why I ask people to try this. It's the only way to find all these little corner cases. Now, I can reproduce the problem as described by Salvador. Tried the following: - open cloud from ssrf = working ok, so there is data in my cloud. - open in browser = no 404, but empty list of dives. - cleaned browser cache, and reload = no change. So no forced new upload tried. best, --jan ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Good morning. 2015-06-21 1:40 GMT+02:00 Dirk Hohndel d...@hohndel.org: After this it worked (well, almost worked), didn't get the 404 error, the html export page shown but without any dive. Now that's strange :-( More to investigate... Tried again: another change on the log, another save to cloud storage and ... the full divelog appears in the html page. So we can think two changes are needed, 1st to create the directory, 2nd to populate it. Unintuitive but, may be, necessary from a git point of view ?? Have a great trip to Mauritius. I'll do my best };-) Regards. Salva. ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Jun 21, 2015, at 7:42 AM, Jan Mulder jlmul...@xs4all.nl wrote: On 21-06-15 14:32, Dirk Hohndel wrote: 2015-06-21 1:40 GMT+02:00 Dirk Hohndel d...@hohndel.org mailto:d...@hohndel.org: After this it worked (well, almost worked), didn't get the 404 error, the html export page shown but without any dive. Now that's strange :-( More to investigate... Tried again: another change on the log, another save to cloud storage and ... the full divelog appears in the html page. So we can think two changes are needed, 1st to create the directory, 2nd to populate it. Unintuitive but, may be, necessary from a git point of view ?? No, I fixed yet another little bug. That's why I ask people to try this. It's the only way to find all these little corner cases. Now, I can reproduce the problem as described by Salvador. Tried the following: - open cloud from ssrf = working ok, so there is data in my cloud. - open in browser = no 404, but empty list of dives. - cleaned browser cache, and reload = no change. So no forced new upload tried. Can you make a trivial change to your dive list and save back to the cloud? This should trigger a new export. /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Another morning of hacking, and another set of patches are pushed... This time around I added the ability to store pictures in a git repository. Instead of just storing a reference to a local file we now actually store the pictures themselves in the git repository. We try to be clever about this, so if loading from git, if we can find the pictures (using the picture hash featuer in case they were moved) we don't bother writing the pictures from the repository out into local files. But if we can't find them we do just that. With this I can save my repo to cloud storage and then see my pictures on the web view. In order for that to work you need to open your data file with the latest Subsurface and then save to the cloud again - your local Subsurface needs to be new enough to push the actual pictures out to the server... /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On 06/20/2015 04:40 PM, Dirk Hohndel wrote: On Jun 20, 2015, at 4:00 PM, Salvador Cuñat salvador.cu...@gmail.com mailto:salvador.cu...@gmail.com wrote: 2015-06-20 23:13 GMT+02:00 Dirk Hohndel d...@hohndel.org mailto:d...@hohndel.org: BTW I can only test tomorrow, as on monday I'll be in a family trip to Mauritius (expecting to have a little diving, off course). On the good side, I hope to get back with a bunch of new dive locations and gps fixes to test. I think we can all agree (except for Lubomir and, sadly, Robert) that collecting more data is the best part of our hobby :-) Have a great trip to Mauritius. I was hoping to gather a couple dives worth this morning at Sund Rock (Hood Canal). But an outer ear infection showed up yesterday morning and put a stop to any such thoughts. Mauritius looks like an interesting destination. ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Jun 20, 2015, at 1:02 PM, Salvador Cuñat salvador.cu...@gmail.com wrote: 2015-06-18 15:57 GMT+02:00 Jan Mulder jlmul...@xs4all.nl mailto:jlmul...@xs4all.nl: However. The https://cloud.subsurface-divelog.org/user/myemailadress/dives.html https://cloud.subsurface-divelog.org/user/%3Cemail-address%3E/dives.html reports (after logging in with correct credentials) a 404. I'm having this same issue, git storage works fine but there is no html file (or directory) created . And yes, I changed myemailadress too ;-) Interesting. The system failed to create the base directory for the html export for you for some reason. Let me look at the script and try to figure out what went wrong. Are you on IRC? This is best addressed live where I can talk to you and have you try things while I look at the backend. Your help would be really valuable! Thanks /D___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Sat, Jun 20, 2015 at 01:09:24PM -0700, Dirk Hohndel wrote: On Jun 20, 2015, at 1:02 PM, Salvador Cuñat salvador.cu...@gmail.com wrote: 2015-06-18 15:57 GMT+02:00 Jan Mulder jlmul...@xs4all.nl mailto:jlmul...@xs4all.nl: However. The https://cloud.subsurface-divelog.org/user/myemailadress/dives.html https://cloud.subsurface-divelog.org/user/%3Cemail-address%3E/dives.html reports (after logging in with correct credentials) a 404. I'm having this same issue, git storage works fine but there is no html file (or directory) created . And yes, I changed myemailadress too ;-) Interesting. The system failed to create the base directory for the html export for you for some reason. Let me look at the script and try to figure out what went wrong. Are you on IRC? This is best addressed live where I can talk to you and have you try things while I look at the backend. Your help would be really valuable! Some trial and error showed the flaw in my logic. Please try again, I believe this part should now work as well. /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
2015-06-18 15:57 GMT+02:00 Jan Mulder jlmul...@xs4all.nl: However. The https://cloud.subsurface-divelog.org/user/myemailadress/dives.html https://cloud.subsurface-divelog.org/user/%3Cemail-address%3E/dives.html reports (after logging in with correct credentials) a 404. I'm having this same issue, git storage works fine but there is no html file (or directory) created . And yes, I changed myemailadress too ;-) Regards. Salva. ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Jun 20, 2015, at 4:00 PM, Salvador Cuñat salvador.cu...@gmail.com wrote: 2015-06-20 23:13 GMT+02:00 Dirk Hohndel d...@hohndel.org mailto:d...@hohndel.org: Let me look at the script and try to figure out what went wrong. Are you on IRC? This is best addressed live where I can talk to you and have you try things while I look at the backend. Your help would be really valuable! No, I'm not in IRC, but if you think it can help just tell me where to register. We have an IRC channel on Freenode (http://http://freenode.net/ http://http//freenode.net/) You can simply join it via a web interface (or you can use an actual IRC client). But for just a quick chat usually https://webchat.freenode.net/ https://webchat.freenode.net/ is sufficient. Some trial and error showed the flaw in my logic. Please try again, I believe this part should now work as well. I've done so. In the 1st try I got the 404 error, then made a little change on the divelog and saved to cloud storage. Yes, that's the important part I forgot to mention. You HAVE to make a change and save it to trigger an export. After this it worked (well, almost worked), didn't get the 404 error, the html export page shown but without any dive. Now that's strange :-( More to investigate... BTW I can only test tomorrow, as on monday I'll be in a family trip to Mauritius (expecting to have a little diving, off course). On the good side, I hope to get back with a bunch of new dive locations and gps fixes to test. I think we can all agree (except for Lubomir and, sadly, Robert) that collecting more data is the best part of our hobby :-) Have a great trip to Mauritius. /D___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Good night. 2015-06-20 23:13 GMT+02:00 Dirk Hohndel d...@hohndel.org: Let me look at the script and try to figure out what went wrong. Are you on IRC? This is best addressed live where I can talk to you and have you try things while I look at the backend. Your help would be really valuable! No, I'm not in IRC, but if you think it can help just tell me where to register. Some trial and error showed the flaw in my logic. Please try again, I believe this part should now work as well. I've done so. In the 1st try I got the 404 error, then made a little change on the divelog and saved to cloud storage. After this it worked (well, almost worked), didn't get the 404 error, the html export page shown but without any dive. BTW I can only test tomorrow, as on monday I'll be in a family trip to Mauritius (expecting to have a little diving, off course). On the good side, I hope to get back with a bunch of new dive locations and gps fixes to test. Regards. Salva. ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Did a quick test. The dive numbers don’t match with the dates. The last dive by date should also have the highest number, logically that is. Yes, I noticed that as well when playing around with it. I was going to ask Gehad about this and then forgot. Thanks for bringing it up! Seems like the export doesn’t care about the numbers in my log book and always starts from 1. Since mine starts with 1 I didn't see that. But there's an option for the exporter to use Subsurface numbers and I forgot to set that. My guess is that would fix this issue. I'll play with this (and try to track down a weird crash in the headless exporter that I observed while trying to force an export for everyone who has an account) /D Another thing, if I use the Trip view the dive numbering is correct. /Jocke ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On 18 June, 2015 - Dirk Hohndel wrote: On Wed, Jun 17, 2015 at 07:28:20PM -0700, Dirk Hohndel wrote: So while there are still some rough edges, I think this is taking shape quite nicely. I've seen five of you have tested the cloud storage so far - thanks for doing that. If you run into any problem, please post about them - I fixed a few more bugs, saving to the cloud storage should work more reliably now. And for a number of interesting reasons I got to test the account creation a couple more times so that should work quite well by now as well. I see a few more people testing. A couple of comments: - for those who used this before last night (Robert, Thomas, David, Jocke, Willem) - you will need to save a change to the cloud storage before a new export to HTML is triggered... I guess I could have run this manually for each repository... actually, why don't I do that - Gaetan - I see a few hundred requests from you with failed authorization. Was this a bug somewhere or a hacking attempt? :-) - In general, if you test and things don't work as you expect, please discuss this here so I can either explain or fix the bugs... https://cloud.subsurface-divelog.org/user/email-address/dives.html Oh yeah, and several of you clicked on this link. Cute :-) But it does require you to remplace email-address with your actual email address - and you have to have that email address registered and cloud data populated before it will work. You can always use ssrft...@hohndel.org / geheim - but I'd really like it if a few more people tried the account setup procedure and put data on the server. While I check the logs to see if I can spot issues, I DO NOT look at the dives you upload. Hope this helps Just tested this quickly with daliy windows build 4.4.2-772. Opened subsurface. Settings, punched in ssrft...@hohndel.org / geheim as cloud storage parameters. Sync to cloud and save password locally. Cloud storage as default file. When i open subsurface i get unable to open git cache repository .. Could not find repository... When i hit open cloud storage i got a crash. Windows wasn't helpfull in giving me any notes about what or where things went south. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
I have similar issues with my account. Fresh build this lunchtime on my laptop. On trying to open cloud storage I get Git cache branch da...@acmelabs.co.uk no longer exists. Unable to look up revision 'da...@acmelabs.co.uk' On trying to save to cloud storage: Cannot connect to cloud server, working with local copy. No user name configuration in git repo. Creating commit failed -- David Tillotson___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Wed, Jun 17, 2015 at 07:28:20PM -0700, Dirk Hohndel wrote: So while there are still some rough edges, I think this is taking shape quite nicely. I've seen five of you have tested the cloud storage so far - thanks for doing that. If you run into any problem, please post about them - I fixed a few more bugs, saving to the cloud storage should work more reliably now. And for a number of interesting reasons I got to test the account creation a couple more times so that should work quite well by now as well. I see a few more people testing. A couple of comments: - for those who used this before last night (Robert, Thomas, David, Jocke, Willem) - you will need to save a change to the cloud storage before a new export to HTML is triggered... I guess I could have run this manually for each repository... actually, why don't I do that - Gaetan - I see a few hundred requests from you with failed authorization. Was this a bug somewhere or a hacking attempt? :-) - In general, if you test and things don't work as you expect, please discuss this here so I can either explain or fix the bugs... https://cloud.subsurface-divelog.org/user/email-address/dives.html Oh yeah, and several of you clicked on this link. Cute :-) But it does require you to remplace email-address with your actual email address - and you have to have that email address registered and cloud data populated before it will work. You can always use ssrft...@hohndel.org / geheim - but I'd really like it if a few more people tried the account setup procedure and put data on the server. While I check the logs to see if I can spot issues, I DO NOT look at the dives you upload. Hope this helps /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On 18 Jun 2015, at 14:56, Dirk Hohndel d...@hohndel.org wrote: On Wed, Jun 17, 2015 at 07:28:20PM -0700, Dirk Hohndel wrote: So while there are still some rough edges, I think this is taking shape quite nicely. I've seen five of you have tested the cloud storage so far - thanks for doing that. If you run into any problem, please post about them - I fixed a few more bugs, saving to the cloud storage should work more reliably now. And for a number of interesting reasons I got to test the account creation a couple more times so that should work quite well by now as well. I see a few more people testing. A couple of comments: - for those who used this before last night (Robert, Thomas, David, Jocke, Willem) - you will need to save a change to the cloud storage before a new export to HTML is triggered... I guess I could have run this manually for each repository... actually, why don't I do that - Gaetan - I see a few hundred requests from you with failed authorization. Was this a bug somewhere or a hacking attempt? :-) - In general, if you test and things don't work as you expect, please discuss this here so I can either explain or fix the bugs… Did a quick test. The dive numbers don’t match with the dates. The last dive by date should also have the highest number, logically that is. Seems like the export doesn’t care about the numbers in my log book and always starts from 1. /Jocke ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Thu, Jun 18, 2015 at 02:49:18PM +0100, David Tillotson wrote: I have similar issues with my account. Fresh build this lunchtime on my laptop. On trying to open cloud storage I get Git cache branch da...@acmelabs.co.uk no longer exists. Unable to look up revision 'da...@acmelabs.co.uk' So it looks like something is in inconsistent state. What's supposed to happen is this: once you verify the PIN your account is created and the git repository is initialized. When you save to cloud the first time, it should create the branch, both in the local cache repository and remotely. I have recreated an emptry repository for you on the server, could you delete the local cache as well (under ~/.local/share/Subsurface/Subsurface - the directory name is a hash of the remote path... I'm too lazy to calculate that right now... likely there's only one) and try again, please? On trying to save to cloud storage: Cannot connect to cloud server, working with local copy. No user name configuration in git repo. Creating commit failed That's what making me think that your local repo is corrupted as well. Earlier versions of Subsurface (as in - from a couple of days ago) sometimes did odd things there if they encountered an error. /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Below, my first try with the cloud storage. On 18-06-15 04:28, Dirk Hohndel wrote: I've seen five of you have tested the cloud storage so far - thanks for doing that. If you run into any problem, please post about them - I fixed a few more bugs, saving to the cloud storage should work more reliably now. And for a number of interesting reasons I got to test the account creation a couple more times so that should work quite well by now as well. On my desktop machine. I use (for a long time already) the local git store as my primary data store for ssrf. Today, I filled the preferences for the cloud store and received the PIN correctly, and activated the cloud store (apparently) successfully. Did save to cloud and after that open cloud. The cloud seems to be populated with my divelog. That is, restarting ssrf, open cloud manually (did not default to cloud open), and the correct divelog shows. However. The https://cloud.subsurface-divelog.org/user/myemailadress/dives.html https://cloud.subsurface-divelog.org/user/%3Cemail-address%3E/dives.html reports (after logging in with correct credentials) a 404. Further, started on a second notebook from scratch. So no local log data, not even a ssrf installation. Installed the latest master (build myself), and ran ssrf. Started setting cloud preferences. Authenticated correctly. No PIN (as expected, because logging in with already activated credentials). Open cloud, and the log shows, so pulled data from the cloud. I see numerous issues on the notebook after opening the cloud (and at this point unclear to me whether is is related to the cloud store (or the location management for example)): - 1 specific divesite is missing. Apparently, there is some data corruption, that does not show on the desktop, but does show on the notebook. - The location list is not filled. - a save to cloud results in error No user name in git repo, creating commit failed. In addition. commit 7cf3ebc2f7b6 seems to introduce a SIGSEGV: strcmp(existing_filename, remote) aborts for remote=0 Both desktop and notebook are running Arch Linux. best, --jan ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Thu, Jun 18, 2015 at 03:57:37PM +0200, Jan Mulder wrote: Below, my first try with the cloud storage. Thanks for testing this! Things work for me and once I'm at that state I rely on you guys to show me all the ways that the code still breaks... On my desktop machine. I use (for a long time already) the local git store as my primary data store for ssrf. Today, I filled the preferences for the cloud store and received the PIN correctly, and activated the cloud store (apparently) successfully. Yes, your account shows as verified in the database Did save to cloud and after that open cloud. The cloud seems to be populated with my divelog. That is, restarting ssrf, open cloud manually (did not default to cloud open), and the correct divelog shows. Excellent. However. The https://cloud.subsurface-divelog.org/user/myemailadress/dives.html https://cloud.subsurface-divelog.org/user/%3Cemail-address%3E/dives.html reports (after logging in with correct credentials) a 404. Just to make sure, you did go to https://cloud.subsurface-divelog.org/user/jlmul...@xs4all.nl/dives.html and not to a URL with myemailaddress in the middle :-) I noticed earlier that the auto-creation of your HTML export triggered a bug and that the exporter would crash. I believe that's fixed now... but I haven't tried accessing the HTML export (again, in general I am planning to try not to use at your data - I actually set it up so that ONLY your credentials allow access that folder from your net - there is no admin account that could be (ab-)used to look at other people's data...) Further, started on a second notebook from scratch. So no local log data, not even a ssrf installation. Installed the latest master (build myself), and ran ssrf. Started setting cloud preferences. Authenticated correctly. No PIN (as expected, because logging in with already activated credentials). Yep - so that works as intended. Open cloud, and the log shows, so pulled data from the cloud. I see numerous issues on the notebook after opening the cloud (and at this point unclear to me whether is is related to the cloud store (or the location management for example)): - 1 specific divesite is missing. Apparently, there is some data corruption, that does not show on the desktop, but does show on the notebook. That's weird. Git is highly unlikely not to notice actual corruption. - The location list is not filled. Which location list? - a save to cloud results in error No user name in git repo, creating commit failed. Umm. Same bug as in David's report. I need to look at this to see how this is happening - I have never seen this. In addition. commit 7cf3ebc2f7b6 seems to introduce a SIGSEGV: strcmp(existing_filename, remote) aborts for remote=0 Both desktop and notebook are running Arch Linux. Duh. That's what I get for not using same_string()... I'll fix that right away, thanks for that report. /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
Just retried. Still getting the same errors. The same happens with the setup using one of my mail aliases that I set up this afternoon, so shouldn't be historical corruption. There are 2 new local repos, both currently are only 68K. On 18 June 2015 15:57:35 BST, Dirk Hohndel d...@hohndel.org wrote: On Thu, Jun 18, 2015 at 02:49:18PM +0100, David Tillotson wrote: I have similar issues with my account. Fresh build this lunchtime on my laptop. On trying to open cloud storage I get Git cache branch da...@acmelabs.co.uk no longer exists. Unable to look up revision 'da...@acmelabs.co.uk' So it looks like something is in inconsistent state. What's supposed to happen is this: once you verify the PIN your account is created and the git repository is initialized. When you save to cloud the first time, it should create the branch, both in the local cache repository and remotely. I have recreated an emptry repository for you on the server, could you delete the local cache as well (under ~/.local/share/Subsurface/Subsurface - the directory name is a hash of the remote path... I'm too lazy to calculate that right now... likely there's only one) and try again, please? On trying to save to cloud storage: Cannot connect to cloud server, working with local copy. No user name configuration in git repo. Creating commit failed That's what making me think that your local repo is corrupted as well. Earlier versions of Subsurface (as in - from a couple of days ago) sometimes did odd things there if they encountered an error. /D -- David Tillotson___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On 18-06-15 17:08, Dirk Hohndel wrote: Just to make sure, you did go to https://cloud.subsurface-divelog.org/user/jlmul...@xs4all.nl/dives.html and not to a URL with myemailaddress in the middle :-) Yes. I noticed earlier that the auto-creation of your HTML export triggered a bug and that the exporter would crash. I believe that's fixed now... but I haven't tried accessing the HTML export (again, in general I am planning to try not to use at your data - I actually set it up so that ONLY your credentials allow access that folder from your net - there is no admin account that could be (ab-)used to look at other people's data...) And indeed, it is fixed now. Nice :-) Open cloud, and the log shows, so pulled data from the cloud. I see numerous issues on the notebook after opening the cloud (and at this point unclear to me whether is is related to the cloud store (or the location management for example)): - 1 specific divesite is missing. Apparently, there is some data corruption, that does not show on the desktop, but does show on the notebook. That's weird. Git is highly unlikely not to notice actual corruption. Agreed that this is very weird. I will investigate further. - The location list is not filled. Which location list? The pop-up list on the notes tab containing all dive sites to chose from. I will also investigate further here. best, --jan ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Thu, Jun 18, 2015 at 03:57:37PM +0200, Jan Mulder wrote: - a save to cloud results in error No user name in git repo, creating commit failed. This was a good one. I just pushed a fix. With newer libgit2 (which is required for cloud storage to work) we have an API to get the user / email to use as author for a commit. Except if git never got configured on your system, then those aren't set. And for strange reason the code doesn't fall back to just set a Subsurface default author but instead returned an error. Oops. /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Thu, Jun 18, 2015 at 4:28 AM, Dirk Hohndel d...@hohndel.org wrote: So while there are still some rough edges, I think this is taking shape quite nicely. Anyway, give it a try, let me know what you think. And if someone with better design skills than me wants to work on the theming / CSS - that might be good. :-) Wow There are so many new features that the next official release deserve a main version increment :) -- Davide https://vimeo.com/bocio/videos ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Cloud storage and web view
On Jun 17, 2015, at 9:19 PM, Gaetan Bisson bis...@archlinux.org wrote: [2015-06-17 19:28:20 -0700] Dirk Hohndel: Anyway, give it a try, let me know what you think. Thanks a lot for all the hard work. I'd like to keep a local copy of my data but use the cloud storage as a backup. In Preferences under Defaults I have ticked: - Local Default File - Sync to cloud in the background Will this have the intended effect? Will this sync the data that is currently already stored in my XML file, or only new dives I add? No it won't. But using the cloud storage as default file will. Everything it does is FIRST on the local git tree, which THEN gets synced to the cloud. Sync to cloud in the background is poorly named. What it means is that IFF you are using cloud storage it will always try to immediately push the changes to the cloud after writing them locally. Otherwise it just syncs with the cloud when you first open the file (which is kind of counter intuitive). So this part of the logic (and it's documentation) clearly needs some work. Thanks again and sorry if I missed the explanations on how this works. I'm not sure I explained that part well. /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface