CINXE.COM
Bones version control
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("http://bkhome.org/bones/index.html","20110717142817","https://web.archive.org/","web","/_static/", "1310912897"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Bones version control</title> <meta content="Barry Kauler" name="author"> <meta content="Simple project version control management" name="description"></head><body> <table style="text-align: left; width: 600px; margin-left: auto; margin-right: auto; height: 4215px;" border="0" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="vertical-align: top;"> <table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="vertical-align: top;"><span title=" Home page " class="popup"><a href="/web/20110717142817/http://bkhome.org/index.html"><img alt="Home page" src="/web/20110717142817im_/http://bkhome.org/pup48.jpg" style="border: 0px solid ; width: 48px; height: 48px;"></a></span></td> </tr> <tr> <td style="vertical-align: top;"><br></td> </tr> </tbody> </table> <br> </td> <td style="vertical-align: top;"> <h1><img style="width: 104px; height: 76px;" alt="boneslogo" src="/web/20110717142817im_/http://bkhome.org/bones/bones104x76.png" align="middle"> Bones: version control<br> </h1> <span style="color: rgb(51, 0, 0);">Page partially updated March 22, 2010 </span><h2>Preamble</h2> Bones is a project version control management system, though that is very much of an overstatement -- Bones is really basic!<br> <br> Bones came about because the version control systems out there, such as <span style="font-style: italic;">GIT</span>, <span style="font-style: italic;">SVN</span> and <span style="font-style: italic;">Fossil</span>, have limitations and/or are very complicated and big. I did setup Fossil for my Woof project, but ran into five limitations, the fifth being lack of support for symlinks and that was the last straw. I wrote about the Fossil saga on my blog <a href="https://web.archive.org/web/20110717142817/http://bkhome.org/blog/?viewDetailed=01200">1</a> <a href="https://web.archive.org/web/20110717142817/http://bkhome.org/blog/?viewDetailed=01201">2</a> <a href="https://web.archive.org/web/20110717142817/http://bkhome.org/blog/?viewDetailed=01206">3</a> <a href="https://web.archive.org/web/20110717142817/http://bkhome.org/blog/?viewDetailed=01207">4</a> <a href="https://web.archive.org/web/20110717142817/http://bkhome.org/blog/?viewDetailed=01208">5</a> <a href="https://web.archive.org/web/20110717142817/http://bkhome.org/blog/?viewDetailed=01216">6</a> <br> <br> There's a project called <span style="font-style: italic;">Dim</span> which is promising but is a work-in-progress.<br> <br> So, I thought why not knock up something that will do the job for me? I have named it <span style="font-style: italic;">Bones</span> and have implemented the core functionality.<br> <br> Considering the limitations that I had encountered in other version control systems, I have designed Bones differently: Bones is "project-centric" rather than "file-centric". That is, Bones archives the entire project rather than individual files. I also wanted extreme easy of use.<br> <br> The easiest way to explain is to run through how to set up Bones for my <a href="/web/20110717142817/http://bkhome.org/woof/index.html"><span style="font-style: italic;">Woof</span></a> project, in these simple steps...<br> <h2>Getting started</h2>Bones is just a shell script named 'bones', plus one or more small support scripts (currently have 'bones_diff.pl' created by ecube). Usage involves executing 'bones' with some parameter, and in some cases a GUI pops up when Bones needs extra information.<br> <br> <div style="margin-left: 40px;">If you have a recent distro built from Woof, such as my Quirky, then you will already have the 'bones' script. If you don't have it in your Puppy, or want to check if you have the latest, get it from here:<br> <big style="font-weight: bold;"><a href="https://web.archive.org/web/20110717142817/http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-quirky/">Quirky PET repository</a></big> <br> <big style="font-weight: bold;"><a href="https://web.archive.org/web/20110717142817/http://puppylinux.com/test/bones/"></a></big>...just download then click on it to install. If using a non-Puppy distro, 'tar -zxf bones-xxx.pet' will expand it and then manually install.<br> </div> <br> To get going, from the user's perspective, is just two steps...<br> <br> To setup a project is very easy. There is one little formality: your project "working directory" must be named starting with the project name. In the case of Woof, the project name is "woof", so create a directory named like this:<br> <div style="margin-left: 40px;"> <pre>> mkdir woof-tree<br>> cd woof-tree<br>> bones setup<br></pre> </div> ...then run 'bones setup'. Choose a username for yourself and enter the URL for downloading the 'woof' project:<br> <br> <img style="width: 577px; height: 316px;" alt="setup" src="/web/20110717142817im_/http://bkhome.org/bones/bones-setup1.png"><br> <br>In the case of the Woof project, the 'download_url' parameter is: <br> <pre><span style="font-style: italic;">http://bkhome.org/bones/woof/</span></pre> The 'bones' script will automatically create a directory ../woof-bones and this is the project "repository" where the complete history of the project will reside.<br> <br> Step two is to download the project. Just type this:<br> <div style="margin-left: 40px;"> <pre>> bones download</pre> </div> ...this will download the project repository and then build all the files in your 'woof-tree' working directory. That's it, you are ready to use Woof.<br> <br> You don't have to remember what commandline options 'bones' accepts (setup, download, etc.) as there is a main GUI for launching them. Just type 'bones' or 'bones gui' at the shell prompt, and you will get this window:<br> <br> <img style="width: 489px; height: 558px;" alt="main-gui" src="/web/20110717142817im_/http://bkhome.org/bones/bones-main-gui.png"><br> <br> ...note though, the very first time that you run 'bones', the setup window will launch, so that things get setup properly for further usage.<br> <h2>Usage: administrator<br> </h2> I have designed Bones for the "benevolent dictator" model, where there is only one boss, who has the username 'administrator'. As the administrator of Woof, I'll explain usage from my perspective...<br> <br> I have my Woof project, let's say in directory 'woof-tree'. To setup Bones, I need a file '../woof-bones/filelist'. 'filelist' is just a list of what is to be saved. This can be files or directories and wilcdards are allowed. In my case 'filelist' has this in it:<br> <div style="margin-left: 40px;"> <pre>boot<br>packages-templates<br>rootfs-skeleton<br>support<br>0pre<br>0setup<br>1download<br>2createpackages<br>3builddistro<br>create_new_woof<br>DISTRO_PKGS_SPECS*<br>PKGS_MANAGEMENT<br>DISTRO_PET_REPOS<br>DISTRO_SPECS<br>README.txt<br>Packages-puppy*<br>PKGS_HOMEPAGES<br>woof_gui<br>woof_gui_tabs<br>DISTRO_COMPAT_REPOS*<br>findwoofinstalledpkgs</pre> </div> I created this file manually, but files or directories can be added by the command:<br> <div style="margin-left: 40px;"> <pre>> bones add <file or directory><br></pre> </div> That's all that is needed to set it up. All that I have to do now is:<br> <div style="margin-left: 40px;"> <pre>> bones save<br></pre> </div> The first time that I save, a tarball is created of the entire project, at '../woof-bones/woof-<date>REFERENCE.tar.gz'.<br> Every time in the future that I type 'bones save', a delta file gets created of the difference between the latest and previous tarballs. I have only done nine saves so far, and this is what my 'woof-bones' directory looks like:<br> <br> <img style="width: 574px; height: 435px;" alt="woof-bones-dir" src="/web/20110717142817im_/http://bkhome.org/bones/woof-bones1.png"><br> <br> ...from a user perspective, after you have done a 'bones download' the above is almost exactly what you will have in your own 'woof-bones' directory (minus the 'administrator' file).<br> <br> I will be able to reconstruct any prior save of Woof, simply by starting with 'woof-20091202081304REFERENCE.tar.gz' and applying the deltas until the desired save is reached.<br> <br> As Bones is not file-centric, to examine the history of an individual file is more difficult. Bones would have to recreate the tarballs of each save and extract the file from each, then a file-history can be created. The downside is that it will take awhile, but I am enploying caching.<br> <br> Whenever I want to make the latest version of Woof publically available, I just type this:<br> <div style="margin-left: 40px;"> <pre>> bones upload</pre> </div> <h2>Usage: user</h2> From the user perspective, just run 'bones download' whenever you want to update to my latest version of Woof.<br> <br> You will also be able to contribute to development of Woof, if you wish. If you run 'bones save' then a .delta file gets created with your changes and with your username in the file, for example 'woof-20091227122321-20091230345600john.delta'.<br> <br> I'm currently not thinking in terms of anyone else having upload right to my Woof project, instead, 'john' can email his .delta files to me. So it will be a "circular" contribution pattern rather than the distributed "star" pattern that GIT and others employ. <br> <br> <h2>Future</h2> Bones is simplistic so far, almost trivial, but solves my immediate need to keep a compact history of my project. <br> <br> It's early days. I need to test basic functionality some more. Future work will be to improve the mechanism for users to contribute to development of Woof, and mechanisms are required to view histories of individual files -- probably with caching.<br> <h2>Further notes</h2> Bones is intended to run on any Puppy Linux or Puppy-derivative, version 4.3 or later. However, Bones will work on another Linux distro if you have these packages installed:<br> <br> <div style="margin-left: 40px;">xdelta3<br> gtkdialog3 (use our version 0.7.20-patriot-e-1 which has bug fixes)<br> wget<br> openssh<br> gftp<br> </div> <br> <br> <small>© Copyright Barry Kauler 2009 bkhome.org All reproduction rights reserved</small><br> </td> </tr> </tbody> </table> <br> <br> </body></html><!-- FILE ARCHIVED ON 14:28:17 Jul 17, 2011 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 22:01:57 Nov 23, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.541 exclusion.robots: 0.034 exclusion.robots.policy: 0.022 esindex: 0.009 cdx.remote: 12.097 LoadShardBlock: 98.799 (3) PetaboxLoader3.datanode: 101.038 (4) load_resource: 160.261 PetaboxLoader3.resolve: 78.952 -->