comparison hgext/convert/cvsps.py @ 51690:493034cc3265

black: format the codebase with 23.3.0 The CI has moved to 23.3.0, which is the last version that supports 3.7 at runtime, so we should honor this change. # skip-blame mass-reformating only
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 18 Jul 2024 12:36:12 +0200
parents 1eab9e40c0c8
children 7f0cb9ee0534
comparison
equal deleted inserted replaced
51689:39e2b2d062c1 51690:493034cc3265
637 637
638 changesets = [] 638 changesets = []
639 files = set() 639 files = set()
640 c = None 640 c = None
641 for i, e in enumerate(log): 641 for i, e in enumerate(log):
642
643 # Check if log entry belongs to the current changeset or not. 642 # Check if log entry belongs to the current changeset or not.
644 643
645 # Since CVS is file-centric, two different file revisions with 644 # Since CVS is file-centric, two different file revisions with
646 # different branchpoints should be treated as belonging to two 645 # different branchpoints should be treated as belonging to two
647 # different changesets (and the ordering is important and not 646 # different changesets (and the ordering is important and not
981 980
982 off = len(revisions) 981 off = len(revisions)
983 branches = {} # latest version number in each branch 982 branches = {} # latest version number in each branch
984 ancestors = {} # parent branch 983 ancestors = {} # parent branch
985 for cs in changesets: 984 for cs in changesets:
986
987 if opts[b"ancestors"]: 985 if opts[b"ancestors"]:
988 if cs.branch not in branches and cs.parents and cs.parents[0].id: 986 if cs.branch not in branches and cs.parents and cs.parents[0].id:
989 ancestors[cs.branch] = ( 987 ancestors[cs.branch] = (
990 changesets[cs.parents[0].id - 1].branch, 988 changesets[cs.parents[0].id - 1].branch,
991 cs.parents[0].id, 989 cs.parents[0].id,