De-Borg-ify StatsKeeper. StatsKeeper is only needed by a fairly localized
commit5c783736401c0caffd1aff811601ccc25000206f
authormaxb <maxb@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Sat, 20 May 2006 18:48:23 +0000 (20 18:48 +0000)
committermaxb <maxb@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Sat, 20 May 2006 18:48:23 +0000 (20 18:48 +0000)
tree5de20828383d66f45b2fafbdd82fceeccfc9e2d0
parent3883ad8255b56b75b09fa6cda885d9611a38e3df
De-Borg-ify StatsKeeper.  StatsKeeper is only needed by a fairly localized
portion of code, so being a Borg doesn't confer a major advantage.
Additionally, the Borg characteristic of lazy initialization could be a
potential problem, since StatsKeeper requires artifact registration to have
occurred before its first use - which is far easier to verify with explicit,
rather than lazy evaluation.

* cvs2svn_lib/passes.py
  (Pass.run): Add stats_keeper argument.  Propagate to all derived classes,
    and refer to argument value instead of Borg as required.
* cvs2svn_lib/pass_manager.py (PassManager.run):
    Instantiate a StatsKeeper. Pass it to pass.run() methods.
* cvs2svn_lib/collect_data.py
  (CollectData.__init__): Store reference to StatsKeeper.
  (CollectData.add_cvs_revision):
    Access via member variable, rather than via Borg.
* cvs2svn_lib/stats_keeper.py (StatsKeeper): Remove Borg-ification.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@2126 be7e6eca-30d4-0310-a8e5-ac0d63af7087
cvs2svn_lib/collect_data.py
cvs2svn_lib/pass_manager.py
cvs2svn_lib/passes.py
cvs2svn_lib/stats_keeper.py