comparison mercurial/localrepo.py @ 21588:4944c488f738

localrepo: use new subrev method of context.py With the machinery in place, we use context.subrev instead of testing for a workingctx directly. This allows more flexibility for later patches that will add memctx to the mix.
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 20 Sep 2013 21:59:34 -0500
parents 6adfc311eee8
children 660ef8ca8c3c
comparison
equal deleted inserted replaced
21587:02a8612ddec2 21588:4944c488f738
1554 # back added files (r[1]) and removed files (r[2]) 1554 # back added files (r[1]) and removed files (r[2])
1555 r[1], r[2] = r[2], r[1] 1555 r[1], r[2] = r[2], r[1]
1556 1556
1557 if listsubrepos: 1557 if listsubrepos:
1558 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2): 1558 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
1559 if working: 1559 rev2 = ctx2.subrev(subpath)
1560 rev2 = None
1561 else:
1562 rev2 = ctx2.substate[subpath][1]
1563 try: 1560 try:
1564 submatch = matchmod.narrowmatcher(subpath, match) 1561 submatch = matchmod.narrowmatcher(subpath, match)
1565 s = sub.status(rev2, match=submatch, ignored=listignored, 1562 s = sub.status(rev2, match=submatch, ignored=listignored,
1566 clean=listclean, unknown=listunknown, 1563 clean=listclean, unknown=listunknown,
1567 listsubrepos=True) 1564 listsubrepos=True)