Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Algorithm for Source Control System?

I need to write a simple source control system and wonder what algorithm I would use for file differences?

I don't want to look into existing source code due to license concerns. I need to have it licensed under MPL so I can't look at any of the existing systems like CVS or Mercurial as they are all GPL licensed.

Just to give some background, I just need some really simple functions - binary files in a folder. no subfolders and every file behaves like it's own repository. No Metadata except for some permissions.

Overall really simple stuff, my single concern really is how to store only the differences of a file from revision to revision without wasting too much space but also without being too inefficient (Maybe store a full version every X changes, a bit like Keyframes in Videos?)

like image 857
Michael Stum Avatar asked Apr 18 '10 04:04

Michael Stum


People also ask

How source code control system works?

Source Code Control System (SCCS) is a version control system designed to track changes in source code and other text files during the development of a piece of software. This allows the user to retrieve any of the previous versions of the original source code and the changes which are stored.

What is an example of source control?

There are several different tools that implement different kinds of source control. For example, Git is a source control tool that sets lets you manage a project. Github is a web-site that repositories managed with Git are usually stored on. Mercurial is yet another source control tool.

What are the three types of version control?

The types of VCS are: Local Version Control System. Centralized Version Control System. Distributed Version Control System.

What is source control Strategy?

Source control is the process of finding sources of contamination, then stopping or reducing them before they reach the Lower Duwamish Waterway (LDW). We must make sure that sources of contamination to the LDW are sufficiently controlled before in-waterway cleanup begins.


1 Answers

Longest Common Subsequence algorithms are the primary mechanism used by diff-like tools, and can be leveraged by a source code control system.

"Reverse Deltas" are a common approach to storage, since you primarily need to move backwards in time from the most recent revision.

like image 157
JasonTrue Avatar answered Sep 17 '22 14:09

JasonTrue