Page MenuHomePhabricator

revlog: add a `sidedata` parameters to addrevision
Needs RevisionPublic

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

Details

Reviewers
yuja
durin42
indygreg
Group Reviewers
hg-reviewers
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.Sat, Sep 7, 5:28 AM
indygreg added inline comments.Sat, Sep 7, 1:12 PM
hgext/remotefilelog/remotefilelog.py
132

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

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

because it can be iterated over as a noop.

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

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.Mon, Sep 9, 1:52 PM

Okay, I'll update it.

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

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

This revision now requires changes to proceed.Tue, Sep 17, 2:14 PM