Show More
@@ -748,7 +748,7 b' class HistorySavingThread(threading.Thread):' | |||||
748 | # To match, e.g. ~5/8-~2/3 |
|
748 | # To match, e.g. ~5/8-~2/3 | |
749 | range_re = re.compile(r""" |
|
749 | range_re = re.compile(r""" | |
750 | ((?P<startsess>~?\d+)/)? |
|
750 | ((?P<startsess>~?\d+)/)? | |
751 | (?P<start>\d+) # Only the start line num is compulsory |
|
751 | (?P<start>\d+)? | |
752 | ((?P<sep>[\-:]) |
|
752 | ((?P<sep>[\-:]) | |
753 | ((?P<endsess>~?\d+)/)? |
|
753 | ((?P<endsess>~?\d+)/)? | |
754 | (?P<end>\d+))? |
|
754 | (?P<end>\d+))? | |
@@ -767,9 +767,18 b' def extract_hist_ranges(ranges_str):' | |||||
767 | rmatch = range_re.match(range_str) |
|
767 | rmatch = range_re.match(range_str) | |
768 | if not rmatch: |
|
768 | if not rmatch: | |
769 | continue |
|
769 | continue | |
770 |
start = |
|
770 | start = rmatch.group("start") | |
771 | end = rmatch.group("end") |
|
771 | if start: | |
772 | end = int(end) if end else start+1 # If no end specified, get (a, a+1) |
|
772 | start = int(start) | |
|
773 | end = rmatch.group("end") | |||
|
774 | # If no end specified, get (a, a + 1) | |||
|
775 | end = int(end) if end else start + 1 | |||
|
776 | else: # start not specified | |||
|
777 | if not rmatch.group('startsess'): # no startsess | |||
|
778 | continue | |||
|
779 | start = 1 | |||
|
780 | end = None # provide the entire session hist | |||
|
781 | ||||
773 | if rmatch.group("sep") == "-": # 1-3 == 1:4 --> [1, 2, 3] |
|
782 | if rmatch.group("sep") == "-": # 1-3 == 1:4 --> [1, 2, 3] | |
774 | end += 1 |
|
783 | end += 1 | |
775 | startsess = rmatch.group("startsess") or "0" |
|
784 | startsess = rmatch.group("startsess") or "0" |
General Comments 0
You need to be logged in to leave comments.
Login now