tests/test-match.py
author Jun Wu <quark@fb.com>
Sun, 27 Aug 2017 02:47:47 -0700
changeset 34008 9422107a6b64
parent 33582 44bc181b9835
child 38953 987d3a4b989f
permissions -rw-r--r--
rebase: move working parent and bookmark for obsoleted revs (BC) Previously, obsoleted revs with successors in destination are completely ignored. That caused some inconvenience when working copy is obsoleted. Most commands avoid working copy being obsoleted, but `hg pull` is an exception. This patch makes rebase able to move bookmarks or working parent for those obsoleted revs. It does so by keeping the obsoleted revs in `state` and marking them as "skipped, rebased to desired destination" during run-time. This reverts part of the behavior change of 3b7cb3d17137 and D24. Differential Revision: https://phab.mercurial-scm.org/D527

from __future__ import absolute_import

import unittest

import silenttestrunner

from mercurial import (
    match as matchmod,
)

class NeverMatcherTests(unittest.TestCase):

    def testVisitdir(self):
        m = matchmod.nevermatcher('', '')
        self.assertFalse(m.visitdir('.'))
        self.assertFalse(m.visitdir('dir'))

if __name__ == '__main__':
    silenttestrunner.main(__name__)