status: Now always shows the current repository, even when it does not appear in uuid.log.

This commit is contained in:
Joey Hess 2011-10-28 19:49:01 -04:00
parent 6c31e3a8c3
commit ab738a403a
2 changed files with 13 additions and 2 deletions

View file

@ -24,6 +24,7 @@ import Data.Time.Clock.POSIX
import Common.Annex
import qualified Annex.Branch
import Logs.UUIDBased
import qualified Annex.UUID
{- Filename of uuid.log. -}
logfile :: FilePath
@ -36,6 +37,14 @@ describeUUID uuid desc = do
Annex.Branch.change logfile $
showLog id . changeLog ts uuid desc . parseLog Just
{- Read the uuidLog into a simple Map -}
{- Read the uuidLog into a simple Map.
-
- The UUID of the current repository is included explicitly, since
- it may not have been described and so otherwise would not appear. -}
uuidMap :: Annex (M.Map UUID String)
uuidMap = (simpleMap . parseLog Just) <$> Annex.Branch.get logfile
uuidMap = do
m <- (simpleMap . parseLog Just) <$> Annex.Branch.get logfile
u <- Annex.UUID.getUUID
return $ M.insertWith' preferold u "" m
where
preferold = flip const

2
debian/changelog vendored
View file

@ -6,6 +6,8 @@ git-annex (3.20111026) UNRELEASED; urgency=low
* uninit: Add guard against being run with the git-annex branch checked out.
* Fail if --from or --to is passed to commands that do not support them.
* drop --from is now supported to remove file content from a remote.
* status: Now always shows the current repository, even when it does not
appear in uuid.log.
-- Joey Hess <joeyh@debian.org> Thu, 27 Oct 2011 13:58:53 -0400