See attached screenshot for reference. Several things that can be improved:
- "From" could be improved, e.g. "{{project name}} {{tool name}} repository"
- The branch name is specified in front of just the first commit, and then is blank on the rest of the commits. IIRC this is bad for SVN commit messages too since they don't have real branches. I think it could be better moved up as a section header "On
master
branch:". Test with SVN and with Hg, and with commits on multiple branches.
- Markdown formatting in commit messages is not expected, e.g.
__future__
vs future. When we render commits, e.g. at https://sourceforge.net/p/gazette/code/ci/2cece9731de397e508dfed34d3d6e3866e0a94ac we use a special rendering helper that is configured to do some stuff like artifact linking but not other markdown formatting. We should use that for these commit emails too.
- It would be cleaner to make the commit message text be a link, instead of showing the full link URL in the email text.
Review at: hs/7825
To QA: Run tests and (ideally) commit to a git/svn/hg repo.
What are your thoughts on:
line:398 of repo_refresh.py
?This works well -- but it assumes forgesvn exists.
Every
Repository
model should havetool_name
attribute. I think it's better to use that to avoid dependency onforgesvn
package.tool_name
is a good idea -- I'll use that instead.See attachment for reference
I didn't check SVN yet.
Related
Tickets:
#1Great feedback Igor!
I agree with you on the visual changes and as for the errors... I must have tweaked a few things right before the push (like the strftime for example). Updating now.
Because of some of the differences with svn/git, I lost the profile images. But the resulting code is much cleaner.
hs/7825
Nice work Heith!
Both code and email layout are definitely cleaner and I like that.
I'd like to see some future improvements, though:
app.default_branch_name
) appear first in email, even when more than one branch is pushed? It is not essential, but convenient.__future__
converts to bold future, but it should not. We should useg.markdown_commit.convert(commit.message)
for that.Great feedback again, thanks Igor :)
Good job!
For sorting branches this might help:
Allura/allura/model/repo_refresh.py:_group_commits
. It groups commits by branch and by tag, so then you can render all the commits that correspond to default branch first. It should be moved to theutils.py
, if we end up using it in some other place.It can be hard to understand mercurial branching model after git, been there. I'm not sure my understanding is full also :)
Branch in mercurial is attribute of every commit. It's not like git when branch is just a pointer to some commit. So,
branches=repo.symbolics_for_commit(ci)[0],
line always returns branches for hg, whereas for git it returns branches only for the top commit of some branch(es). As a workaround we can keep track of branches of previous commit and if that's equal to current, just return empty list. I guess_group_commits
mentioned above might help here as well.Could you try this? If this turns out time consuming I'm ok with closing this as is (it is already good enough, especially for git and svn) and creating followup tickets for those issues.
That was very helpful, Thanks! Thinking of branches as an attribute in mercurial clears up a lot :)
I'm still checking into the sorting functionality, but I managed to fix up the mercurial branch headers based on your suggested solution.
I've looked at this as well and think it is good as-is. I've created one followup ticket: [#7896]
Related
Tickets:
#7896