views:

591

answers:

14

I'm a hobby developer and i want to put my projects in some sort of version control. I've tried several version control systems (git i think, SVN, mercurial, bazaar) and they were a pain in the neck for one or more of the following reasons:

  • There was no GUI interface
  • The gui interface it DID have was clunky
  • it plastered decals all over my files in Explorer
  • i couldn't figure out how to get any projects into it properly (whether that was the fault of the interface, or the lack of a plugin for VS depends on the software)
  • None of them seemed to have a facility for rolling back to a previous revision

Thus, i'm thinking of rolling my own. I only need a very simple system which allows committing of revisions and rolling back to a previous version. I can accomplish branching and merging/change inspection via a combination of Copying and WinMerge.

I plan to write the actual code that does the heavy lifting in lua with an occasional shell command executed for copying and such, and either AutoHotKey or a combination of AutoHotKey and Winforms/.NET for the gui interface (depends on how easy it is to create dialogs with input in AHK). I wanted to pick your brains on this, what do you guys think? is there software already that does what i want?

To rephrase my question in short: is there a minimal-functionality version control system that basically handles backup, revision annotation and rollback, and little to nothing else, failing that what is your opinion on my implementation and suggestions for improvement?

[I hope this doesn't get closed, i really think it's on topic and useful to the community.]

+10  A: 

Yes, there is software that already does what you want.

Version control software is usually fairly deep as they provide a significant amount of functionality. (Be happy you didn't try to figure out command-line cvs)

If all you really want is version control, I'd strongly suggest going back and looking at SVN again and trying to take the time to learn it. TortoiseSVN does put icons on your explorer files, but those things are useful, and it only goes on the files you have in source control.

Donnie
But i don't need a "fairly significant amount of functionality". I just want to maintain a set of backups to projects, with notes for the versions stored along side and the ability to roll bac to a previous version. (As i understand it, this is a basic VC system, combined with some difference inspection)
RCIX
and for the record, i do NOT like the icons on my files at all, they just get in my way mentally.
RCIX
FYI: The explorer icons in TortoiseSVN can be turned off.
Will
+8  A: 

To be honest, most version control started with the most basic of utilities: diff. diff and diff3 are, in many ways, the heart of a VC system, as they are convenient ways to collect the changes from time to time.

If that's too involved, you can simply make continual copies of the older files, stored within named directories, but you can see how this can get rather large, rather fast.

So, you can then, instead, checksum the files to be checked in. Then you can compare the new files to the existing files, if the checksum matches, you can either choose to not save it at all, or do a byte level compare just to make sure the files are different (since checksums are hashes, hashes can overlap, though, it's unlikely you will have a collision).

If you're going to do this, then each changeset can be the new, changed files, (full copies), plus a list of files "from before". This handles files that get deleted (simply don't list them in the list of files "from before").

Obviously, it's a crude system in terms of implementation, but it's straightforward. Many source code control system actually started as a collection of unix shell scripts, then redone in C for performance reasons.

Will Hartung
I like these ideas, quite possibly for V2 :)
RCIX
Take this far enough and you might end up with Git: http://tom.preston-werner.com/2009/05/19/the-git-parable.html
Chris Johnsen
Lol, but you may be right :) interesting. Thanks for the link!
RCIX
+3  A: 

Well. You can of course do what ever you want with your time. But I would suggest you persevere at looking for a 95% of features that you want. You might find an opensource one that has 80% done of what you want. Then you can tweak the code to get your remaining features. Or bug the writer of an existing source control package for your wish list.

I use FreeVCS which has migrated to an opensource JEDIVCS Check it out. It may do a lot of what you want and not take over your world.

Good hunting

Interesting idea, didn't think of that, thanks! :)
RCIX
+29  A: 

I feel version control is a skill all programmers should be adept at.

Personally, if a developer explained to me during an interview that they felt none of the market leading VC tools were intuitive enough for use and they opted to roll their own instead, I'd have serious misgivings of the candidate. If you were thinking about rolling your own for sport or to improve what's out there, I'd have a different opinion.

I feel your time would be better spent getting over the hurdles that are keeping you from understanding/comfort with the existing version control tools.

I started with CVS but if I had to suggest a solution, I'd use VisualSVN for a server, TortoiseSVN for shell integration and AnkhSVN for VS integration.

