Support upgrading from a v0 annex with nothing in it.
This commit is contained in:
parent
c4a357d5d1
commit
eedebb0057
2 changed files with 8 additions and 3 deletions
10
Upgrade.hs
10
Upgrade.hs
|
@ -67,9 +67,13 @@ upgradeFrom0 = do
|
||||||
|
|
||||||
getKeysPresent0' :: FilePath -> Annex [Key]
|
getKeysPresent0' :: FilePath -> Annex [Key]
|
||||||
getKeysPresent0' dir = do
|
getKeysPresent0' dir = do
|
||||||
contents <- liftIO $ getDirectoryContents dir
|
exists <- liftIO $ doesDirectoryExist dir
|
||||||
files <- liftIO $ filterM present contents
|
if (not exists)
|
||||||
return $ map fileKey files
|
then return []
|
||||||
|
else do
|
||||||
|
contents <- liftIO $ getDirectoryContents dir
|
||||||
|
files <- liftIO $ filterM present contents
|
||||||
|
return $ map fileKey files
|
||||||
where
|
where
|
||||||
present d = do
|
present d = do
|
||||||
result <- try $
|
result <- try $
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
||||||
git-annex (0.14) UNRELEASED; urgency=low
|
git-annex (0.14) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* Bugfix to git annex unused in a repository with nothing yet annexed.
|
* Bugfix to git annex unused in a repository with nothing yet annexed.
|
||||||
|
* Support upgrading from a v0 annex with nothing in it.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 20 Dec 2010 14:54:49 -0400
|
-- Joey Hess <joeyh@debian.org> Mon, 20 Dec 2010 14:54:49 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue