( )⚙ D2007 narrowrepo: make repo requirement include the string 'experimental'

This is an archive of the discontinued Mercurial Phabricator instance.

narrowrepo: make repo requirement include the string 'experimental'
ClosedPublic

Authored by durin42 on Feb 2 2018, 10:53 AM.

Details

Summary

We can just move to "narrow" or similar when we finalize the
format. I'm not sure what the migration process from one requirement
to another should look like, but we're about to cross that bridge at
Google once this change lands, so hopefully we'll know soon.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Feb 2 2018, 10:53 AM

We can treat two requirements strings as equivalent.

The trick is once we introduce a requirements string in the wild, we can't make BC changes to its format. i.e. the behavior surrounding a store requirement must be immutable over time. So e.g. if we introduce narrowhg-experimental today, any repos with that requirement will be openable by any Mercurial supporting that requirement, even if we change the store format. That's not good. Especially if we ship narrowhg-experimental with different behavior in say 4.6 and 4.7.

One trick I like to do (which I'll be doing with the wire protocol shortly), is introduce a version component. e.g. experimental-narrow-0001. If you make a change to the format, you bump to experimental-narrow-0002. This basically requires that a specific revision of Mercurial must be used for all operations. When we finally make the transition to non-experimental, you can optionally teach new clients to treat the latest experimental version as equivalent to the final version.

indygreg accepted this revision.Feb 5 2018, 4:25 PM
indygreg added inline comments.
tests/test-narrow-pull.t
169

I'd glob the line number while you are here. Also, I think one of my many review comments will make this warning go away :)

This revision is now accepted and ready to land.Feb 5 2018, 4:25 PM
This revision was automatically updated to reflect the committed changes.