antik
Good thing im a hobby programmer then :) Quite good points i suppose, but maybe it's me. I'll probably investigate SVN again, but i want to roll my own as much for the coding and to try and make one myself as to have one that fits my needs.
RCIX
Your needs are minimal: nearly any of the VC tools can accommodate them. I'm confident that the effort required to reinvent the wheel in this scenario would exceed that of learning an existing solution only to arrive at an inferior end result. Without knowledge of the existing solutions, you're ill equipped to improve on what's already out there. Spend that effort on building something great. Hobby or otherwise, I don't feel it wise to attack problems that already have reasonable solutions (especially here where you'd be expected to be proficient with these tools if you advance beyond hobby).
antik
I'm not aiming for something improved, merely something that does what i want and nothing else.
RCIX
I gather that. I'd say that's stubborn and not in your best interests.Part of programming is identifying the right tool for the job and using it. Being willing to learn new technologies is a must. Surely you can come up with something great to write in the cycles you'll save by not attacking the VC problem.
antik
That's the thing! i don't have much to write right now and a VC *is* and interesting project for me.
RCIX
Programmers should learn to use their tools - there are already many technically excellent SCM packages out there. But where they all fall down is their *terrible* user interface. I've been using SCMs for 28 years and am still shocked at how unnecessarily difficult some things are. e.g. If you check in and realise you made a mistake, why is there no "UNDO last check in" option? Technically that would be a trivial feature to add; in terms of user interface it would bring us out of the dark ages. We have the power - now we need the finesse and usability!
Jason Williams
You have a point Jason. That is insight gained from your familiarity with SCM tools however: not something the OP seems willing to spend the time to earn. I'm all for improvements: I'm not saying existing VCs are the best they'll be and that's why they should be used. However, I feel the OP's reinvention idea specializes in something nobody else is using while isolating from the tools folks in the professional world expect to see. Someday, the OP ought to be interested in trying a feature branch model at which point, more development time will be lost or the OP will need to learn a VC anyway
antik
+2  A: 

Take a look at VisualSVN server and TortiseSVN. It has all the functionality you say you need (yes, even the ability to revert a file) and if you should need more later down the road, it's already there. It's road tested and proven and dead simple to get working. If you really don't like those helpful icons, TortiseSVN lets you turn them off.

If you're looking for approval to implement a system that's rather difficult to get right, I don't think anyone here is going to give you that. If you want to just do it for the fun of it, then why ask here?

jasonh
I point you to my comment on Donnies answer
RCIX
I point you to the second sentence in my answer.
jasonh
+1  A: 

Well, if you ask for GUI Version Control that is intuitive, try:

VisualSVN + TortoiseSVN on Windows, or

TortoiseHg

Both of them are software witch high quality.

BTW, I reckon you need to refresh your knowledge about Version Control Systems since I can easily pick some wrong thoughts from your words.

Michael Mao
I tried both of those and maybe it's just my memories or i was working them wrong, but i did not find them easy to use.
RCIX
So try using them again perhaps?
Marc W
Well, honestly if you feel tortoiseSVN/tortoiseHg is not easy to use, then I really cannot think of anything to suggest you try...
Michael Mao
+1  A: 

I have used SVN with TortoiseSVN as its GUI and it worked fairly well for me. I should say though that I still prefer the command line tools - particularly for merging.

But whenever I need something really simple, I always fall back to the mother of all version control systems (i.e., RCS). RCS is really straight forward. I cannot think of a simpler version control system. So if you are really looking for utmost simplicity, I would suggest that you check RCS out.

RCS is so simple that I never even bothered looking for a GUI for it. But if a GUI is really important for you and you are hell bound onto writing your own, I would think that you can easily write a front-end for RCS. It may be worth looking around first though. I would start at freshmeat.net.

figurassa
I'll keep a copy of RCS around to play with but i'm not sure i want to use it, thanks for it though :)
RCIX
+2  A: 

While I've never really been thrilled by any version control system I've used (SCCS, RCS, Visual Source Safe, ClearCase, Subversion), I'd be terrified of programming without one.

We currently use Subversion with the Subclipse plugin for Eclipse, plus Tortoise SVN. They're reasonably serviceable.

Version control is a complex area, so I wouldn't recommend developing your own system, unless you want to do it for fun/learning, or unless you really have a great idea for one and want to kick off an open source project. Perhaps you could join an existing effort and improve it?

Jim Ferrans
+2  A: 

Since you seem to be approaching this as a learning project, you might want to investigate using RCS for your low-level file manipulation. After you're comfortable manipulating things in RCS, you can then investigate replacing that layer if you're still interested.

For learning purposes, you might also investigate Perforce, which is free for small-scale use such as yours.

Mark Harrison
see my comment of figurassa's answer
RCIX
+3  A: 

If you were on a Mac, I'd suggest Time Machine. On Windows, there are a number of options that fill the same niche as a lightweight, GUI-friendly tools that perform incremental backup and could serve as the type of simple version control you want.

I haven't used any of these, so I'm only offering these as links, not endorsements.

Good luck!

Bill Karwin
My files are already under backup, but thanks anyway :)
RCIX
I think that the point Bill was making is that these are _incremental_ backups: it doesn't just keep the most recent. You can go back to an earlier version.
Matthew Schinckel
@Matthew: Thanks for the support, but I don't think RCIX is listening to *any* of the suggestions on this thread.
Bill Karwin
A: 

You could look at DropBox as a simple versioning system. Not sure it will do everything you want, but it will have each saved iteration as a "version".

Plus, you get online access, and "backups", all included.

Matthew Schinckel
+6  A: 

