Page MenuHomePhabricator

filemerge: drop a default argument to appease pytype
Needs ReviewPublic

Authored by mharbison72 on Wed, Nov 20, 10:27 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

The function slices and takes the length of this argument without internally
setting it if not provided. There was no bug here because both callers passed
the argument.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

mharbison72 created this revision.Wed, Nov 20, 10:27 PM
dlax added a subscriber: dlax.Thu, Nov 21, 3:07 AM

Shouldn't this be also done for all similar functions? (i.e. _xmergeimm and functions registered as a merge tool with @internaltool)

In D7464#109795, @dlax wrote:

Shouldn't this be also done for all similar functions? (i.e. _xmergeimm and functions registered as a merge tool with @internaltool)

I looked at this a bit more, and it looks like the other functions either ignore the labels arg, or they handle the None/empty case to substitute something else. So maybe that's a better thing to do. But I'm not real familiar with merge code, and don't know what the default labels should be here.