mercurial/localrepo.py
changeset 21425 242637139efb
parent 21399 3b6b1b407e99
child 21465 2edb8648c500
equal deleted inserted replaced
21424:d13b4ecdb680 21425:242637139efb
  1521             return mf
  1521             return mf
  1522 
  1522 
  1523         ctx1 = self[node1]
  1523         ctx1 = self[node1]
  1524         ctx2 = self[node2]
  1524         ctx2 = self[node2]
  1525 
  1525 
       
  1526         # This next code block is, admittedly, fragile logic that tests for
       
  1527         # reversing the contexts and wouldn't need to exist if it weren't for
       
  1528         # the fast (and common) code path of comparing the working directory
       
  1529         # with its first parent.
       
  1530         #
       
  1531         # What we're aiming for here is the ability to call:
       
  1532         #
       
  1533         # workingctx.status(parentctx)
       
  1534         #
       
  1535         # If we always built the manifest for each context and compared those,
       
  1536         # then we'd be done. But the special case of the above call means we
       
  1537         # just copy the manifest of the parent.
       
  1538         reversed = False
       
  1539         if (not isinstance(ctx1, context.changectx)
       
  1540             and isinstance(ctx2, context.changectx)):
       
  1541             reversed = True
       
  1542             ctx1, ctx2 = ctx2, ctx1
       
  1543 
  1526         working = ctx2.rev() is None
  1544         working = ctx2.rev() is None
  1527         parentworking = working and ctx1 == self['.']
  1545         parentworking = working and ctx1 == self['.']
  1528         match = match or matchmod.always(self.root, self.getcwd())
  1546         match = match or matchmod.always(self.root, self.getcwd())
  1529         listignored, listclean, listunknown = ignored, clean, unknown
  1547         listignored, listclean, listunknown = ignored, clean, unknown
  1530 
  1548 
  1578                     added.append(fn)
  1596                     added.append(fn)
  1579             removed = mf1.keys()
  1597             removed = mf1.keys()
  1580 
  1598 
  1581         if working:
  1599         if working:
  1582             modified = ctx2._filtersuspectsymlink(modified)
  1600             modified = ctx2._filtersuspectsymlink(modified)
       
  1601 
       
  1602         if reversed:
       
  1603             added, removed = removed, added
  1583 
  1604 
  1584         r = modified, added, removed, deleted, unknown, ignored, clean
  1605         r = modified, added, removed, deleted, unknown, ignored, clean
  1585 
  1606 
  1586         if listsubrepos:
  1607         if listsubrepos:
  1587             for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
  1608             for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):