This is an archive of the discontinued Mercurial Phabricator instance.

revlog: add a `sidedata` parameters to addrevision
ClosedPublic

Authored by marmoute on Sep 7 2019, 5:28 AM.

Details

Summary

If we want to eventually store sidedata we need to be able to pass them along.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

marmoute created this revision.Sep 7 2019, 5:28 AM
indygreg added inline comments.Sep 7 2019, 1:12 PM
hgext/remotefilelog/remotefilelog.py
133

Why an empty tuple here? Isn't None more Pythonic?

marmoute added inline comments.Sep 7 2019, 1:15 PM
hgext/remotefilelog/remotefilelog.py
133

because it can be iterated over as a noop.

durin42 requested changes to this revision.Sep 9 2019, 1:52 PM
durin42 added inline comments.
hgext/remotefilelog/remotefilelog.py
133

I agree with Greg: if your intent is "optional iterable of data", the tuple is misguided and will cause problems for typecheckers. I know it adds two lines, but None is the correct way to spell "optional value that was empty" in this case.

This revision now requires changes to proceed.Sep 9 2019, 1:52 PM

Okay, I'll update it.

marmoute updated this revision to Diff 16480.Sep 9 2019, 5:23 PM
marmoute updated this revision to Diff 16494.Sep 9 2019, 7:08 PM
durin42 requested changes to this revision.Sep 17 2019, 2:14 PM
durin42 added inline comments.
hgext/remotefilelog/remotefilelog.py
133

You fixed the default in revlog.py but not in remotefilelog.py.

This revision now requires changes to proceed.Sep 17 2019, 2:14 PM
marmoute updated this revision to Diff 16600.Sep 24 2019, 12:44 PM
marmoute marked an inline comment as done.Sep 24 2019, 12:47 PM
marmoute updated this revision to Diff 16601.
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.