-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync repo darcs #7137
Sync repo darcs #7137
Conversation
I'm not sure how the changelog works — should i make a file "changelog.d/sync-repo" or what? |
7e60b5b
to
496348c
Compare
ping |
Yes, you can look at the other files for an example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly style/clarity stuff :)
@@ -305,7 +314,43 @@ vcsDarcs = | |||
|
|||
vcsSyncRepos :: Verbosity -> ConfiguredProgram | |||
-> [(SourceRepositoryPackage f, FilePath)] -> IO [MonitorFilePath] | |||
vcsSyncRepos _v _p _rs = fail "sync repo not yet supported for darcs" | |||
vcsSyncRepos verbosity prog = \ case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LambdaCase is almost absent from the cabal codebase, I think we can avoid it here too and just match directly on rs instead, since it's just two cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| Just tag <- (List.stripPrefix "tagged " . List.dropWhile Char.isSpace) x | ||
, Just tag' <- srpTag | ||
, tag == tag' -> pure () | ||
Left (_ :: SomeException) -> pure () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should we ignore the exception? The one that needed catching was already taken care of below, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh... this part is subtle and my code was indeed wrong. PTAL to see whether it makes more sense now.
@Mergifyio update |
Command
|
It was falsely advertized to be supported. Now it should work.
I know not how to reset to a given repo state with Darcs, so if the local copy is not in the wanted state, cabal blows it away and re-clones it. It's not ideal but it does the job.
Tested for a while in some personal projects of mine.
changelog.d
directory).