As we know, explicit patch dependencies can be recorded by darcs record --ask-deps. (A use I see for this is preventing situations where "It's easy to move a patch that uses a feature to a point before the feature is introduced.".)
So, having a repo where I should have made such deps, I want to check whether it's true. How do I inspect the recorded explicit dependencies of a selected patch?
Google could find me some code in Darcs/UI/Commands/Rebase.hs which prints a warning if a patch had such deps, but I don't know yet if there is a stand-alone command that would just give this information (not coupled to an action):
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"
...
Perhaps, a command that outputs a .dpatch would include this information in the dpatch. I should check this now.
Neither darcs log -v (http://bugs.darcs.net/issue959) nor darcs diff outputs this information according to my experiments.
One way is to output a
.dpatchwithdarcs send, and look into it.It's not a very convenient way, because
darcs sendneeds a target repo (even with-o FILE.dpatch);Here is an example (I've also checked that
darcs log -vdoesn't give the information about the explicit dependencies):Preparation:
Recording the explicit dependency:
Inspecting the deps (I had to refer to a non-related darcs repo in order for
darcs sendto work!):The dependency can be seen in angle brackets in the output:
Here is the full output:
Not quite convenient.