mercurial/treediscovery.py
changeset 14199 e3dd3dcd6059
parent 14164 cb98fed52495
child 14698 df902fe3d79e
equal deleted inserted replaced
14198:8f11fd321014 14199:e3dd3dcd6059
    31 
    31 
    32     if repo.changelog.tip() == nullid:
    32     if repo.changelog.tip() == nullid:
    33         base.add(nullid)
    33         base.add(nullid)
    34         if heads != [nullid]:
    34         if heads != [nullid]:
    35             return [nullid], [nullid], list(heads)
    35             return [nullid], [nullid], list(heads)
    36         return [nullid], [], []
    36         return [nullid], [], heads
    37 
    37 
    38     # assume we're closer to the tip than the root
    38     # assume we're closer to the tip than the root
    39     # and start by examining the heads
    39     # and start by examining the heads
    40     repo.ui.status(_("searching for changes\n"))
    40     repo.ui.status(_("searching for changes\n"))
    41 
    41 
    44         if h not in m:
    44         if h not in m:
    45             unknown.append(h)
    45             unknown.append(h)
    46         else:
    46         else:
    47             base.add(h)
    47             base.add(h)
    48 
    48 
       
    49     if not unknown:
       
    50         return list(base), [], list(heads)
       
    51 
    49     heads = unknown
    52     heads = unknown
    50     if not unknown:
       
    51         return list(base), [], []
       
    52 
       
    53     req = set(unknown)
    53     req = set(unknown)
    54     reqcnt = 0
    54     reqcnt = 0
    55 
    55 
    56     # search through remote branches
    56     # search through remote branches
    57     # a 'branch' here is a linear segment of history, with four parts:
    57     # a 'branch' here is a linear segment of history, with four parts: