{"thread":{"id":"19771","subject":"FTP Synchronization","startedAt":"2009-06-11T00:03:42Z","lastAt":"2009-06-11T00:03:42Z","messageCount":1,"participants":["Marc Weber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"116050","messageId":"20090611000342.GA20699@gmx.de","threadId":"19771","inReplyTo":null,"subject":"FTP Synchronization","fromName":"Marc Weber","fromEmail":"marco-oweber@gmx.de","sentAt":"2009-06-11T00:03:42Z","receivedAt":"2009-06-11T00:03:42Z","isPatch":false,"sender":{"key":"marco-oweber@gmx.de","avatar":null},"body":"Has anyone a FTP synchranization which behaves like this yet?\n\n1) get current version from ftp by readitg $REMOTE/hash\n2) calculate git-diff `ftp get $REMOTE/hash`..HEAD\n3) ftp push all files which have changed and\n   ftp rm all files which have been deleted\n4) write HEAD to $REMOTE/hash\n\nWhat happens if there is a failure in the middle?\nThen 4) doesn't take place and all the actions will be replayed\n(probably ignoring errors). Also there should be a sync option recopying\nall files which are know to git at HEAD.\n\nI don't want to use bash because I can't keep a FTP connection open, can\nI? (Maybe using lfpt and stdin redirection hacks ?)\ngit perl lib support is better than python support, right?\n\nIf not how to do this? Maybe I should look at the git diff code to get\nto know or start comparing the git ls-tree output or such?\n\nOf course I'd like this to be as fast as possible.\n\nMarc Weber\n"}]}