Live data from Hacker News

Ask HN: Do you ever truly use your revision history?

news.ycombinator.com

201–210 of 287 posts

Re: Ask HN: Do you ever truly use your revision history?

#201

At my current company they place a huge value on that history, so much so that they haven't transitioned from SVN to git solely because of the logistical challenge of migrating 30 years of commits. You can convert a repo from SVN to Git with history intact! There's a tool called cvs2svn that I have used to upgrade really old CVS projects to git (it can do git too), and there is also an svn2git. And, I believe there i…

This is the best answer, but even if you didnt want to go through this trouble... just create a new repo in git, lock down svn and assume from that day on, if you need to see older history, go look in svn. Over time the need to look at svn for history will dwindle.

Re: Ask HN: Do you ever truly use your revision history?

#202
Git annotate is a fantastic tool, even if the developers aren't great contributors.

A lot of developers do not write good statements. They don't even link to a ticket. But you get to know those developers real quick when you're doing spelunking using annotate. And developers who don't write good commits probably didn't leave any other documentation behind of use.

I've used this to illuminate "technical debt" from a different perspective. If you take a critical code path, find the important commits for critical logic, and then just show the "context" you're left with, you'll often be able to say "this is why your quality sucks" in a real concrete way.

Managers love proof, and showing them what little context you have for critical areas can be a very different way of looking at the quality of their systems. Otherwise, I've often seen a LOT of overconfidence largely because "we have automation in place".

Re: Ask HN: Do you ever truly use your revision history?

#204
Yes, responding to the title. In particular in my rich web application if I am in the process of merging & deploying the branch to the production environment, sometimes the automated tests fail and I use a bisect to narrow down the offending commit. Having good commit messages in general helps with debugging in this scenario.

I’m surprised you haven’t found excellent tools to migrate from SVN to Git, considering how popular these VCS systems are.

I once worked in a company whose source tree originally predated version control. There I found an entire module that appeared to be dead code and I wanted to determine how it became dead. I did a bisect and landed on an 8 year commit that was the very first commit in the version-controlled tree. Yikes. So I guess I’ll never know how that module became dead.

Re: Ask HN: Do you ever truly use your revision history?

#206

Hell yes, I use it daily. I'm in AAA gamedev and the codebase I deal with goes back 20+ years. The last 10 years are readily accessible in Perforce and the rest can be found in another version control system. I am forever grateful to past engineers for outlining WHY they made their changes, and not WHAT the changes were per se. With thousands of engineers that have come and gone, this is incredibly useful information…

> I'm in AAA gamedev and the codebase I deal with goes back 20+ years. I'm curious what parts you work on (engine/tooling?). I've always had the impression that games usually have more throwaway code than other types of applications.

Well, the Unreal Engine is 22 years old. I doubt the current incarnation is free of legacy code.

Re: Ask HN: Do you ever truly use your revision history?

#207
Unequivocally yes.

I switched companies (FANG) to my family software company and the company had been using Microsoft Visual SourceSafe. The company was only casually using it, as one computer was used to compile customer executables (and fix compile-time linker errors) and was often times never checked into VSS. Needless to say, no one on the SWE side knew if any code actually worked or when anyone did anything.

Part of this was lack of management, part of this was inadequate tools. After I joined and learned about the horrors of VSS, I switched our company immediately to git (there was some initial resistance). While there was around 10-20 years of VSS commit history to migrate over, having git blame immediately in VisualStudio and any git client makes a world of difference. While legacy code can’t be cleaned up immediately, the team’s mindset has changed so that there’s no more commented out code (“in case I need it later”), no more new duplicate implementations of the same business logic, and a person to blame for software bugs :)

Re: Ask HN: Do you ever truly use your revision history?

#208
It’s not every day but it’s extremely useful when you need it. I’ve used that history to find context for when someone made an otherwise unexplained change - tickets; names of people, projects or departments; the commits immediately before or after; etc. can all be really handy for learning why something works a specific way. (“Why are we pinned on this ancient version? Oh, that server was decommissioned years ago - we can drop it “)

In your specific example, git-svn works really well for maintaining that history including authorship. I have a few projects which predate Git existing and it’s been quite usable for history. You can’t direct link to a commit ID but Git searches are very fast (we’re not on 20 year old hardware) and you shouldn’t be doing this many times a day.

Re: Ask HN: Do you ever truly use your revision history?

#210
It only took a day (actually a few partial days) to make a script that could migrate projects from CVS to Git. The importer we used kept all the comment history and even converted multiple commits at the same time with the same comment into multi-file commits. So no need to go looking through the old VCS for the old stuff.
Post reply on HN