Page MenuHomePhabricator

hg: let extensions call the func without populating opts keys
ClosedPublic

Authored by khanchi97 on Fri, Oct 8, 7:33 AM.

Details

Summary

This change is to help extensions by not forcing them to populate with
opts[b'bundle'] and opts[b'force'] when calling hg.incoming(...)

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

khanchi97 created this revision.Fri, Oct 8, 7:33 AM
martinvonz requested changes to this revision.Fri, Oct 8, 4:45 PM
martinvonz added a subscriber: martinvonz.

This needs a clearer commit message. I *think* what you mean is that you're doing this in order to let extensions call these functions without populating the opts[b"bundle"] etc. However, does your extension really want to call debugbackupbundle()? Or do the KeyErrors actually happen when you simply run some hg commands? Which ones?

This revision now requires changes to proceed.Fri, Oct 8, 4:45 PM

This needs a clearer commit message. I *think* what you mean is that you're doing this in order to let extensions call these functions without populating the opts[b"bundle"] etc.

Yes. I will change the commit message.

However, does your extension really want to call debugbackupbundle()?

No. The extension don't intend to call debugbackupbundle(). I just thought it's no harm to make the change here as well. I'll undo it.

khanchi97 retitled this revision from hg: use dict.get() instead, to prevent KeyError to hg: let extensions call the func without populating opts keys.Sat, Oct 9, 12:25 AM
khanchi97 edited the summary of this revision. (Show Details)
khanchi97 updated this revision to Diff 30697.
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.