Commit f8ef3a4d authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Edward Z. Yang
Browse files

Warn if --index-state is in the future.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 87e840cc
......@@ -264,10 +264,17 @@ getSourcePackagesAtIndexState verbosity repoCtxt mb_idxState = do
return ()
IndexStateTime ts0 -> do
when (isiMaxTime isi /= ts0) $
info verbosity ("Requested index-state " ++ display ts0
if ts0 > isiMaxTime isi
then warn verbosity $
"Requested index-state" ++ display ts0
++ " is in newer than '" ++ rname ++ "'!"
++ " Falling back to older state ("
++ display (isiMaxTime isi) ++ ")."
else info verbosity $
"Requested index-state " ++ display ts0
++ " does not exist in '"++rname++"'!"
++ " Falling back to older state ("
++ display (isiMaxTime isi) ++ ").")
++ display (isiMaxTime isi) ++ ")."
info verbosity ("index-state("++rname++") = " ++
display (isiMaxTime isi) ++ " (HEAD = " ++
display (isiHeadTime isi) ++ ")")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment