@@ -49,30 +49,30 @@ def reload_dir():
49
49
50
50
51
51
def fnames (fm ):
52
- return (str (fname ) for fname in fm .env .get_selection ())
52
+ return (str (fname ) for fname in fm .thistab .get_selection ())
53
53
54
54
55
- class add (Command ):
55
+ class annex_add (Command ):
56
56
def execute (self ):
57
57
self .fm .loader .add (CommandLoader (['git' , 'annex' , 'add' ], 'annex:add' ))
58
58
self .fm .loader .add (CommandLoader (['git' , 'commit' , '-m' , '"add files"' ], 'git:commit' ))
59
59
60
60
61
- class get (Command ):
61
+ class annex_get (Command ):
62
62
def execute (self ):
63
63
for fname in fnames (self .fm ):
64
64
if not os .path .exists (fname ):
65
65
annex_call (self .fm , ['get' ], fname )
66
66
67
67
68
- class drop (Command ):
68
+ class annex_drop (Command ):
69
69
def execute (self ):
70
70
for fname in fnames (self .fm ):
71
71
if os .path .exists (fname ):
72
72
annex_call (self .fm , ['drop' ], fname )
73
73
74
74
75
- class copy (Command ):
75
+ class annex_copy (Command ):
76
76
def tab (self ):
77
77
return ('annex_copy {}' .format (r ) for r in remotes ())
78
78
@@ -88,19 +88,19 @@ def execute(self):
88
88
annex_call (self .fm , ['copy' , '-t' , remote ], fname )
89
89
90
90
91
- class sync (Command ):
91
+ class annex_sync (Command ):
92
92
def execute (self ):
93
93
cmd = 'git annex sync --fast --quiet' .split ()
94
94
self .fm .loader .add (CommandLoader (cmd , 'annex:sync' ))
95
95
96
96
97
97
def hook_init (fm ):
98
98
if annex_exists ():
99
- fm .commands .commands ['annex_add' ] = add
100
- fm .commands .commands ['annex_copy' ] = copy
101
- fm .commands .commands ['annex_drop' ] = drop
102
- fm .commands .commands ['annex_get' ] = get
103
- fm .commands .commands ['annex_sync' ] = sync
99
+ fm .commands .commands ['annex_add' ] = annex_add
100
+ fm .commands .commands ['annex_copy' ] = annex_copy
101
+ fm .commands .commands ['annex_drop' ] = annex_drop
102
+ fm .commands .commands ['annex_get' ] = annex_get
103
+ fm .commands .commands ['annex_sync' ] = annex_sync
104
104
else :
105
105
fm .notify ('Could not find git-annex' , bad = True )
106
106
0 commit comments