[darcs-devel] [issue959] wish: List explicit dependencies with 'darcs changes -v --xml-output '

Ivan Zakharyaschev bugs at darcs.net
Fri Jan 8 23:07:27 UTC 2016


Ivan Zakharyaschev <imz at altlinux.org> added the comment:

I'd say that listing the explicit deps in the output of at least `darcs
log -v` (no XML) is also desired.

While searching for this unimplemented command --
http://stackoverflow.com/q/34668882/94687 , I've found a piece of code
that does list the explicit deps in a warning in
Darcs/UI/Commands/Rebase.hs . So implementing it mustn't be complicated.

Compare:

    where doAdd :: (RepoPatch p, ApplyState p ~ Tree)
                => Repository (Rebasing p) wR wU wT
                -> FL (WDDNamed p) wT wT2
                -> HijackT IO (Repository (Rebasing p) wR wU wT2, FL
(RebaseName p) wT2 wT2)
          doAdd repo NilFL = return (repo, NilFL)
          doAdd repo ((p :: WDDNamed p wT wU) :>:ps) = do
              case wddDependedOn p of
                  [] -> return ()
                  deps -> liftIO $ do
                      -- It might make sense to only print out this
message once, but we might find
                      -- that the dropped dependencies are interspersed
with other output,
                      -- e.g. if running with --ask-deps
                      putStr $ "Warning: dropping the following explicit "
                                 ++ englishNum (length deps) (Noun
"dependency") ":\n\n"
                      let printIndented n =
                              mapM_ (putStrLn . (replicate n ' '++)) .
lines .
                              renderString Encode . showPatchInfo
                      putStrLn . renderString Encode . showPatchInfo .
                              patch2patchinfo $ wddPatch p
                      putStr " depended on:\n"
                      mapM_ (printIndented 2) deps
                      putStr "\n"
    ....

----------
topic: +UI

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue959>
__________________________________


More information about the darcs-devel mailing list