Get feedback for long Mercurial operations
Staring at a quiet terminal prompt, seemingly hung for hours, isn't the most enjoyable dev experience in the world. It's unfortunately the terrible fate of any intrepid noob enthousiast waiting to cut their teeth on the Mozilla central codebase for the first time.
Bring me the sauce!
The first step of the Firefox DevTools hacking guide is quite explanatory. In order to play with the code, you obviously need a fresh local copy on your workstation.
Mozilla's projects use Mercurial as VCS, so it's as simple as running a dumb
hg clone, isn't it? Well, yes and no, considering this enormous repository stats : 162200 changesets with 914928 changes to 145789 files - 2.3G of tasty bits on the fx-team branch nowadays (Jan 2014).
HG, the Clone Wars
As usual, the problem lays in the details. Coming from git, the output of the clone command is not really verbose. Something is definitely happening in the background according to rare hints about manifests and files checking. My initial goal was to hack the Firefox's Net Monitor Tool and I ended up watching my Linux box's one to be sure the source was actually downloading at the expected speed... How meta is that?
Progress bars are not eye candies
The answer is burried in the Mercurial Installation page. The
progress extension needs to be explicitely declared in your
~/.hgrc file to activate the verbose mode of the cloning. Funny enough, I was also in the past confronted to a similar issue in an unrelated project.
Even with our power machines, not everything is blazing fast yet, visual indicators are still needed for good UX. Great, not let's type some code!