hgext/convert/cvsps.py
changeset 51700 7f0cb9ee0534
parent 51690 493034cc3265
child 51703 ca7bde5dbafb
equal deleted inserted replaced
51699:bd1483fd7088 51700:7f0cb9ee0534
   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 
   642         # Check if log entry belongs to the current changeset or not.
   643         # Check if log entry belongs to the current changeset or not.
   643 
   644 
   644         # Since CVS is file-centric, two different file revisions with
   645         # Since CVS is file-centric, two different file revisions with
   645         # different branchpoints should be treated as belonging to two
   646         # different branchpoints should be treated as belonging to two
   646         # different changesets (and the ordering is important and not
   647         # different changesets (and the ordering is important and not
   980 
   981 
   981     off = len(revisions)
   982     off = len(revisions)
   982     branches = {}  # latest version number in each branch
   983     branches = {}  # latest version number in each branch
   983     ancestors = {}  # parent branch
   984     ancestors = {}  # parent branch
   984     for cs in changesets:
   985     for cs in changesets:
       
   986 
   985         if opts[b"ancestors"]:
   987         if opts[b"ancestors"]:
   986             if cs.branch not in branches and cs.parents and cs.parents[0].id:
   988             if cs.branch not in branches and cs.parents and cs.parents[0].id:
   987                 ancestors[cs.branch] = (
   989                 ancestors[cs.branch] = (
   988                     changesets[cs.parents[0].id - 1].branch,
   990                     changesets[cs.parents[0].id - 1].branch,
   989                     cs.parents[0].id,
   991                     cs.parents[0].id,