sha1sum of file is different than context has in file.xml

sha1sum of file is different than context has in file.xml

Peter Kelly發表於
Number of replies: 2

I'm having to do a lot of edits to a number of courses, the edits are to insert {mlang} tags around content in the page.xml

After making the edits I need to update the file.xml file with new context hash for the edited file.

My plan was to check the sha1sum before editing, then check it after editing and update the file.xml accordingly (with a sed 's/oldhash/newhash/g')

But the sha1sum isn't in the file.xml file.

Am I misunderstanding how the context hash is generated?

peter@Talesian:~/Desktop/translate/le5_drug_2$ shasum activities/page_10/page.xml 
eb41f1c0b34e1501a2222fde0a2c7bb11830f3bc  activities/page_10/page.xml
peter@Talesian:~/Desktop/translate/le5_drug_2$ nano activities/page_10/page.xml 
peter@Talesian:~/Desktop/translate/le5_drug_2$ shasum activities/page_10/page.xml 
606813e5d311db8ac7d6f85420eb7ffca00ca54d  activities/page_10/page.xml


評比平均分數: -
In reply to Peter Kelly

Re: sha1sum of file is different than context has in file.xml

Dave Balch發表於
I think hashes are only made for binary files like images and PDFs. You can probably just edit the activity data (like page.xml), and re-compress the backup.

HTH,
Dave.