-
Notifications
You must be signed in to change notification settings - Fork 77
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
Git Repo needs copies of MPS project and Ravenbrook documents #95
Comments
A technical note about how to bring new content into the repo. Skip this if you're not involved in actually doing that bit. We should not simply copy files. Those files have history, and that history is valuable data when trying to figure out, for example, what rules were applied when. Or simply who said what (e.g. "git blame"). The MPS git repo is exported from Perforce using Perforce Git Fusion. Unfortunately, we can't adjust Git Fusion's view to include the history of new files, because that would cause Git Fusion to essentially "rebase" all of MPS history. That's not really a flaw in Git Fusion, since it was never really designed to maintain a permanent two-way connection between Perforce and git. Fortunately, there is a way. We can ask git to merge the histories of separate repos exported from Perforce. Firstly, we create a Perforce client view on the things we want to incorporate. For example, to bring in the Ravenbrook rules we could create a Perforce client called "mps-rules-merge" with a view like this:
note that the directory tree on the right-hand side will be merged into the directory tree of the MPS git repo. Then we can use Git Fusion to create a repo for that and fetch its commits:
This will create a remote ref that points to the imported tree and its history. Now the magic:
This will merge the rules tree into the current tree, and create a merge commit whose parents are both histories, conserving all history. Important If you attempt this, make sure the result can be pushed back to Perforce before you publish it to GitHub (and I don't mean before you merge, I mean before you even push to GitHub). Otherwise we might desynchronise the two in a public way that's hard to fix up without forcing everyone to rebase. See email message Git Fusion user lookup failure for past user. References |
An alternative method using Perforce.
In Perforce, integrate the things we can to incorporate directly into the codeline. For example:
Git Fusion will create commits for the entire history of the integrated stuff, and that will then appear in Git. For good record keeping, it's probably best to create a Perforce branch spec for this operation, with notes and references. And for good isolation, it's probably best to integrate into a development branch in Perforce, not directly to master as shown. That development branch can be merged after review, in either Git or Perforce. |
This issue indicates a failure to meet kpa.scm.goal.avail and the fact that the public can't follow that link exactly illustrates #95. |
Some more documents found that need to go in (possibly heavily modified): |
I used this successfully for some documents in ee4d788 . Recording here as an example of how to do it.
|
The MPS is migrating from being "mastered" inside Ravenbrook to living in git (and on GitHub). Ravenbrook's infrastructure is based on Perforce SCM, where the current git repository is just a mirror of a "codeline" and its "branches" that form only part of a wider "project" in a company-wide "repository". As a consequence, the stuff in the git repo refers to important documents and resources that aren't part of it, and sometimes not visible.
(Quite a lot of the MPS "project" part of the Ravenbrook repository is visible at https://www.ravenbrook.com/project/mps/ )
But the style of git (and GitHub) use tends to keep copies and versions of these resources in the git repo alongside the code, and this makes sense especially now the project is FOSS under the BSD licence.
So, we should branch various things from elsewhere in the Ravenbrook repository in to the MPS git repo. This issue can help to track and discuss how to do it.
A really good example is the code review rules. Currently, the contributing guidelines say:
Our rules are a valuable result of defect prevention in the development of the MPS, and we not only want to share them, but encourage collaboration, including the ability of other people to review and apply them so that the MPS continues to deploy with its extremely low defect rate.
I encourage other team members, past and present, to add more items to this issue.
The text was updated successfully, but these errors were encountered: