mercurial/ancestor.py
changeset 32291 bd872f64a8ba
parent 31476 413b44003462
child 38595 f8b46245b26a
equal deleted inserted replaced
32290:2959c3e986e0 32291:bd872f64a8ba
    45             if sv == allseen:
    45             if sv == allseen:
    46                 gca.add(v)
    46                 gca.add(v)
    47                 sv |= poison
    47                 sv |= poison
    48                 if v in nodes:
    48                 if v in nodes:
    49                     # history is linear
    49                     # history is linear
    50                     return set([v])
    50                     return {v}
    51         if sv < poison:
    51         if sv < poison:
    52             for p in pfunc(v):
    52             for p in pfunc(v):
    53                 sp = seen[p]
    53                 sp = seen[p]
    54                 if p == nullrev:
    54                 if p == nullrev:
    55                     continue
    55                     continue
   149             self.bases.add(nullrev)
   149             self.bases.add(nullrev)
   150         self.pfunc = pfunc
   150         self.pfunc = pfunc
   151 
   151 
   152     def hasbases(self):
   152     def hasbases(self):
   153         '''whether the common set has any non-trivial bases'''
   153         '''whether the common set has any non-trivial bases'''
   154         return self.bases and self.bases != set([nullrev])
   154         return self.bases and self.bases != {nullrev}
   155 
   155 
   156     def addbases(self, newbases):
   156     def addbases(self, newbases):
   157         '''grow the ancestor set by adding new bases'''
   157         '''grow the ancestor set by adding new bases'''
   158         self.bases.update(newbases)
   158         self.bases.update(newbases)
   159 
   159