hgext/convert/cvs.py
changeset 36132 42a393ea56d2
parent 35176 671aba341d90
child 36393 54f4328a07c2
equal deleted inserted replaced
36131:ce9f1c32810b 36132:42a393ea56d2
    44         self.changeset = None
    44         self.changeset = None
    45         self.files = {}
    45         self.files = {}
    46         self.tags = {}
    46         self.tags = {}
    47         self.lastbranch = {}
    47         self.lastbranch = {}
    48         self.socket = None
    48         self.socket = None
    49         self.cvsroot = open(os.path.join(cvs, "Root")).read()[:-1]
    49         self.cvsroot = open(os.path.join(cvs, "Root"), 'rb').read()[:-1]
    50         self.cvsrepo = open(os.path.join(cvs, "Repository")).read()[:-1]
    50         self.cvsrepo = open(os.path.join(cvs, "Repository"), 'rb').read()[:-1]
    51         self.encoding = encoding.encoding
    51         self.encoding = encoding.encoding
    52 
    52 
    53         self._connect()
    53         self._connect()
    54 
    54 
    55     def _parse(self):
    55     def _parse(self):
   139 
   139 
   140                 if not passw:
   140                 if not passw:
   141                     passw = "A"
   141                     passw = "A"
   142                     cvspass = os.path.expanduser("~/.cvspass")
   142                     cvspass = os.path.expanduser("~/.cvspass")
   143                     try:
   143                     try:
   144                         pf = open(cvspass)
   144                         pf = open(cvspass, 'rb')
   145                         for line in pf.read().splitlines():
   145                         for line in pf.read().splitlines():
   146                             part1, part2 = line.split(' ', 1)
   146                             part1, part2 = line.split(' ', 1)
   147                             # /1 :pserver:user@example.com:2401/cvsroot/foo
   147                             # /1 :pserver:user@example.com:2401/cvsroot/foo
   148                             # Ah<Z
   148                             # Ah<Z
   149                             if part1 == '/1':
   149                             if part1 == '/1':