Access the rcsparse code via a new interface module, rcsparser.
[cvs2svn.git] / cvs2svn_lib / rcsparser.py
blob257383dafaf471bca8a58aac0906daea30585c3f
1 # (Be in -*- python -*- mode.)
3 # ====================================================================
4 # Copyright (c) 2011 CollabNet. All rights reserved.
6 # This software is licensed as described in the file COPYING, which
7 # you should have received as part of this distribution. The terms
8 # are also available at http://subversion.tigris.org/license-1.html.
9 # If newer versions of this license are posted there, you may use a
10 # newer version instead, at your option.
12 # This software consists of voluntary contributions made by many
13 # individuals. For exact contribution history, see the revision
14 # history and logs, available at http://cvs2svn.tigris.org/.
15 # ====================================================================
17 """The interface between cvs2svn and cvs2svn_rcsparse."""
20 from cvs2svn_rcsparse.common import Sink
21 from cvs2svn_rcsparse.common import RCSParseError
23 try:
24 from cvs2svn_rcsparse.texttools import Parser
25 except ImportError:
26 from cvs2svn_rcsparse.default import Parser
29 def parse(file, sink):
30 """Parse an RCS file.
32 The arguments are the same as those of
33 cvs2svn_rcsparse.common._Parser.parse() (see that method's docstring
34 for more details).
35 """
36 return Parser().parse(file, sink)