Hg for “Source Code” only?

hamann.w at t-online.de hamann.w at t-online.de
Wed Apr 23 04:15:41 UTC 2014


Steve Barnes wrote:

>> Note that the ZipDoc <http://mercurial.selenic.com/wiki/ZipdocExtension> 
>> extension can deal efficiently with compressed files produced by modern 
>> office files such as .docx and .odt and allows you to diff the xml that 
>> is stored in them on just about *every* operating system, (it is 
>> implemented in pure python), but can also handle *any .zip* compressed 
>> file.  It does this by actually storing the content of the 
>> .zip/.docx/etc and re-compressing them on checkout. There is a note that 
>> things like office documents may change size by being checked in and 
>> then out due to low efficiency zip being used by MS-Word.  ZipDoc ships 
>> with TortoiseHg, and if enabled works from the command line as well, but 
>> can be downloaded and added to command line only installations.
>> 

Hi Steve,

I had some "fun" with zip formats a while ago, so I want to add to the discussion.
One is - I encountered a proprietory file format that happens to be a broken zip.
I installed a custom function that would "unzip" such files and make available to mercurial.
In that case it means that I can follow the changes made to the file but cannot have 
mercurial rebuild it.

The other one: some software authors consider adding a sequential id attribute to xml a good
idea, even if saving the file renumbers elements from scratch. Together with mercurial this means
that a plain diff does not show the one entry that was added or removed in the middle, but
rather all subsequent entries that had their id's changed.
A specialized diff tool could show the real changes, but there should be a companion
patch tool that recreates the numbers when packing

Regards
Wolfgang






More information about the Mercurial mailing list