Sunday, December 26, 2010

Another use for source control

I picked up on some code files I haven't looked at in a few weeks. Cross checking a few "Last Modified" dates against the "Received" and "Sent" dates in an email thread, I quickly realized that it was easier to just fire up a command line and punch in a few Mercurial commands to answer questions like:

Have I made any changes since I "saved" the last round of tweaks/fixes/etc.?

What files did the last round of changes hit? What did I say about them when I checked them in? (Does what I said then even make sense now?)

When did I do that?

When you live cheek-by-jowl with the same code-base week-in and week-out, the brain tends to make its own bookmarks and annotations. Or, at least my brain tends to do that. Longer lapses are a different matter, and that's one instance where such "by-product" data from the process of using source control comes in terribly handy at times. The trivial amount of time spent pushing (commented!) changesets to the repository for safe-keeping, in my opinion, more than pays for the lack of thrashing around when it's time to pick up where you left off.