diff --git a/config/routes b/config/routes index 91e3332..1f337f1 100644 --- a/config/routes +++ b/config/routes @@ -105,7 +105,7 @@ /s/#ShrIdent/r/#RpIdent/c RepoHeadChangesR GET /s/#ShrIdent/r/#RpIdent/b/#Text RepoBranchR GET /s/#ShrIdent/r/#RpIdent/c/#Text RepoChangesR GET -/s/#ShrIdent/r/#RpIdent/p/#Text RepoPatchR GET +/s/#ShrIdent/r/#RpIdent/p/#Text RepoCommitR GET /s/#ShrIdent/r/#RpIdent/d RepoDevsR GET POST /s/#ShrIdent/r/#RpIdent/d/!new RepoDevNewR GET /s/#ShrIdent/r/#RpIdent/d/#ShrIdent RepoDevR GET DELETE POST diff --git a/src/Vervis/ActivityPub.hs b/src/Vervis/ActivityPub.hs index 4d88b35..f27a10d 100644 --- a/src/Vervis/ActivityPub.hs +++ b/src/Vervis/ActivityPub.hs @@ -757,8 +757,7 @@ serveCommit shr rp ref patch parents = do let (author, written) = patchWritten patch mcommitter = patchCommitted patch patchAP = AP.Commit - { commitId = - encodeRouteLocal $ RepoPatchR shr rp ref + { commitId = encodeRouteLocal $ RepoCommitR shr rp ref , commitRepository = encodeRouteLocal $ RepoR shr rp , commitAuthor = makeAuthor encodeRouteHome msharerWritten author diff --git a/src/Vervis/ChangeFeed.hs b/src/Vervis/ChangeFeed.hs index 97090e2..bd425b5 100644 --- a/src/Vervis/ChangeFeed.hs +++ b/src/Vervis/ChangeFeed.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written in 2018 by fr33domlover . + - Written in 2018, 2020 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -32,7 +32,7 @@ import Vervis.Model.Repo changeEntry :: ShrIdent -> RpIdent -> LogEntry -> FeedEntry (Route App) changeEntry shr rp le = FeedEntry - { feedEntryLink = RepoPatchR shr rp $ leHash le + { feedEntryLink = RepoCommitR shr rp $ leHash le , feedEntryUpdated = fst $ leTime le , feedEntryTitle = leMessage le , feedEntryContent = mempty diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index 9925952..f69b810 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -828,7 +828,7 @@ instance YesodBreadcrumbs App where RepoChangesR shar repo ref -> ( ref , Just $ RepoHeadChangesR shar repo ) - RepoPatchR shr rp hash -> ( "Patch " <> hash + RepoCommitR shr rp hash -> ( "Commit " <> hash , Just $ RepoHeadChangesR shr rp ) RepoDevsR shr rp -> ( "Collaboratots" diff --git a/src/Vervis/Handler/Repo.hs b/src/Vervis/Handler/Repo.hs index 31a0793..a822557 100644 --- a/src/Vervis/Handler/Repo.hs +++ b/src/Vervis/Handler/Repo.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written in 2016, 2018, 2019 by fr33domlover . + - Written in 2016, 2018, 2019, 2020 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -26,7 +26,7 @@ module Vervis.Handler.Repo , getRepoHeadChangesR , getRepoBranchR , getRepoChangesR - , getRepoPatchR + , getRepoCommitR , getRepoDevsR , postRepoDevsR , getRepoDevNewR @@ -346,8 +346,8 @@ getRepoChangesR shar repo ref = do VCSDarcs -> getDarcsRepoChanges shar repo ref VCSGit -> getGitRepoChanges shar repo ref -getRepoPatchR :: ShrIdent -> RpIdent -> Text -> Handler TypedContent -getRepoPatchR shr rp ref = do +getRepoCommitR :: ShrIdent -> RpIdent -> Text -> Handler TypedContent +getRepoCommitR shr rp ref = do (_, repository) <- runDB $ selectRepo shr rp case repoVcs repository of VCSDarcs -> getDarcsPatch shr rp ref @@ -515,7 +515,7 @@ postPostReceiveR = do hashText (Hash b) = decodeUtf8 b commitW c = [hamlet| - + #{commitTitle c} |] withUrlRenderer @@ -582,7 +582,7 @@ postPostReceiveR = do author <- authorByEmail wauthor mcommitter <- traverse (authorByEmail . fst) mcommitted return Commit - { commitId = encodeRouteLocal $ RepoPatchR shr rp hash + { commitId = encodeRouteLocal $ RepoCommitR shr rp hash , commitRepository = encodeRouteLocal $ RepoR shr rp , commitAuthor = second (encodeRouteHome . SharerR) author , commitCommitter = diff --git a/src/Vervis/Handler/Repo/Darcs.hs b/src/Vervis/Handler/Repo/Darcs.hs index 03a423f..a8e216a 100644 --- a/src/Vervis/Handler/Repo/Darcs.hs +++ b/src/Vervis/Handler/Repo/Darcs.hs @@ -151,7 +151,7 @@ getDarcsRepoHeadChanges shar repo = do else Nothing , collectionPageStartIndex = Nothing , collectionPageItems = - map (encodeRouteHome . RepoPatchR shar repo . leHash) + map (encodeRouteHome . RepoCommitR shar repo . leHash) items } feed = changeFeed shar repo Nothing VCSDarcs items diff --git a/src/Vervis/Handler/Repo/Git.hs b/src/Vervis/Handler/Repo/Git.hs index d0069bf..5c1ae3f 100644 --- a/src/Vervis/Handler/Repo/Git.hs +++ b/src/Vervis/Handler/Repo/Git.hs @@ -185,7 +185,7 @@ getGitRepoChanges shar repo ref = do else Nothing , collectionPageStartIndex = Nothing , collectionPageItems = - map (encodeRouteHome . RepoPatchR shar repo . leHash) + map (encodeRouteHome . RepoCommitR shar repo . leHash) items } feed = changeFeed shar repo (Just ref) VCSGit items diff --git a/templates/repo/widget/changes.hamlet b/templates/repo/widget/changes.hamlet index 9fd68c0..1a1f6aa 100644 --- a/templates/repo/widget/changes.hamlet +++ b/templates/repo/widget/changes.hamlet @@ -1,6 +1,6 @@ $# This file is part of Vervis. $# -$# Written in 2016, 2018 by fr33domlover . +$# Written in 2016, 2018, 2020 by fr33domlover . $# $# ♡ Copying is an act of love. Please copy, reuse and share. $# @@ -22,7 +22,7 @@ $# . #{author} - + #{T.take 10 hash} #{message} #{time}