#NEWLINE# @ staticmethod #NEWLINE# def checkout( branch , create = False , cwd = TEMP_DIR ) : #NEWLINE# #INDENT# if create : #NEWLINE# #INDENT# shell_out ( [ 'hg' , 'branch' , branch ] , cwd = cwd ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# shell_out ( [ 'hg' , 'update' , '--check' , branch ] , cwd = cwd )