Архив — January 08, 2010

Mercurial codesmell extension / Georg Brandl

I know it’s bad behavior, but I’m simply too lazyto do a hg diff before commit, so quite often I committed debugging statements likeimport pdb; pdb.set_trace() or print foo, left in some module by accident.

Thankfully I’m using Mercurial for most projectsnow, so it was easy (and fun) to hack up a little extension to “fix” this.

The extension is called hgcodesmell and can be found, as always,on BitBucket. It currently asks youfor confirmation when it recognizes any of these smelly changes:

Read full entry at origin