[Sugar-devel] [read PATCH] sdxo#4448: Revert back to the earlier behaviour, of re-computing filehash every time when needed.

Gonzalo Odiard gonzalo at laptop.org
Thu Feb 28 11:02:52 EST 2013


Hmm, may be I misreaded.
What is trying to solve this patch?

Gonzalo

On Thu, Feb 28, 2013 at 1:01 PM, Gonzalo Odiard <gonzalo at laptop.org> wrote:

> How is this related with collaboration?
>
> Gonzalo
>
>
> On Thu, Feb 28, 2013 at 12:23 PM, Ajay Garg <ajay at activitycentral.com>wrote:
>
>> This reverts commit 21af7cc988320c8a53c946253d52fe1bb6ff9a7e.
>>
>> Thankfully, we do not lose anything, as the commit
>> 21af7cc988320c8a53c946253d52fe1bb6ff9a7e was just an "optimisation"-commit;
>> we don't lose anything on the frontend/backend/anywhere :)
>>
>>  readactivity.py        | 10 ++--------
>>  1 files changed, 2 insertions(+), 8 deletions(-)
>>
>> diff --git a/readactivity.py b/readactivity.py
>> index beed2b4..e0f0cf8 100644
>> --- a/readactivity.py
>> +++ b/readactivity.py
>> @@ -710,7 +710,6 @@ class ReadActivity(activity.Activity):
>>          self.metadata['Read_search'] = \
>>                  self._edit_toolbar._search_entry.props.text
>>          self.metadata['activity'] = self.get_bundle_id()
>> -        self.metadata['filehash'] = self.filehash
>>
>>          os.link(self._tempfile, file_path)
>>
>> @@ -856,13 +855,8 @@ class ReadActivity(activity.Activity):
>>          self._view_toolbar.set_view(self._view)
>>          self._edit_toolbar.set_view(self._view)
>>
>> -
>> -        self.filehash = self.metadata.get('filehash', None)
>> -        if self.filehash is None:
>> -            self.filehash = get_md5(filepath)
>> -            logging.error('Calculate hash %s', self.filehash)
>> -
>> -        self._bookmarkmanager = BookmarkManager(self.filehash)
>> +        filehash = get_md5(filepath)
>> +        self._bookmarkmanager = BookmarkManager(filehash)
>>          self._bookmarkmanager.connect('added_bookmark',
>>                  self._added_bookmark_cb)
>>          self._bookmarkmanager.connect('removed_bookmark',
>> --
>> 1.7.11.7
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130228/5756e34d/attachment.html>


More information about the Sugar-devel mailing list