This is my csv file witch contain the CommitId:
CommitId
d38f7b334856ed4007fb3ec0f8a5f7499ee2f2b8
d38f7b334856ed4007fb3ec0f8a5f7499ee2f2b8
d38f7b334856ed4007fb3ec0f8a5f7499ee2f2b8
4bb968a47ce00279d6051df95bd782650700179e
c3d7ec38417ecff03d1cd3be0163e6ce07578eb3
00568c9886e739d6b5dd61b4a4326d598552fb6f
00568c9886e739d6b5dd61b4a4326d598552fb6f
00568c9886e739d6b5dd61b4a4326d598552fb6f
00568c9886e739d6b5dd61b4a4326d598552fb6f
6e062098453febbfb0169cd0af56f70f2e3fc77f
63f658918c2f4b851b0d0fffbffab4df0cfe13ca
I need to checkout each commit and copy the version of code on another directory so for this exemple I need 11 version of code in a directory.
I tried this code for one commit:
import os
from distutils.dir_util import copy_tree
path='C:/Users/AQ42770/Desktop/RefactoringMiner/bin/BTC-e-client-for-Android'
os.chdir(path)
commande1='git chekcout d38f7b334856ed4007fb3ec0f8a5f7499ee2f2b8'
os.system(commande1)
copy_tree("C:/Users/AQ42770/Desktop/RefactoringMiner/bin/BTC-e-client-for-Android", "C:/Users/AQ42770/Desktop/test")
the first problem is : copy_tree() copy the files into the destination folder not the directory
Second:I did not find a way to do this for all the commits on may csv
Thanks for help!