Ejemplo n.º 1
0
            "This test script has already been run.  Please call this script with --cleanup to start again"
        )

    os.mkdir(DIR)
    g = GittyupClient()
    g.initialize_repository(DIR)

    touch(DIR + "/test1.txt")
    touch(DIR + "/test2.txt")

    g.stage([DIR + "/test1.txt", DIR + "/test2.txt"])
    g.commit("This is a commit")

    # Create a new branch, don't track it
    g.branch("branch1")
    assert "branch1" in [x['name'] for x in g.branch_list()]

    # Make sure we are still tracking master
    assert (g.is_tracking("refs/heads/master"))

    # Track branch1
    g.track("refs/heads/branch1")
    assert (g.is_tracking("refs/heads/branch1"))

    # Rename branch1 to branch1b
    g.branch_rename("branch1", "branch1b")
    assert "branch1b" in [x['name'] for x in g.branch_list()]

    # Make sure we are now tracking branch1b
    assert (g.is_tracking("refs/heads/branch1b"))
Ejemplo n.º 2
0
            "This test script has already been run.  Please call this script with --cleanup to start again"
        )

    os.mkdir(DIR)
    g = GittyupClient()
    g.initialize_repository(DIR)

    touch(DIR + "/test1.txt")
    touch(DIR + "/test2.txt")

    g.stage([DIR + "/test1.txt", DIR + "/test2.txt"])
    g.commit("This is a commit")

    # Create a new branch, don't track it
    g.branch("branch1")
    assert ("branch1" in g.branch_list())

    # Make sure we are still tracking master
    assert (g.is_tracking("refs/heads/master"))

    # Track branch1
    g.track("refs/heads/branch1")
    assert (g.is_tracking("refs/heads/branch1"))

    # Rename branch1 to branch1b
    g.branch_rename("branch1", "branch1b")
    assert ("branch1b" in g.branch_list())

    # Make sure we are now tracking branch1b
    assert (g.is_tracking("refs/heads/branch1b"))
Ejemplo n.º 3
0
    if os.path.isdir(DIR):
        raise SystemExit("This test script has already been run.  Please call this script with --cleanup to start again")

    os.mkdir(DIR)
    g = GittyupClient()
    g.initialize_repository(DIR)
    
    touch(DIR + "/test1.txt")
    touch(DIR + "/test2.txt")
    
    g.stage([DIR+"/test1.txt", DIR+"/test2.txt"])
    g.commit("This is a commit")

    # Create a new branch, don't track it
    g.branch("branch1")
    assert "branch1" in [x['name'] for x in g.branch_list()]

    # Make sure we are still tracking master
    assert (g.is_tracking("refs/heads/master"))

    # Track branch1
    g.track("refs/heads/branch1")
    assert (g.is_tracking("refs/heads/branch1"))
    
    # Rename branch1 to branch1b
    g.branch_rename("branch1", "branch1b")
    assert "branch1b" in [x['name'] for x in g.branch_list()]

    # Make sure we are now tracking branch1b
    assert (g.is_tracking("refs/heads/branch1b"))
    
Ejemplo n.º 4
0
    if os.path.isdir(DIR):
        raise SystemExit("This test script has already been run.  Please call this script with --cleanup to start again")

    os.mkdir(DIR)
    g = GittyupClient()
    g.initialize_repository(DIR)
    
    touch(DIR + "/test1.txt")
    touch(DIR + "/test2.txt")
    
    g.stage([DIR+"/test1.txt", DIR+"/test2.txt"])
    g.commit("This is a commit")

    # Create a new branch, don't track it
    g.branch("branch1")
    assert ("branch1" in g.branch_list())

    # Make sure we are still tracking master
    assert (g.is_tracking("refs/heads/master"))

    # Track branch1
    g.track("refs/heads/branch1")
    assert (g.is_tracking("refs/heads/branch1"))
    
    # Rename branch1 to branch1b
    g.branch_rename("branch1", "branch1b")
    assert ("branch1b" in g.branch_list())

    # Make sure we are now tracking branch1b
    assert (g.is_tracking("refs/heads/branch1b"))