Folks,

I'm using TortoiseSVN on Windows 7 talking to a mod_dav server in Apache hosted in Fedora 13. While TSVN is working for me, it might be possible to use another tool if that would help.

The svn repo I maintain contains a lot of files for a simulator. The files define the simulator environment and are in fact well-formed XML. However the simulator stores them on disk as compressed files (*.bin), and the so the repo does too. This is all fine, except I lose the ability to track and merge changes.

Is there a way (hook?), when TSVN sees a file is different, for it to call an uncompress utility on the files from disk and repo, do the merge/whatever, and then recompress again once finished?

I have the compressor (not ZIP - it's special). I emphasise: the use of compressed files is not my choice, it's the simulator's, and I can't alter that. There is never more than one XML file in a compressed file (think gzip not unzip)

So, just to be clear, I imagine the current svn_client side_update process to be something like:

Code:

for each working file do
  if working version number lower than repo version number {file out of date}
    if date or size properties differ from base version And
           checksum differs from base version And file is mergeable {working 
version modified }
      fetch latest version {now have 3: base, latest, working }
      diff3 base version, latest version, working version { now have patch to 
working }
      if diff patches don't conflict
        patch working version
      else
        mark for manual merge
      end if
    end if
  end if
end for

... probably left stuff out but, assuming it's not too bad, I'm saying : can this be modified to:

Code:

for each working file do
  if working version number lower than repo version number {file out of date}
    if date or size properties differ from base version And
           checksum differs from base version And file is mergeable {working 
version modified }
      fetch latest version {now have 3: base, latest, working }
*       uncompress just-fetched latest version {read only, temporary }
      uncompress working version {to be patched, temporary }
      uncompress base version {read only, temporary }
*       diff3 base version, latest version, working version { now have patch to 
working }
      if diff patches don't conflict
        patch working version
*         compress working version {new working version }
*       else
        mark for manual merge
      end if
*       delete temporary files
*     end if
  end if
end for

Of course, similar changes would be needed in some other code paths, notably view differences.

Thanks
Ruth

--
Software Manager&  Engineer
Tel: 01223 414180
Blog: http://www.ivimey.org/blog
LinkedIn: http://uk.linkedin.com/in/ruthivimeycook/

Reply via email to