I've used many SCM's over the years and they universally expose stupid, clunky, difficult, and overly complex user interfaces. For day to day use most people only need check out, check in and undo checkout, but the SCMs permanently expose hundreds of options. I agree totally with your desire to have something simple to use (with an advanced UI for those times when you need to do something more involved)

I have aso implemented three bespoke SCMs ("wrapper" UIs for SourceSafe and Perforce, and finally a fully blown bespoke SCM based on an SQL database - these were used on several game projects with up to 100 concurrent users).

If you want a "simple" SCM, then your best approach is to take a solid and well supported SCM and write a client application as a simplified front end for it. Most if not all SCMs expose an API that allows you to control them. Writing a good front end you need only expose the basic operations:

  • browse files
  • check out
  • check in
  • undo check out

Whenever you need to do anything more complex you can resort to the SCM's more complex user interface - there are times when the more complex UI is needed. But most of the time your simple UI will be perfect.

Bear in mind that if you want to add more features but keep things "simple", then you're in for a whole load more work. For example, in a "simple" branching system, you would just create many "variants" of your source code (branches), and by choosing the active branch from a list, the SCM would automatically switch you between them. Simple UI, but this would take a lot of work to implement - hence we're stuck with overly complex branching systems involving hideous workspace mappings that have to be set up on every user's PC.

If you want to roll your own SCM from scratch then beware: It is a lot lot lot more difficult and time consuming than it looks!

Version control for a single user is trivial to implement (you need a file storage system that records historical versions, and a way of copying files between your workspace and the version-store (but you'll need a good mapping approach so you can rename and delete files without losing their history). Rolling back is as simple as fetching a historical version and then checking it in as the new "latest version")

Then labels are really useful. They're easy to add.

Then you really ought to add changelists so you can check in a group of files as a related change. Not quite so simple as they might seem because for reliability you really want to make each checkin an atomic transaction, so that you don't get a partial check-in if anything fails.

As soon as you go multi-user, you introduce concurrent network access and locks - this is suddenly several orders of magnitude more complex. You need a database to remember which files each user has in their workspace and who has what locked, and a very robust means of handling concurrent checkins (so the database can handle e.g. two checkins of hundreds of files simultaneously without corrupting anything).

Then you need to support operations like Add and Delete which are only applied locally until you check them in. So you need a local database to store the current state on each user's PC.

Then we have a system where only one person can change a file at a time. If you want non-exclusive locks, you need to support 3-way merges.

And then there's branching, with some way of configuring workspace mappings.

If you need internet access rather than LAN access, you might need to add some form of proxy/replication system.

And... Oh, we've got a hideous complex beastie with a clunky complicated UI. And we're so busy supporting it that we don't have time to go back and write a nice simple UI for using the basic features. :-)

Jason Williams
would upvote but out of votes for the day :(
RCIX
+2  A: 

Hello RCIX,

I am the developer of TimeTraveler. I am using it myself to roll back projects the way you are describing. The current release is based on Volume Shadow Copy, the Microsoft snapshot technology. The snapshots for a volume are presented in the form of a timeline at the bottom of Windows Explorer. To rollback a project you would:

1- Fire up Windows Explorer 2- Navigate to your project directory 3- Drag the time cursor on the timeline to a prior point in time that contains the version you want 4- You are now looking at the prior version of your project. Copy the project directory 5- Bring back the time cursor completely to the right on the timeline and paste the directory

It is that simple. Be aware that TimeTraveler 1.3.2 does not save to secondary storage. The snapshots are stored on the disk with your data therefore TimeTraveler cannot replace backups. Copying to secondary storage is part of version 2.0 to be released soon.

TimeTraveler comes with a form to create and schedule snapshots.

I find the Compare-points-in-time feature located on the Explorer Context menu very useful. I use it when I make a bunch of changes to my project and introduce a bug that is not easy to find.

TimeTraveler is free for 10 days and then it is really cheap. If you have questions I will be happy to answer them. Send them to "info at bearsontheloose dot com".

KoalaBear
I'll certainly check it out, sounds a bit like TimeMachine for windows :)
RCIX
A: 

Sounds to me you dislike the GUI more than you dislike the aforementioned source control systems. Reinventing your own version control as a lot of people said would probably be a nice challenge -- in both a good and bad way.

But I would tend to agree that sometimes the GUI are not very intuitive. Why not choose a good version control system (git or mercurial for example) that doesn't have a lot of GUI for it and contribute to one of the GUI projects (be it code or constructive comments) such as TortoiseHg or roll your own. I think making a usable user interface that works simply and beautifully for you is a far more interesting endeavor.

Learn how the command line and API underneath work and what it can (very well) do and build your user interface on top of it. You'll benefit from thousands of hours of work and QA on the part that keeps your versioned files safe and you'll end up with a interface that fits what you want.

--

Edit: See Jason Williams' answer, I don't know why but I've skipped over it when I read the answers at first and I'm stating a similar point.

lpfavreau