Skip to content
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

Single-file mirrors + configuration versioning + cleanups #76

Merged
merged 8 commits into from
Feb 22, 2018

Conversation

mattmccutchen
Copy link
Collaborator

@mattmccutchen mattmccutchen commented Jan 1, 2018

This is a single pull request for single-file mirrors (#64) and configuration versioning (#66), intended to be released as Braid 1.1.0 to give users a new feature in exchange for forcing them to run braid upgrade-config.

@realityforge, you can start to review this, but please do not merge yet because the version table web page still has to be written.

The tests that the upgraded .braids.json content equals the expected currently fail on Windows because .braids.json gets written with LF but the expected files get converted to CRLF by Git for Windows with the recommended settings. I can just make the the comparisons ignore line endings or maybe use gitattributes to stop the CRLF conversion, but I wonder if we should solve the deeper problem by writing .braids.json in text mode. That should also stop the warning spew from the test suite that files with LF committed on Windows will be checked back out with CRLF. @realityforge, do you know why you wrote the file in binary mode in 9d3fa11?
For now I made the comparisons ignore line endings. I filed #77.

- merge_ours, merge_subtree (eb72030)
It was superseded by git.make_tree_with_subtree in d95e864 and I forgot
to remove it.
Fix code that was mistakenly outside an "in_dir" block and only worked
because of a previous "in_dir" block for the same directory.
path (instead of that of the repository URL) as the default local path.

Update the tests for mirrors of subdirectories to specify the mirror
path.  This means we lose the coverage of the default path, but it's
pretty low-impact if this breaks.  If we used the new default path of
"layouts" (the basename of the remote path, "layouts"), then we'd lose
the coverage of unequal local and remote paths, which is a much more
serious concern.
update".

This is in preparation for supporting single-file mirrors, which will
have a different data structure in place of the tree ID.

- The check if the mirror is already up to date: I believe the change
  makes no difference because the only way to get here with switching ==
  false and was_locked == true is if the old and new upstream revision
  are equal (it's not enough if they have equal content at the remote
  path).  I'd like to clean up this code, but that becomes an invasive
  change that I don't want to block cristibalan#64 and cristibalan#66 on.
- The label in conflict markup: This seems to make sense.
Bump version to 1.1.0 according to the new policy that each
configuration version corresponds to a different Braid minor version.

Fixes cristibalan#66.

Now that we have the infrastructure:
- Report loss of support for full-history mirrors as a breaking change.
  Fixes cristibalan#56.
- Correctly upgrade revision locks from Braid < 1.0.18.  Fixes cristibalan#65.
@mattmccutchen
Copy link
Collaborator Author

I'm coming back to this pull request to try to get it out the door. I emailed cristibalan on January 8, asking him to consider switching the GitHub Pages source to the master branch and transferring the repository to an organization, and he never responded. However, we can proceed without his help by manually copying master to gh-pages every time we change the documentation. We can leave #67 to track switching the GitHub Pages source to master. And if we transfer the repository to an organization later, it should be straightforward to set up redirects from https://cristibalan.github.io/braid/ ; I've tested that process on my own GitHub Pages site.

I've made up my mind on the remaining to-do items, so @realityforge, I just need your review. This pull request makes Braid print a link to https://cristibalan.github.io/braid/config_versions.html ; you can preview the page at https://mattmccutchen.github.io/braid/config_versions.html . The pull request has passed the test suite on my Windows VM.

@realityforge
Copy link
Collaborator

Ok - I will have a look at it this weekend

@realityforge realityforge merged commit 0eff193 into cristibalan:master Feb 22, 2018
@realityforge
Copy link
Collaborator

Ok - merged and released.

Thanks - for putting in the work to get this here ;)

@mattmccutchen mattmccutchen deleted the config-version branch February 23, 2018 00:23
@mattmccutchen
Copy link
Collaborator Author

Thanks. As planned, I've manually copied the master branch to gh-pages (and renamed the old gh-pages to gh-pages.pre20180222, in case anyone cares about it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants