status: Now displays trusted, untrusted, and semitrusted repositories separately.
This commit is contained in:
		
					parent
					
						
							
								04edae6791
							
						
					
				
			
			
				commit
				
					
						aa4fbbdd33
					
				
			
		
					 3 changed files with 16 additions and 5 deletions
				
			
		|  | @ -24,6 +24,7 @@ import Annex.Content | |||
| import Types.Key | ||||
| import Backend | ||||
| import Logs.UUID | ||||
| import Logs.Trust | ||||
| import Remote | ||||
| 
 | ||||
| -- a named computation that produces a statistic | ||||
|  | @ -52,7 +53,9 @@ stats :: [Stat] | |||
| stats =  | ||||
| 	[ supported_backends | ||||
| 	, supported_remote_types | ||||
| 	, remote_list | ||||
| 	, remote_list Trusted "trusted" | ||||
| 	, remote_list UnTrusted "untrusted" | ||||
| 	, remote_list SemiTrusted "semitrusted" | ||||
| 	, tmp_size | ||||
| 	, bad_data_size | ||||
| 	, local_annex_keys | ||||
|  | @ -90,10 +93,13 @@ supported_remote_types :: Stat | |||
| supported_remote_types = stat "supported remote types" $ | ||||
| 	return $ unwords $ map R.typename Remote.remoteTypes | ||||
| 
 | ||||
| remote_list :: Stat | ||||
| remote_list = stat "known repositories" $ lift $ do | ||||
| 	s <- prettyPrintUUIDs "repos" =<< M.keys <$> uuidMap | ||||
| 	return $ '\n':init s | ||||
| remote_list :: TrustLevel -> String -> Stat | ||||
| remote_list level desc = stat n $ lift $ do | ||||
| 	us <- M.keys <$> uuidMap | ||||
| 	s <- prettyPrintUUIDs n =<< fst <$> trustPartition level us | ||||
| 	return $ if null s then "none" else '\n':init s | ||||
| 	where | ||||
| 		n = desc ++ " repositories" | ||||
| 
 | ||||
| local_annex_size :: Stat | ||||
| local_annex_size = stat "local annex size" $ | ||||
|  |  | |||
							
								
								
									
										2
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							|  | @ -7,6 +7,8 @@ git-annex (3.20111112) UNRELEASED; urgency=low | |||
|   * init: When run in an already initalized repository, and without | ||||
|     a description specified, don't delete the old description.  | ||||
|   * Optimised union merging; now only runs git cat-file once. | ||||
|   * status: Now displays trusted, untrusted, and semitrusted repositories | ||||
|     separately. | ||||
| 
 | ||||
|  -- Joey Hess <joeyh@debian.org>  Sat, 12 Nov 2011 14:50:21 -0400 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1 +1,4 @@ | |||
| It would be helpful to have a way to query things like a repository's description and trust level, without having to poke in the git-annex branch.  For example, "git annex describe ." currently clears the description but could print the current one instead. | ||||
| 
 | ||||
| > `git annex status` now breaks down the repository list by type. [[done]] | ||||
| > --[[Joey]]  | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Joey Hess
				Joey Hess