-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High risk of data loss on collaboration #57
Comments
Too bad that this happened to you, I saw the issue you raised of rakyll's project and that was using her version right? $ drive pull -no-clobber # Non-clobberable pull?
$ drive diff vegetable.text # See the differences From the README |
No, I tested on the AUR version of drive (0.0.8-1) The no-clobber leads to an error when it's the last parameter:
It does do the job when running The
This application's behaviour is really confusing. Having it behave in a logical way requires the use of a parameter that has a very odd name (clobber?) and is hidden deeply in the documentation. This is mostly a usability problem. The program should have proper default behaviour, and people's data should be considered sacred. Accidental data loss should not be possible with a simple drive pull command. |
You are using it wrong $ drive pull -no-clobber vegetable.txt instead of $ drive pull vegetable.txt -no-clobber Yeah the CLI args parser only parses options before the arguments. Don't you get a warning that asks whether you want to proceed with the modifications? |
Like I said, it works fine when doing With |
Look, you don't have to have advanced merge functionalities, these are hard to write. A conflict mechanism like in the Windows drive client and in dropbox shouldn't be too hard to make.
The hardest part of that should be detecting whether a file was locally modified. You already have that logic in the A simple error would have saved my data. |
That is true, except we don't have the ability to perform merges yet, this tool right performs a naive pull and push and cannot detect when merging has failed. It also provides a prompt if 'naive' clobbering is being done. Feel free to submit a PR with merging and conflict detection if you'd like. If you'd like pointers on this, I started a branch https://github.com/odeke-em/drive/tree/change-tracking that will able to track changes on files and avoid such problems, but then again I didn't want to mention this until I fully understood the problem and had provided a full implementation. |
I see what you are saying. For sure, sounds good. |
I'll get this in when I get home. Thanks for the discussion, that was actually a good idea of throwing the error. |
Thanks for your help and understanding!
|
Got in the level one conflict detection mechanism. Feel free to close this if the current solution fulfills the purpose. A better version will be coming once I incorporate change tracking to tell when the local has been modified too and then drive can really detect when a real conflict is present. |
From rakyll#59
Do NOT use this application when you're working with classmates on a project. The risk of losing data in files is way too damn high. Here's why:
The merging mechanism isn't just stupid, it's nonexistent. Have this situation:
Have one example. It's the absolute worst one:
b.txt
drive pull a
b.txt
will show an "M", stating it's modified. If you proceed with pulling,b.txt
will be overwritten with an older file.Why would you want to pull the folder? Well, your teammates might have edit
c.txt
, or maybe they have even editedb.txt
. When you see thatb.txt
was modified, you're led to believe that your teammates modified it. The fact is that it could mean that, but it's probably because you editedb.txt
yourself. There is no way to tell.In a project I handed in today I was very careful to push and pull per file. Luckily no one else edited files at the same time I did, that would have put me in deep trouble. That or maybe that did happen,
drive
wouldn't have told me so there would be no way for me to find out unless they actually told me. Despite the per file push/pulling I still lost data, most likely because I pulled the folder thinking I had pushed my per file changes.Files just get overwritten. Both on push and on pull. No merging, no conflict mechanism, no warnings that you're overwriting unsaved changes (or haven't merged with the latest version yet) and a downright misleading status message. This tool is not safe for projects in which people cooperate.
Here's the example of what I'm talking about:
Tested on the AUR version of drive (0.0.8-1 (Thu Feb 5 18:57:44 CET 2015))
The text was updated successfully, but these errors were encountered: