Diff and merge of archives - proposal
jbowtie at amathaine.com
jbowtie at amathaine.com
Tue Oct 12 23:23:26 BST 2010
Again, looking for feedback on obvious design issues before I start my
implementation.
I propose adding the handling of archives to the core diff and merge
algorithms via a DiffArchive class. There will be a new flag
--treat-archives-as-binaries which can be used to avoid the
performance hit of compressing and decompressing archives.
If an archive has changed, the contents will be decompressed and
diffed (note that the contained files and folders will not have their
own file-ids, so renames will not be detected!).
For merging, there will be an ArchiveMerger that attempts to merge its
contents and compress the resulting archive. If the archive format
supports it we prefer incremental updating the BASE version as opposed
to creating a new archive.
If there is a conflict, the archive itself will be flagged as
conflicted and we will output some information about which contained
files conflict. For qbzr we can resolve the conflict interactively.
And yes of course all this could be provided by plugin in the first
implementation, I just happen to think that archives are so prevalent
that they should ultimately be handled by the core.
More information about the bazaar
mailing list