Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

At work we have a legacy system written in Visual FoxPRO.

Everything in foxpro is a table, even forms, so basically if you open a form file with a text editor you don't learn much.

Does anyone know about a tool for source control, that support merging and managing binary files? For now I'm converting what I can convert to text, use a text tool like to merge changes, and replace them manually, to get the team work in one version, then upload the stuff to a TFS server. I know it is not genius... please advise

share|improve this question
1  
What does "merge a binary file" mean to you? –  MichaelT Mar 14 '13 at 21:19
    
@MichaelIT : you can't merge a file with itself, does this answer your question ? –  joe Mar 14 '13 at 21:25
    
existing text merge techniques will work (with some modification) on binary, (convert the binary to hex and it's straight forward), it's easier if there is a (known) delimiter you can split on to separate into "lines" –  ratchet freak Mar 14 '13 at 21:27
    
That's still a workaround though?! –  joe Mar 14 '13 at 21:29
    
Typically, one uses merge to merge parts of a text change into another text file - "I need to reincorporate changes from revs 2 and 3 in branch foo into the mainline." With binary files, this doesn't work as well. –  MichaelT Mar 14 '13 at 21:30

2 Answers 2

up vote 5 down vote accepted

There is no one size fits all tool, because binary file formats are highly customized. However, some version control systems, like git, let you specify a custom merge driver for specific file formats. Here's an example. Basically, you write a program that can do the merge for any three files, and git will automatically call that program whenever needed to merge entire branches.

If you already have a way to convert a binary file back and forth to text, that's a pretty good start to a custom merge driver. Unfortunately, there is no easy solution.

share|improve this answer
    
Thanks for the link, what if i create that tool, let's say as a console app in c#, that takes as arguments file1 file2 and returns a file3 with updates from previous files? Does the "driver" need to follow some specs? Or Git just takes whatever file my "driver" is going to return and do his job... I'm saying so since i'm not familiar with Git and do not know the nature of tools/programs that can interact with it. Especially that i need to do some research to see if i can find any APIs or docs that describe the foxpro files structure. –  joe Mar 14 '13 at 23:11
    
See here for more information. Basically, git passes three filenames on the command line, and you replace one of the files with the merged result. –  Karl Bielefeldt Mar 15 '13 at 1:41
    
Your link prompts me to sign into google; is it broken? –  Michael A Oct 2 at 18:34
1  
I have no control over that blog, but apparently it was recently made private. I'll try to find another example. –  Karl Bielefeldt Oct 2 at 18:57
    
@KarlBielefeldt Awesome, thank you! –  Michael A Oct 2 at 19:22

I have a source conrol system that deals with all the issues of VFP files. Works well in multi user, multi project environment. Custom written ebcasue there is nothing out there that I could find that did the trick.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.