正如我們所知,可以通過darcs record --ask-deps
記錄顯式的補丁依賴關係。 (我看到這樣的用途是防止「It's easy to move a patch that uses a feature to a point before the feature is introduced.」。)如何在darcs中檢查補丁的顯式依賴關係?
因此,有一個回購我應該做出這樣的代價,我想檢查它是否屬實。如何檢查所選補丁的記錄顯式依賴關係?
谷歌可以在Darcs/UI/Commands/Rebase.hs
找到我的代碼,如果補丁有這樣的縮寫,會打印一個警告,但是我不知道是否有一個獨立的命令可以提供這些信息(不是耦合到一個動作):
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"
...
也許,其輸出.dpatch
一個命令將包括在dpatch此信息。我現在應該檢查一下。
根據我的實驗,darcs log -v
(http://bugs.darcs.net/issue959)和darcs diff
都沒有輸出此信息。
請注意,在darcs 2.12截至2016年5月有'darcs show dependencies' – IARI