Skip to content
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

Prevent accidental upload #350

Closed
borekb opened this issue Jul 4, 2017 · 12 comments
Closed

Prevent accidental upload #350

borekb opened this issue Jul 4, 2017 · 12 comments
Labels
Milestone

Comments

@borekb
Copy link

borekb commented Jul 4, 2017

Issuehunt badges

I have two computers with VSCode installed that I keep synchronized using this awesome extension. I have both autoUpload and autoDownload disabled (personal preference) so have to remember to upload / download manually.

If I'm not mistaken, download is safe: if I'm on a computer with newer settings (local only, not uploaded yet) and I invoke download, it will not overwrite my settings because sync.lastDownload equals what's in the Gist's cloudSettings lastUpload and silently finish (probably, I'm not 100% sure, there's a strict match instead of >=).

However, upload is not safe. Let's say both my machines are currently synchronized and I update settings on the first machine and upload. Now I come to the second machine and forget that I have to download first and I run upload straight away. This will upload my older settings from PC no. 2, losing changes done by PC no. 1 (well, I can get back the older settings from Gist but something bit troublesome just happened).

I'd propose making upload safe as well. For example, the extension could detect that my local settings are older than those on Gist (my local lastDownload is older than Gist's lastUpload) and warn me.

Also, if this is going to be implemented, I'd like to avoid repetitive uploads. Now, if I invoke upload 5 times, even though no settings actually changed, I will get 5 new revisions of the Gist. This is unnecessary, IMO.


IssueHunt Summary

shanalikhan shanalikhan has been rewarded.

Backers (Total: $50.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@shanalikhan
Copy link
Owner

shanalikhan commented Jul 5, 2017

Yes you are right !

forceUpload when turned on it will always upload the settings without checking the gist version as #316.

But if user have the latest settings online and older settings in local.

It will show a message

Gist has newer version. Do you want to override the settings by enabling forceUpload ?

It will enable the forceUpload if user select OK

And Thanks for Providing the Scenarios !

@shanalikhan shanalikhan added this to the v3.0 milestone Jul 5, 2017
@borekb
Copy link
Author

borekb commented Jul 5, 2017

Oh I completely forgot about that #316 issue :) Thank you so much for listening to feedback and improving the extension!

@fgallardograzio
Copy link

@borekb I referenced this issue in issue #396 because I'm thinking the extension could rely on git to provide version control, along with safe/force upload and download, since every gist is a git repo. What do you think?

@borekb
Copy link
Author

borekb commented Sep 18, 2017

@fgallardograzio thanks for the heads up, I'll post a comment there.

@shanalikhan shanalikhan modified the milestones: v3.0, Backlog Jul 11, 2018
@quantuminformation
Copy link

Is there an option to override previous gists? I don't want to have loads of gists on github.

@IssueHuntBot
Copy link

@IssueHunt has funded $50.00 to this issue.


@shanalikhan
Copy link
Owner

@arnohovhannisyan
Can we fix this in next version?

@auxves auxves mentioned this issue Jun 25, 2019
3 tasks
@shanalikhan shanalikhan modified the milestones: Backlog, v3.4.0 Jun 25, 2019
shanalikhan pushed a commit that referenced this issue Jun 25, 2019
* Rename package.nls.pt.json to package.nls.pt-br.json

This aligns the filename to the one needed by VSCode.

* Fix issues on first install

* Safe Upload

* Add option in Other Options menu and update Readme

* Fix requested changes

package.nls.*.json
----
Reorder keys to be alphabetical

sync.ts
----
Notify that the upload was cancelled

github.service.ts
----
Update function name to IsGistNewer
@shanalikhan
Copy link
Owner

v3.4.0 has been fixed with this fix.
Let me know if there is any issue.

@borekb
Copy link
Author

borekb commented Jul 18, 2019

Great to hear! How is this fixed?

@shanalikhan
Copy link
Owner

the extension could detect that my local settings are older than those on Gist

If you have older settings in your computer comparing with updated Gist settings that were uploaded from other computer. It will not allow you to upload unless you download your settings first or select forceUpload to replace that Gist Settings.

@borekb
Copy link
Author

borekb commented Jul 21, 2019

Sounds great, thanks!

@issuehunt-oss issuehunt-oss bot added the 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt label Jul 22, 2019
Repository owner deleted a comment from issuehunt-oss bot Jul 22, 2019
@borekb
Copy link
Author

borekb commented Sep 5, 2019

Update: when trying out the feature, it doesn't work well, see #1016 and #1035.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants