Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 08:54:53PM +0200, Robert Helling wrote: > > On 11 Jun 2015, at 20:47, Robert C. Helling wrote: > > Hi, > > > Somehow, we might make use of the fact that our files have more structure > > than just line numbers, namely they are xml fields. > > a quick google search rev

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 08:47:16PM +0200, Robert C. Helling wrote: > > > So you are our posterchild for then implementing merging :-) > > that may be way beyond my powers. I realized that I phrased this badly. No, I'm not saying you need to implement that. What I'm saying is "you need to help bu

Re: git backend: actually update local cache from remote

2015-06-11 Thread Robert Helling
On 11 Jun 2015, at 20:47, Robert C. Helling wrote: Hi, > Somehow, we might make use of the fact that our files have more structure > than just line numbers, namely they are xml fields. a quick google search reveals that this http://www.cs.hut.fi/~ctl/ might be our man! Best Robert signat

Re: git backend: actually update local cache from remote

2015-06-11 Thread Robert C. Helling
On 11 Jun 2015, at 20:25, Dirk Hohndel wrote: Dirk, > So you are our posterchild for then implementing merging :-) that may be way beyond my powers. But I promise I will think about this and try to come up with something. Somehow, we might make use of the fact that our files have more struct

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 07:06:20PM +0200, Robert C. Helling wrote: > > On 11 Jun 2015, at 18:32, Davide DB wrote: > > Hi, > > > How could local be synced form remote while working if we pull/sync at > > application start? > > As syncing might take a few seconds we would not freeze the applicat

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 06:56:27PM +0200, Robert C. Helling wrote: > Dirk, > > > > > Am 11.06.2015 um 16:53 schrieb Dirk Hohndel : > > > > https://cloud.subsurface-divelog.org/make-latte?number-of-shots=3 > > > > if the response is > > > > 418 with text "Linus does not like non-fat milk" > >

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 06:32:48PM +0200, Davide DB wrote: > On Thu, Jun 11, 2015 at 6:03 PM, Dirk Hohndel wrote: > > > > So any "sync" is a two step process. FIRST we save to the local cache. > > THEN we sync. > > Ah! > So if I manually use "Ctrl+S" or "File > Save" I fire this two step process.

Re: git backend: actually update local cache from remote

2015-06-11 Thread Martin Gysel
Am 11.06.2015 um 15:28 schrieb Dirk Hohndel: > On Thu, Jun 11, 2015 at 12:15:12PM +0200, Martin Gysel wrote: >>> >>> I would to all cloud access in the background and offer the user (via >>> a modal dialog) to reload when the background operation finished and >>> implied an update to the currently

Re: git backend: actually update local cache from remote

2015-06-11 Thread Robert C. Helling
Dirk, > Am 11.06.2015 um 16:53 schrieb Dirk Hohndel : > > https://cloud.subsurface-divelog.org/make-latte?number-of-shots=3 > > if the response is > > 418 with text "Linus does not like non-fat milk" > > we have established a working connection. I think you still have to work on this: I get

Re: git backend: actually update local cache from remote

2015-06-11 Thread Davide DB
On Thu, Jun 11, 2015 at 6:03 PM, Dirk Hohndel wrote: > > So any "sync" is a two step process. FIRST we save to the local cache. > THEN we sync. Ah! So if I manually use "Ctrl+S" or "File > Save" I fire this two step process. If I never save explicitly my logbook, is this two step process fired au

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 05:29:58PM +0200, Davide DB wrote: > On Thu, Jun 11, 2015 at 3:23 PM, Dirk Hohndel wrote: > > > > Subsurface preference asks you "automatic or manual sync to cloud". > > If you are in manual mode, you have to manually start a "sync to cloud" > > from the menu. > > > > If yo

Re: git backend: actually update local cache from remote

2015-06-11 Thread Davide DB
On Thu, Jun 11, 2015 at 3:23 PM, Dirk Hohndel wrote: > > Subsurface preference asks you "automatic or manual sync to cloud". > If you are in manual mode, you have to manually start a "sync to cloud" > from the menu. > > If you are in automatic mode, Subsurface acts like this: > - if there is netwo

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 04:28:20PM +0200, Anton Lundin wrote: > On 11 June, 2015 - Dirk Hohndel wrote: > > > It's not easy to test this in a reliable manner. Ping is blocked in a ton > > of environments. We'd really have to open a direct https connection to the > > cloud server to figure out if we

Re: git backend: actually update local cache from remote

2015-06-11 Thread Anton Lundin
On 11 June, 2015 - Dirk Hohndel wrote: > It's not easy to test this in a reliable manner. Ping is blocked in a ton > of environments. We'd really have to open a direct https connection to the > cloud server to figure out if we have connectivity or not. > The common trick is to use HTCPCP or such

Re: git backend: actually update local cache from remote

2015-06-11 Thread Robert C. Helling
Hi Dirk, > On 11 Jun 2015, at 15:23, Dirk Hohndel wrote: > > The save in the background when quitting is dangerous. On a larger data > set / slow connection this can take a while - I hate it when software does > something like this and then "hangs" instead of closing. I agree. But OTOH you are

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 12:15:12PM +0200, Martin Gysel wrote: > > > > I would to all cloud access in the background and offer the user (via > > a modal dialog) to reload when the background operation finished and > > implied an update to the currently displayed log. > > > > I never thought these

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 09:08:02AM +0200, Davide DB wrote: > I look forward to use this feature asap (as soon as it doesn't byte me) > I edit my logbook from three different machine and it's a PITA pying > attention to keep them in sync. I think we will be there, soon. > I do not like DropBox. Ac

Re: git backend: actually update local cache from remote

2015-06-11 Thread Dirk Hohndel
On Thu, Jun 11, 2015 at 07:25:46AM +0200, Robert C. Helling wrote: > > > This is kind of a hybrid of what you are talking about. If you are on a > > boat or on an island with shitty network you can simply work from the > > local cache. And if you suddenly have some connectivity you can trigger an

Re: git backend: actually update local cache from remote

2015-06-11 Thread Martin Gysel
Am 11.06.2015 um 07:25 schrieb Robert C. Helling: > > On 11 Jun 2015, at 06:16, Dirk Hohndel wrote: > > Good morning, > >> This is kind of a hybrid of what you are talking about. If you are >> on a boat or on an island with shitty network you can simply work >> from the local cache. And if you

Re: git backend: actually update local cache from remote

2015-06-11 Thread Willem Ferguson
On 11/06/2015 06:16, Dirk Hohndel wrote: >Dirk, I haven't actually tried your cloud infrastructure, I've just >been testing with my "remote repository on local disk" setup. Fact of the matter is, exactly ONE PERSON has tried this in the past 24 hours. Apparently this is far less exciting than I

Re: git backend: actually update local cache from remote

2015-06-10 Thread Robert C. Helling
On 11 Jun 2015, at 06:16, Dirk Hohndel wrote: Good morning, > This is kind of a hybrid of what you are talking about. If you are on a > boat or on an island with shitty network you can simply work from the > local cache. And if you suddenly have some connectivity you can trigger an > upload to

Re: git backend: actually update local cache from remote

2015-06-10 Thread Dirk Hohndel
On Wed, Jun 10, 2015 at 09:16:48PM -0700, Dirk Hohndel wrote: > > > Dirk, I haven't actually tried your cloud infrastructure, I've just > > been testing with my "remote repository on local disk" setup. Your code was missing the authentication callbacks (which you don't need for a "local remote" r

Re: git backend: actually update local cache from remote

2015-06-10 Thread Joakim Bygdell
> On 11 Jun 2015, at 6:16, Dirk Hohndel wrote: > > I've been going back and forth about this a bit, and here's my current > thinking (which may be silly, but it's much easier to start a discussion > by putting something out there and then have Davide come up with something > better :-D) > > - w

Re: git backend: actually update local cache from remote

2015-06-10 Thread Dirk Hohndel
On Wed, Jun 10, 2015 at 06:18:17PM -0700, Linus Torvalds wrote: > On Wed, Jun 10, 2015 at 2:04 PM, Linus Torvalds > wrote: > > > > I'll try to get the "push to remote" done too. > > Ok, I think this is it. First of all, THANKS. I was tempted to try to implement this last weekend. But with the i

Re: git backend: actually update local cache from remote

2015-06-10 Thread Linus Torvalds
On Wed, Jun 10, 2015 at 2:04 PM, Linus Torvalds wrote: > > I'll try to get the "push to remote" done too. Ok, I think this is it. It's not particularly well-tested, but it is fairly straightforward. HOWEVER, note the big commit message comment about why technically this works in the sense that i

git backend: actually update local cache from remote

2015-06-10 Thread Linus Torvalds
This is just part of the story, but it's a step: when we fetch the remote, and notice that it's different from our local cached copy of the git tree, we now update the local cache if the remote is more recent (and if the remote is old, we report that). I'll try to get the "push to remote" done too