 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
StinkyDuck Guest
|
Posted: Mon Mar 05, 2007 9:12 am Post subject: Build My Own Version Control |
|
|
I am interested creating an application which will keep a version history of
certain files. I realize that there are many version control systems
available but this is more of a learning project than anything else.
I am interested in using Firebird to store the data. Would it be best to
store the files in the database or in a directory with a path location in
the database?
When someone edits a file, it seems that it would not be very efficient to
store the same file again with a newer version. How could I calculate the
delta between the old file and the new file so i can keep a more efficient
storage structure?
Any help or advice would be greatly appreciated. |
|
| Back to top |
|
 |
Robin Guest
|
Posted: Tue Mar 13, 2007 8:12 am Post subject: Re: Build My Own Version Control |
|
|
StinkyDuck wrote:
| Quote: | I am interested in using Firebird to store the data. Would it be best to
store the files in the database or in a directory with a path location in
the database?
|
I would lean heavily towards storing the file in the database itself.
Otherwise the links can become broken very easily (file system changes
for instance, or even the database file moving).
This way the entire repository can be moved in one go.
Firebird Blob fields will serve you well.
| Quote: | When someone edits a file, it seems that it would not be very
efficient >to store the same file again with a newer version. How could |
I >calculate the delta between the old file and the new file so i can
keep >a more efficient storage structure?
No idea, but I think you are on the right track!
Google yielded:
http://www.download3k.com/Software-Development/Editors-Tools/Download-Pass-Diff-Pro.html
or perhaps you could try Torry (http://www.torry.net/)
Good luck!
--
Robin.
Australian Bridal Accessories := http://www.bridalbuzz.com.au
Turbo for Noobs (a work in progress) := http://turbofornoobs.blogspot.com/ |
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Tue Mar 13, 2007 7:43 pm Post subject: Re: Build My Own Version Control |
|
|
Robin wrote:
| Quote: | When someone edits a file, it seems that it would not be very
efficient >to store the same file again with a newer version. How
could I >calculate the delta between the old file and the new file
so i can keep >a more efficient storage structure?
No idea, but I think you are on the right track!
|
It depends what you call "efficient."
Storing differences between revs is generally done by reverse deltas,
meaning that you store a full verion of the tip rev (for speed of
checkout, etc.) and the difference beteween that and the version behind
it (and the difference between that and the version behind *it* and so
on).
Reverse deltas do give you a bit of a file size advantage (something
like 30% in the real world) but they have some substantial
disadvantages:
o Doing diffs between older back revisions is quite slow, because both
revisions must be reconstructed from deltas.
o You can't save space by pointing shared files at the same stored
item. So if you make heavy use of branching/sharing, you lose on
storage space.
-Craig
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Want to help make Delphi and InterBase better? Use QC!
http://qc.borland.com -- Vote for important issues |
|
| Back to top |
|
 |
Marc Rohloff [TeamB] Guest
|
Posted: Wed Mar 14, 2007 1:04 am Post subject: Re: Build My Own Version Control |
|
|
On 13 Mar 2007 06:43:22 -0800, Craig Stuntz [TeamB] wrote:
| Quote: | o Doing diffs between older back revisions is quite slow, because both
revisions must be reconstructed from deltas.
|
Doing diffs between any two versions can be done just by merging the
reverse diffs. It is not necessary to reconstruct the original files.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com |
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Wed Mar 14, 2007 6:31 am Post subject: Re: Build My Own Version Control |
|
|
Marc Rohloff [TeamB] wrote:
| Quote: | Doing diffs between any two versions can be done just by merging the
reverse diffs. It is not necessary to reconstruct the original files.
|
? That's true for diffs alone, strictly speaking, but every source
control tool I've used shows its diffs in the context of the whole
file. You still need to come up with at least one full version. Yes,
you can reconstruct the other file from the delta(s), though. If
there's a big number of revisions between the two versions, though, it
may not save you much time, if any.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
How to ask questions the smart way:
http://www.catb.org/~esr/faqs/smart-questions.html |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|