6f21ea60784ef511cbce116f5c758c4d44376e54,tests/python/twitter/pants/scm/test_git.py,GitTest,setUpClass,#Any#,80
Before Change
cls.readme_file = os.path.join(cls.worktree, "README")
with environment_as(GIT_DIR=cls.gitdir, GIT_WORK_TREE=cls.worktree):
cls.init_repo("depot", cls.origin)
touch(cls.readme_file)
subprocess.check_call(["git", "add", "README"])
subprocess.check_call(["git", "commit", "-am", "initial commit."])
subprocess.check_call(["git", "tag", "-a", "-m", "first tag", "first"])
subprocess.check_call(["git", "push", "--tags", "depot", "master"])
subprocess.check_call(["git", "branch", "--set-upstream", "master", "depot/master"])
with safe_open(cls.readme_file, "w") as readme:
readme.write("Hello World.")
subprocess.check_call(["git", "commit", "-am", "Update README."])
cls.clone2 = safe_mkdtemp()
with pushd(cls.clone2):
cls.init_repo("origin", cls.origin)
subprocess.check_call(["git", "pull", "--tags", "origin", "master:master"])
with safe_open(os.path.realpath("README"), "a") as readme:
readme.write("--")
After Change
class GitTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.origin = safe_mkdtemp()
with pushd(cls.origin):
subprocess.check_call(["git", "init", "--bare"])
cls.gitdir = safe_mkdtemp()
cls.worktree = safe_mkdtemp()
cls.readme_file = os.path.join(cls.worktree, "README")
with environment_as(GIT_DIR=cls.gitdir, GIT_WORK_TREE=cls.worktree):
subprocess.check_call(["git", "init"])
subprocess.check_call(["git", "remote", "add", "depot", cls.origin])
touch(cls.readme_file)
subprocess.check_call(["git", "add", "README"])
subprocess.check_call(["git", "commit", "-am", "initial commit."])
subprocess.check_call(["git", "tag", "-a", "-m", "first tag", "first"])
subprocess.check_call(["git", "push", "--tags", "depot", "master"])
with safe_open(cls.readme_file, "w") as readme:
readme.write("Hello World.")
subprocess.check_call(["git", "commit", "-am", "Update README."])
cls.clone2 = safe_mkdtemp()
with pushd(cls.clone2):
subprocess.check_call(["git", "init"])
subprocess.check_call(["git", "remote", "add", "origin", cls.origin])
subprocess.check_call(["git", "pull", "--tags", "origin", "master:master"])
with safe_open(os.path.realpath("README"), "a") as readme:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 9
Instances
Project Name: pantsbuild/pants
Commit Name: 6f21ea60784ef511cbce116f5c758c4d44376e54
Time: 2013-05-13
Author: benjyw@gmail.com
File Name: tests/python/twitter/pants/scm/test_git.py
Class Name: GitTest
Method Name: setUpClass
Project Name: pantsbuild/pants
Commit Name: 404f8e0c07f11d9d219c06d25c33e280cd88c058
Time: 2013-05-10
Author: john.sirois@gmail.com
File Name: tests/python/twitter/pants/scm/test_git.py
Class Name: GitTest
Method Name: setUpClass
Project Name: pantsbuild/pants
Commit Name: 6f21ea60784ef511cbce116f5c758c4d44376e54
Time: 2013-05-13
Author: benjyw@gmail.com
File Name: tests/python/twitter/pants/scm/test_git.py
Class Name: GitTest
Method Name: setUpClass
Project Name: pantsbuild/pants
Commit Name: 404f8e0c07f11d9d219c06d25c33e280cd88c058
Time: 2013-05-10
Author: john.sirois@gmail.com
File Name: tests/python/twitter/pants/scm/test_git.py
Class Name: GitTest
Method Name: test
Project Name: pantsbuild/pants
Commit Name: 6f21ea60784ef511cbce116f5c758c4d44376e54
Time: 2013-05-13
Author: benjyw@gmail.com
File Name: tests/python/twitter/pants/scm/test_git.py
Class Name: GitTest
Method Name: test