diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-09 18:33:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-09 18:33:15 -0400 |
commit | d3e1a3619ff6939367f43cbd46131b7f60ef6bd0 (patch) | |
tree | bc7e29364f11d3369730b0b61ad58e942b95d1cf /Command/Move.hs | |
parent | 2934a65ac5bbab5ac127c495c8c2492e729c2b67 (diff) |
safer inannex checking
git-annex-shell inannex now returns always 0, 1, or 100 (the last when
it's unclear if content is currently in the index due to it currently being
moved or dropped).
(Actual locking code still not yet written.)
Diffstat (limited to 'Command/Move.hs')
-rw-r--r-- | Command/Move.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/Move.hs b/Command/Move.hs index e955de827..f02f32558 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -82,7 +82,7 @@ toPerform dest move key = moveLock move key $ do else Remote.hasKey dest key case isthere of Left err -> do - showNote $ show err + showNote $ err stop Right False -> do showAction $ "to " ++ Remote.name dest @@ -96,7 +96,7 @@ toPerform dest move key = moveLock move key $ do Right True -> finish where finish = do - Remote.remoteHasKey dest key True + Remote.logStatus dest key True if move then do whenM (inAnnex key) $ removeAnnex key @@ -137,5 +137,5 @@ fromPerform src move key = moveLock move key $ do {- Locks a key in order for it to be moved. - No lock is needed when a key is being copied. -} moveLock :: Bool -> Key -> Annex a -> Annex a -moveLock True key a = lockExclusive key a +moveLock True key a = lockContent key a moveLock False _ a = a |