Showing posts with label dcvs. Show all posts
Showing posts with label dcvs. Show all posts

September 9, 2012

User-safe system configurations



As a developer and Linux-user, I continuously change several configurations in my systems, some of the changes can include:
  • Port-based services: When you have several web servers working on the same machine, you have to configure ports and alias addresses.
  • Package sources: I just don't want to mess my apt-get and slapt-get sources configuration.
  • Security: External services configuration, security configurations and system restrictions.
  • Run levels: I like to have the services I use at system startup, the other ones can burn in hell...
  • Networks: I have some static configurations for some environments.
  • X11: For some custom modifications I made for several displays.
  • Databases: Sources, ports, users and some other configurations.
  • Cron: Some backup and maintenance jobs.
  • Revision control systems: Common filters, aliases, etc.
As you see, there are several configurations on my system, and I don't like to change them when a package gets updated, or when I upgrade my system. My usual alternative was to keep an .orig file for everything I was going to modify, but that didn't work very well, since I modified those files several times.

Because of the situation, I needed these things:
  1. Keep snapshots of my configuration files.
  2. Rollback changes.
  3. Restore old configurations.
  4. Check which files/lines where changed.
  5. Use it all from the shell.
So, long story short, I needed a Revision Control System. And as I needed it just my local machines, I reduced my choice to Git and Mercurial.

My choice? Git, it is obvious that its shell interfaces are superior compared with Mercurial, it's very well integrated with all UNIXes and I have been working with it for a long time.

So, whenever I want to check if a configuration has been changed:

#> git status

What about reverting a change?

#> git reset -HEAD

And if I want to restore it to its initial version?

#>git reset

I just modified a bunch of files, save a snapshot of them:

#> git ls-files --modified | xargs git add
#> git commit -m "Too much work and no fun makes Jack a dull boy..."

January 19, 2012

Fossil SCM

A few months ago I listened to FLOSS Weekly's episode about SQLite, and I wondered how this wonderful project was being managed.

After checking for a while, I found that D. Richard Hipp has developed his own distributed SCM based on the very reliable SQLite.


In a comparison with Git and Hg (which I have used), it is more than a SCM, it is a whole project-development space. Some of its features include:
  • Bug Tracking And Wiki, really cool.
  • Web Interface, incredibly simple.
  • Autosync, still wondering what its benefits are.
  • Self-Contained, yep, everything in one binary file.
  • Simple Networking.

As a developer of some internal projects, it's really hard to keep track of my bugs an issues, and the environment required for it costs too much. But this amazing project does it for me!

Its use is very similar to any distributed SCM and the installation/configuration is barely present. I totally encourage you to try it.