def setUp(self):
        AbstractSCMTest.setUp(self)
        remote_path = os.path.join(self.test_root_path, "remote")
        os.makedirs(remote_path)

        # create a "remote" repo
        subprocess.check_call(["bzr", "init"], cwd=remote_path)
        subprocess.check_call(["touch", "test.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "add", "test.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "commit", "-m", "modified"],
                              cwd=remote_path)
        self.version_init = "1"
        subprocess.check_call(["bzr", "tag", "footag"], cwd=remote_path)
        subprocess.check_call(["touch", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "add", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "commit", "-m", "modified"],
                              cwd=remote_path)
        self.version_end = "2"

        # rosinstall the remote repo and fake ros
        _add_to_file(
            os.path.join(self.local_path, ".rosinstall"),
            "- other: {local-name: ../ros}\n- bzr: {local-name: clone, uri: ../remote}"
        )

        cmd = ["rosws", "update"]
        os.chdir(self.local_path)
        sys.stdout = output = StringIO()
        rosws_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
    def setUp(self):
        AbstractSCMTest.setUp(self)
        remote_path = os.path.join(self.test_root_path, "remote")
        os.makedirs(remote_path)

        # create a "remote" repo
        subprocess.check_call(["hg", "init"], cwd=remote_path)
        subprocess.check_call(["touch", "test.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "add", "test.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "commit", "-m", "modified"], cwd=remote_path)
        po = subprocess.Popen(["hg", "log", "--template", "'{node|short}'", "-l1"], cwd=remote_path, stdout=subprocess.PIPE)
        self.version_init = po.stdout.read().decode('UTF-8').rstrip("'").lstrip("'")
        subprocess.check_call(["hg", "tag", "footag"], cwd=remote_path)
        subprocess.check_call(["touch", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "add", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "commit", "-m", "modified"], cwd=remote_path)
        po = subprocess.Popen(["hg", "log", "--template", "'{node|short}'", "-l1"], cwd=remote_path, stdout=subprocess.PIPE)
        self.version_end = po.stdout.read().decode('UTF-8').rstrip("'").lstrip("'")

        # rosinstall the remote repo and fake ros
        _add_to_file(os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- hg: {local-name: clone, uri: ../remote}")

        cmd = ["rosws", "update"]
        os.chdir(self.local_path)
        sys.stdout = output = StringIO()
        rosws_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
    def setUp(self):
        AbstractSCMTest.setUp(self)
        remote_path = os.path.join(self.test_root_path, "remote")
        os.makedirs(remote_path)

        # create a "remote" repo
        subprocess.check_call(["bzr", "init"], cwd=remote_path)
        subprocess.check_call(["touch", "test.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "add", "test.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "commit", "-m", "modified"], cwd=remote_path)
        self.version_init = "1"
        subprocess.check_call(["bzr", "tag", "footag"], cwd=remote_path)
        subprocess.check_call(["touch", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "add", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["bzr", "commit", "-m", "modified"], cwd=remote_path)
        self.version_end = "2"

        # rosinstall the remote repo and fake ros
        _add_to_file(os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- bzr: {local-name: clone, uri: ../remote}")

        cmd = ["rosws", "update"]
        os.chdir(self.local_path)
        sys.stdout = output = StringIO()
        rosws_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
    def setUp(self):
        AbstractSCMTest.setUp(self)
        remote_path = os.path.join(self.test_root_path, "remote")
        filler_path = os.path.join(self.test_root_path, "filler")
        self.svn_uri = "file://localhost" + remote_path

        # create a "remote" repo
        subprocess.check_call(["svnadmin", "create", remote_path], cwd=self.test_root_path)
        subprocess.check_call(["svn", "checkout", self.svn_uri, filler_path], cwd=self.test_root_path)
        subprocess.check_call(["touch", "test.txt"], cwd=filler_path)
        subprocess.check_call(["svn", "add", "test.txt"], cwd=filler_path)
        subprocess.check_call(["svn", "commit", "-m", "modified"], cwd=filler_path)
        subprocess.check_call(["touch", "test2.txt"], cwd=filler_path)
        subprocess.check_call(["svn", "add", "test2.txt"], cwd=filler_path)
        subprocess.check_call(["svn", "commit", "-m", "modified"], cwd=filler_path)

        self.version_init = "-r1"
        self.version_end = "-r2"

        # wstool the remote repo and fake ros
        _add_to_file(os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- svn: {local-name: clone, uri: '" + self.svn_uri + "'}")

        cmd = ["wstool", "update"]
        os.chdir(self.local_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
    def setUp(self):
        AbstractSCMTest.setUp(self)
        remote_path = os.path.join(self.test_root_path, "remote")
        os.makedirs(remote_path)

        # create a "remote" repo
        subprocess.check_call(["git", "init"], cwd=remote_path)
        subprocess.check_call(["touch", "test.txt"], cwd=remote_path)
        subprocess.check_call(["git", "add", "*"], cwd=remote_path)
        subprocess.check_call(["git", "commit", "-m", "modified"], cwd=remote_path)
        po = subprocess.Popen(["git", "log", "-n", "1", "--pretty=format:\"%H\""], cwd=remote_path, stdout=subprocess.PIPE)
        self.version_init = po.stdout.read().decode('UTF-8').rstrip('"').lstrip('"')[0:12]
        subprocess.check_call(["git", "tag", "footag"], cwd=remote_path)
        subprocess.check_call(["touch", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["git", "add", "*"], cwd=remote_path)
        subprocess.check_call(["git", "commit", "-m", "modified"], cwd=remote_path)
        po = subprocess.Popen(["git", "log", "-n", "1", "--pretty=format:\"%H\""], cwd=remote_path, stdout=subprocess.PIPE)
        self.version_end = po.stdout.read().decode('UTF-8').rstrip('"').lstrip('"')[0:12]

        # wstool the remote repo and fake ros
        _add_to_file(os.path.join(self.local_path, ".rosinstall"), "- other: {local-name: ../ros}\n- git: {local-name: clone, uri: ../remote}")

        cmd = ["wstool", "update"]
        os.chdir(self.local_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
    def setUp(self):
        AbstractSCMTest.setUp(self)
        self.remote_path = os.path.join(self.test_root_path, "remote")
        os.makedirs(self.remote_path)

        # create a "remote" repo
        subprocess.check_call(["git", "init"], cwd=self.remote_path)
        subprocess.check_call(["touch", "test.txt"], cwd=self.remote_path)
        subprocess.check_call(["git", "add", "*"], cwd=self.remote_path)
        subprocess.check_call(["git", "commit", "-m", "modified"],
                              cwd=self.remote_path)
        po = subprocess.Popen(
            ["git", "log", "-n", "1", "--pretty=format:\"%H\""],
            cwd=self.remote_path,
            stdout=subprocess.PIPE)
        self.version_init = po.stdout.read().decode('UTF-8').rstrip(
            '"').lstrip('"')[0:12]
        subprocess.check_call(["git", "tag", "footag"], cwd=self.remote_path)
        subprocess.check_call(["touch", "test2.txt"], cwd=self.remote_path)
        subprocess.check_call(["git", "add", "*"], cwd=self.remote_path)
        subprocess.check_call(["git", "commit", "-m", "modified"],
                              cwd=self.remote_path)
        po = subprocess.Popen(
            ["git", "log", "-n", "1", "--pretty=format:\"%H\""],
            cwd=self.remote_path,
            stdout=subprocess.PIPE)
        self.version_end = po.stdout.read().decode('UTF-8').rstrip('"').lstrip(
            '"')[0:12]

        # wstool the remote repo and fake ros
        _add_to_file(
            os.path.join(self.local_path, ".rosinstall"),
            "- other: {local-name: ../ros}\n- git: {local-name: clone, uri: ../remote}"
        )
        self.clone_path = os.path.join(self.local_path, "clone")

        cmd = ["wstool", "update"]
        os.chdir(self.local_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
    def setUp(self):
        AbstractSCMTest.setUp(self)
        remote_path = os.path.join(self.test_root_path, "remote")
        os.makedirs(remote_path)

        # create a "remote" repo
        subprocess.check_call(["hg", "init"], cwd=remote_path)
        subprocess.check_call(["touch", "test.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "add", "test.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "commit", "-m", "modified"],
                              cwd=remote_path)
        po = subprocess.Popen(
            ["hg", "log", "--template", "'{node|short}'", "-l1"],
            cwd=remote_path,
            stdout=subprocess.PIPE)
        self.version_init = po.stdout.read().decode('UTF-8').rstrip(
            "'").lstrip("'")
        subprocess.check_call(["hg", "tag", "footag"], cwd=remote_path)
        subprocess.check_call(["touch", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "add", "test2.txt"], cwd=remote_path)
        subprocess.check_call(["hg", "commit", "-m", "modified"],
                              cwd=remote_path)
        po = subprocess.Popen(
            ["hg", "log", "--template", "'{node|short}'", "-l1"],
            cwd=remote_path,
            stdout=subprocess.PIPE)
        self.version_end = po.stdout.read().decode('UTF-8').rstrip("'").lstrip(
            "'")

        # wstool the remote repo and fake ros
        _add_to_file(
            os.path.join(self.local_path, ".rosinstall"),
            "- other: {local-name: ../ros}\n- hg: {local-name: clone, uri: ../remote}"
        )

        cmd = ["wstool", "update"]
        os.chdir(self.local_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__