5

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

10
  • 1
    What does "merge a binary file" mean to you?
    – user40980
    Commented Mar 14, 2013 at 21:19
  • @MichaelIT : you can't merge a file with itself, does this answer your question ?
    – joe
    Commented Mar 14, 2013 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" Commented Mar 14, 2013 at 21:27
  • That's still a workaround though?!
    – joe
    Commented Mar 14, 2013 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.
    – user40980
    Commented Mar 14, 2013 at 21:30

2 Answers 2

5

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.

4
  • 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
    Commented Mar 14, 2013 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. Commented Mar 15, 2013 at 1:41
  • 1
    Your link prompts me to sign into google; is it broken?
    – Michael A
    Commented Oct 2, 2014 at 18:34
  • 2
    I have no control over that blog, but apparently it was recently made private. I'll try to find another example. Commented Oct 2, 2014 at 18:57
0

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.