# HG changeset patch # User Gregory Szorc # Date 2015-12-13 03:07:40 # Node ID 98e59d9e0d77afdef103e9375ba1d3eeccf9827e # Parent 9fd8f155236940f2e1fb4a1504c32281aac4553d share: pass named arguments They are defined as named arguments and previous called as positional arguments. As part of wrapping hg.share in an extension, I had to extract arguments using some hacky techniques. Using named arguments makes wrapping much simpler. diff --git a/hgext/share.py b/hgext/share.py --- a/hgext/share.py +++ b/hgext/share.py @@ -73,7 +73,8 @@ def share(ui, source, dest=None, noupdat the broken clone to reset it to a changeset that still exists. """ - return hg.share(ui, source, dest, not noupdate, bookmarks) + return hg.share(ui, source, dest=dest, update=not noupdate, + bookmarks=bookmarks) @command('unshare', [], '') def unshare(ui, repo):