@ -1413,19 +1413,17 @@ class UnmanagedGitWrapperTestCase(BaseGitWrapperTestCase):
root_dir = self . root_dir ,
relpath = self . relpath )
expected_file_list = [ join ( self . base_path , " a " ) ,
join ( self . base_path , " b " ) ]
file_list = [ ]
options . revision = ' unmanaged '
scm . update ( options , ( ) , file_list )
self . assertEquals ( file_list , expected_file_list )
self . assertEquals ( scm . revinfo ( options , ( ) , None ) ,
' 069c602044c5388d2d15c3f875b057c852003458 ' )
self . assertEquals ( file_list , [ ] )
self . assertRaises ( subprocess2 . CalledProcessError ,
scm . revinfo , options , ( ) , None )
# indicates detached HEAD
self . assertEquals ( self . getCurrentBranch ( ) , None )
self . checkInStdout (
' Checked out refs/remotes/origin/master to a detached HEAD ' )
self . assertRaises ( subprocess2 . CalledProcessError , self . getCurrentBranch )
self . checkInStdout ( ' unmanaged solution; skipping ' )
rmtree ( origin_root_dir )
@ -1445,19 +1443,16 @@ class UnmanagedGitWrapperTestCase(BaseGitWrapperTestCase):
root_dir = self . root_dir ,
relpath = self . relpath )
expected_file_list = [ join ( self . base_path , " a " ) ,
join ( self . base_path , " b " ) ]
file_list = [ ]
options . revision = ' unmanaged '
scm . update ( options , ( ) , file_list )
self . assertEquals ( file_list , expected_file_list )
self . assert Equals( scm . revinfo ( options , ( ) , None ) ,
' a7142dc9f0009350b96a11f372b6ea658592aa95 ' )
self . assertEquals ( file_list , [ ] )
self . assert Raises( subprocess2 . CalledProcessError ,
scm . revinfo , options , ( ) , None )
# indicates detached HEAD
self . assertEquals ( self . getCurrentBranch ( ) , None )
self . checkInStdout (
' Checked out a7142dc9f0009350b96a11f372b6ea658592aa95 to a detached HEAD ' )
self . assertRaises ( subprocess2 . CalledProcessError , self . getCurrentBranch )
self . checkInStdout ( ' unmanaged solution; skipping ' )
rmtree ( origin_root_dir )
@ -1476,17 +1471,14 @@ class UnmanagedGitWrapperTestCase(BaseGitWrapperTestCase):
root_dir = self . root_dir ,
relpath = self . relpath )
expected_file_list = [ join ( self . base_path , " a " ) ,
join ( self . base_path , " b " ) ,
join ( self . base_path , " c " ) ]
file_list = [ ]
options . revision = ' unmanaged '
scm . update ( options , ( ) , file_list )
self . assertEquals ( file_list , expected_file_list )
self . assert Equals( scm . revinfo ( options , ( ) , None ) ,
' 9a51244740b25fa2ded5252ca00a3178d3f665a9 ' )
self . assert Equals( self . getCurrentBranch ( ) , ' feature ' )
self . assertEquals ( file_list , [ ] )
self . assert Raises( subprocess2 . CalledProcessError ,
scm . revinfo , options , ( ) , None )
self . assert Raises( subprocess2 . CalledProcessError , self . getCurrentBranch )
self . checkNotInStdout ( ' Checked out feature to a detached HEAD ' )
rmtree ( origin_root_dir )
@ -1506,20 +1498,16 @@ class UnmanagedGitWrapperTestCase(BaseGitWrapperTestCase):
root_dir = self . root_dir ,
relpath = self . relpath )
expected_file_list = [ join ( self . base_path , " a " ) ,
join ( self . base_path , " b " ) ,
join ( self . base_path , " c " ) ]
file_list = [ ]
options . revision = ' unmanaged '
scm . update ( options , ( ) , file_list )
scm . update ( options , ( ) , [ ] )
self . assertEquals ( file_list , expected_file_list )
self . assert Equals( scm . revinfo ( options , ( ) , None ) ,
' 9a51244740b25fa2ded5252ca00a3178d3f665a9 ' )
self . assertEquals ( file_list , [ ] )
self . assert Raises( subprocess2 . CalledProcessError ,
scm . revinfo , options , ( ) , None )
# indicates detached HEAD
self . assertEquals ( self . getCurrentBranch ( ) , None )
self . checkInStdout (
' Checked out refs/remotes/origin/feature to a detached HEAD ' )
self . assertRaises ( subprocess2 . CalledProcessError , self . getCurrentBranch )
self . checkInStdout ( ' unmanaged solution; skipping ' )
rmtree ( origin_root_dir )
@ -1538,17 +1526,14 @@ class UnmanagedGitWrapperTestCase(BaseGitWrapperTestCase):
root_dir = self . root_dir ,
relpath = self . relpath )
expected_file_list = [ join ( self . base_path , " a " ) ,
join ( self . base_path , " b " ) ,
join ( self . base_path , " c " ) ]
file_list = [ ]
options . revision = ' unmanaged '
scm . update ( options , ( ) , file_list )
self . assertEquals ( file_list , expected_file_list )
self . assert Equals( scm . revinfo ( options , ( ) , None ) ,
' 9a51244740b25fa2ded5252ca00a3178d3f665a9 ' )
self . assert Equals( self . getCurrentBranch ( ) , ' feature ' )
self . assertEquals ( file_list , [ ] )
self . assert Raises( subprocess2 . CalledProcessError ,
scm . revinfo , options , ( ) , None )
self . assert Raises( subprocess2 . CalledProcessError , self . getCurrentBranch )
self . checkNotInStdout (
' Checked out refs/heads/feature to a detached HEAD ' )