@@ -42,13 +42,11 @@ def export(self, location):
42
42
if os .path .exists (location ):
43
43
rmtree (location )
44
44
45
- with TempDirectory (kind = "export" ) as temp_dir :
46
- self .unpack (temp_dir .path )
47
-
48
- self .run_command (
49
- ['export' , location ],
50
- cwd = temp_dir .path , show_stdout = False ,
51
- )
45
+ url , rev_options = self .get_url_rev_options ()
46
+ self .run_command (
47
+ ['export' , location , url ] + rev_options .to_args (),
48
+ show_stdout = False ,
49
+ )
52
50
53
51
def fetch_new (self , dest , url , rev_options ):
54
52
rev_display = rev_options .to_display ()
@@ -58,14 +56,15 @@ def fetch_new(self, dest, url, rev_options):
58
56
rev_display ,
59
57
display_path (dest ),
60
58
)
61
- cmd_args = ['branch' , '-q' ] + rev_options .to_args () + [url , dest ]
59
+ cmd_args = (['checkout' , '--lightweight' , '-q' ] +
60
+ rev_options .to_args () + [url , dest ])
62
61
self .run_command (cmd_args )
63
62
64
63
def switch (self , dest , url , rev_options ):
65
64
self .run_command (['switch' , url ], cwd = dest )
66
65
67
- def update (self , dest , url , rev_options ):
68
- cmd_args = ['pull ' , '-q' ] + rev_options .to_args ()
66
+ def update (self , dest , rev_options ):
67
+ cmd_args = ['update ' , '-q' ] + rev_options .to_args ()
69
68
self .run_command (cmd_args , cwd = dest )
70
69
71
70
def get_url_rev_and_auth (self , url ):
0 commit comments