Make _ctx a Borg, and instantiate it where needed instead of passing it.
commitaa0a9c886273a28234919322b3ad6787df6828b3
authorkfogel <kfogel@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Thu, 8 Jul 2004 18:47:08 +0000 (8 18:47 +0000)
committerkfogel <kfogel@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Thu, 8 Jul 2004 18:47:08 +0000 (8 18:47 +0000)
tree5a42c58e31f5bd46519ac8008ed601ce625820bf
parent40b7c89c65c4485e0680436c54e8098c8d897e38
Make _ctx a Borg, and instantiate it where needed instead of passing it.

This is a preparatory change for fixing issue #34 (take --tmpdir option).

* cvs2svn.py
  (Log, Cleanup): Use '__shared_state' not '_shared_state'.  This is
    what the original Borg recipe recommends, and turns out to be
    slightly better for us, because we treat single-underscore
    variables specially in convert().  Of course, due to the fact that
    Python sticks "_<classname>" on the front of class variables
    anyway, we still have to adjust the conditional in convert(), but
    at least this way our own code is conceptually consistent with the
    single-underscore rule, even if Python itself can't be.
  (convert): Fix conditional as described above.
  (Ctx): New Borg class, replaces _ctx.  Initialize all attributes
    here, instead of in first instantiator.
  (main): Don't initialize Ctx here, just create its first instance.
  (SymbolicNameFillingGuide, CVSRevisionAggregator, CollectData,
  SVNRepositoryMirror, CVSRevisionDatabase, RepositoryDelegate,
  PersistenceManager, SymbolingsReader, SymbolingsLogger, SVNCommit,
  CVSCommit, DumpfileDelegate, pass1, pass2, pass3, pass4, pass5,
  pass6, pass7, pass8, convert, usage): Don't take a ctx arg, just
    instantiate a Ctx where needed.  All callers changed.
  (CVSRevision): Add note about ctx parameter to doc string.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@1247 be7e6eca-30d4-0310-a8e5-ac0d63af7087
cvs2svn.py