def testSimpleFork(self):
        with phlgitu_fixture.lone_worker_context() as worker:

            # pylint has faulty detection here
            # pylint: disable=not-callable
            worker.repo("branch", "fork")
            worker.commit_new_file("add ONLY_MASTER", "ONLY_MASTER")
            worker.repo("checkout", "fork")
            # pylint: enable=not-callable

            worker.commit_new_file("add ONLY_FORK", "ONLY_FORK")
            worker.commit_new_file("add ONLY_FORK2", "ONLY_FORK2")
            rawDiff = phlgit_diff.raw_diff_range_to_here(worker.repo, "master")
            rawDiff2 = phlgit_diff.raw_diff_range(worker.repo, "master",
                                                  "fork")
            rawDiff3 = phlgit_diff.raw_diff_range(worker.repo, "master",
                                                  "fork", 1000)
            self.assertEqual(
                set(["ONLY_FORK", "ONLY_FORK2"]),
                phlgit_diff.parse_filenames_from_raw_diff(rawDiff))
            self.assertEqual(
                set(["ONLY_FORK", "ONLY_FORK2"]),
                phlgit_diff.parse_filenames_from_raw_diff(rawDiff2))
            self.assertEqual(
                set(["ONLY_FORK", "ONLY_FORK2"]),
                phlgit_diff.parse_filenames_from_raw_diff(rawDiff3))
예제 #2
0
    def testSimpleFork(self):
        with phlgitu_fixture.lone_worker_context() as worker:

            # pylint has faulty detection here
            # pylint: disable=not-callable
            worker.repo("branch", "fork")
            worker.commit_new_file("add ONLY_MASTER", "ONLY_MASTER")
            worker.repo("checkout", "fork")
            # pylint: enable=not-callable

            worker.commit_new_file("add ONLY_FORK", "ONLY_FORK")
            worker.commit_new_file("add ONLY_FORK2", "ONLY_FORK2")
            rawDiff = phlgit_diff.raw_diff_range_to_here(
                worker.repo, "master")
            rawDiff2 = phlgit_diff.raw_diff_range(
                worker.repo, "master", "fork")
            rawDiff3 = phlgit_diff.raw_diff_range(
                worker.repo, "master", "fork", 1000)
            self.assertEqual(
                set(["ONLY_FORK", "ONLY_FORK2"]),
                phlgit_diff.parse_filenames_from_raw_diff(rawDiff))
            self.assertEqual(
                set(["ONLY_FORK", "ONLY_FORK2"]),
                phlgit_diff.parse_filenames_from_raw_diff(rawDiff2))
            self.assertEqual(
                set(["ONLY_FORK", "ONLY_FORK2"]),
                phlgit_diff.parse_filenames_from_raw_diff(rawDiff3))
예제 #3
0
 def testSimpleFork(self):
     self._createCommitNewFile("README")
     self.clone.call("branch", "fork")
     self._createCommitNewFile("ONLY_MASTER")
     self.clone.call("checkout", "fork")
     self._createCommitNewFile("ONLY_FORK")
     self._createCommitNewFile("ONLY_FORK2")
     rawDiff = phlgit_diff.raw_diff_range_to_here(self.clone, "master")
     rawDiff2 = phlgit_diff.raw_diff_range(self.clone, "master", "fork")
     rawDiff3 = phlgit_diff.raw_diff_range(
         self.clone, "master", "fork", 1000)
     self.assertEqual(
         set(["ONLY_FORK", "ONLY_FORK2"]),
         phlgit_diff.parse_filenames_from_raw_diff(rawDiff))
     self.assertEqual(
         set(["ONLY_FORK", "ONLY_FORK2"]),
         phlgit_diff.parse_filenames_from_raw_diff(rawDiff2))
     self.assertEqual(
         set(["ONLY_FORK", "ONLY_FORK2"]),
         phlgit_diff.parse_filenames_from_raw_diff(rawDiff3))