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

[Feature] Backup feature try4 #276

Closed
wants to merge 9 commits into from

Conversation

godiard
Copy link
Contributor

@godiard godiard commented Mar 13, 2014

Install mime type using sugar.xml

godiard and others added 9 commits March 13, 2014 11:38
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Add Backup and Restore classes. These classes implement
backup and restore mechanisms to be used with external
volumes, such as memory sticks.

Add helpers functions to calculate pre-conditions such
as available space, and datastore size.

Comply with interfaces defined by Martin Abente and
Gonzalo Odiard, for sugar upstream backup GUI.

Comply with pep8.

VERSION 2: Added volumes and checkpoints selection logic.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Options are displayed to the user if requested by the backend,
and a progressbar is displayed while the backup/restore is done.

The frontend and backend are separated to make easier create alternative
implementations.

A property is_cancellable is added to the SectionView,
because the restore can't be cancelled, and need modify the toolbar
buttons according to that.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
The file is named based in the xo serial number, or user name if
is not available, and the date. The name is checked for invalid chars.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
The message is shown before the initial testing
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
@@ -52,6 +52,8 @@ data/icons/Makefile
data/Makefile
extensions/cpsection/aboutcomputer/Makefile
extensions/cpsection/aboutme/Makefile
extensions/cpsection/backup/Makefile
extensions/cpsection/backup/backends/Makefile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor thing: we should respect alphabetical order, and "backup" should come after "background"

@manuq
Copy link
Contributor

manuq commented Mar 17, 2014

@godiard could you link to the previous 3 tries, so I can read the comments in them?

@@ -1,4 +1,4 @@
SUBDIRS = aboutme aboutcomputer background datetime frame keyboard language \
SUBDIRS = aboutme aboutcomputer backup background datetime frame keyboard language \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor, "backup" goes after "background"

@godiard
Copy link
Contributor Author

godiard commented Mar 17, 2014

@manuq,
previous pr:

#273
#266
#176

This is not longer needed, but is related:
sugarlabs/sugar-toolkit-gtk3#112

sugar_PYTHON = \
__init__.py \
view.py \
model.py \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor, there is a mix of tabs and spaces here.

@manuq
Copy link
Contributor

manuq commented Mar 18, 2014

ok @godiard these are my thoughts.

i see it is much more polished than the previous try, and the code looks very clean, congrats!

still i couldn't complete the test, because I couldn't restore. i think it was a good idea to try it on the xo :)

I did backup two times, and the second overrides the first one, if this by design, I think is a good decision. I see it uses the machine serial number for filename.. what does it use for sugar without an xo?

and one more question, I see other backends are planned.. is this considered in the current implemetation? the user will need to select a backup destination, or that will be handled automatically? or no plans yet?

@godiard
Copy link
Contributor Author

godiard commented Mar 18, 2014

@manuq ,
Thanks for the review. I will address your comments.

still i couldn't complete the test, because I couldn't restore. i think it was a good idea to try it on the xo :)

I see, will check again. I don't know why you don't see the icons neither.

I did backup two times, and the second overrides the first one, if this by design, I think is a good decision. I see it uses the machine serial number for filename.. what does it use for sugar without an xo?

Is by design, in non xos, use the user name to create the file name:

godiard@91423ed#diff-49cf7ea888825ecc1f54eef7fa67944eL87

and one more question, I see other backends are planned.. is this considered in the current implemetation? the user will need to select a backup destination, or that will be handled automatically? or no plans yet?

Is considered. The current implementation ask to the user what backend use if more than one is present.

@godiard
Copy link
Contributor Author

godiard commented Mar 19, 2014

@manuq , found why the icons were invisible in the xo.
After copy the files, you need do as root:

gtk-update-icon-cache /usr/share/icons/sugar/

@godiard godiard mentioned this pull request Mar 20, 2014
@godiard godiard closed this Mar 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants