changeset 27353:98e59d9e0d77

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 12 Dec 2015 22:07:40 -0500
parents 9fd8f1552369
children bced7180db19
files hgext/share.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/share.py	Tue Nov 24 23:03:54 2015 +0900
+++ b/hgext/share.py	Sat Dec 12 22:07:40 2015 -0500
@@ -73,7 +73,8 @@
        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):