File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,15 @@ def from_line(cls, line):
8080 """:return: New RefLogEntry instance from the given revlog line.
8181 :param line: line without trailing newline
8282 :raise ValueError: If line could not be parsed"""
83- try :
84- info , msg = line .split ('\t ' , 2 )
85- except ValueError :
86- raise ValueError ("line is missing tab separator" )
87- # END handle first plit
83+ fields = line .split ('\t ' , 1 )
84+ if len (fields ) == 1 :
85+ info , msg = fields [0 ], None
86+ elif len (fields ) == 2 :
87+ info , msg = fields
88+ else :
89+ raise ValueError ("Line must have up to two TAB-separated fields."
90+ " Got %s" % repr (line ))
91+ # END handle first split
8892 oldhexsha = info [:40 ]
8993 newhexsha = info [41 :81 ]
9094 for hexsha in (oldhexsha , newhexsha ):
You can’t perform that action at this time.
0 commit comments