[PATCH] Add zip format to export command
Alexander Belchenko
bialix at ukr.net
Sun Nov 13 13:48:45 GMT 2005
Goffredo Baroncelli пишет:
> I read your code, and I think that it can be simplified removing the class
> cmd_zip_export, and using the classic command bzr export
> Moreover I added the support for empty directory, and symlink. The symlinks
> are simulated creating a file with a .lnk extension which contains the
> link [ but there will be some problems if you have a link and a file ending
> in .lnk with the same name .... ]
Thank you for your patch. I merge your improvements and it works well.
Furthemore I decide to create extension for standard export command
instead of previous zip-export command. So now you can simply do
bzr export filename.zip
without needs to explicit point to format argument.
New version of zipexport plugin you can download from my page:
http://bzr.onembedding.com/bzr.win/plugins/index.htm
http://bzr.onembedding.com/bzr.win/plugins/zipexport.zip
Or you can branch my repo:
bzr branch http://bzr.onembedding.com/bzr.win/plugins/zip-exporter
>>For me the bad thing about zip format is no support for unicode names.
>>I'm thinking about use additional command line options for specify
>>filename encoding for non-ascii file names. It may be useful for some
>>cases when user definitely know what file encodings is. Something like this:
>>
>>bzr zip-export --fe=cp866 dest.zip
>> ^^^^ this is file name encoding option
>>
> Filename encoding is a mess; even tough you know which encoding is at the export
> phase, you don't will know the encoding at the unzip phase...
In global sense -- yes, non-ascii filenames is problem. But in local
sense, i.e. in my personal projects or projects of my job team, it make
sense to create zip with known encoding, because it will be used only in
local environment when language of file names is known "apriori".
Alexander
More information about the bazaar
mailing list