[PATCH 1 of 2] share: pass named arguments
Gregory Szorc
gregory.szorc at gmail.com
Sun Dec 13 07:10:39 UTC 2015
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1449976060 18000
# Sat Dec 12 22:07:40 2015 -0500
# Node ID b220b46d9b6cc53ca652397746a9262c320914ad
# Parent 944af8e2eb4cddf96ba5b8a96854528b40979715
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
@@ -72,9 +72,10 @@ def share(ui, source, dest=None, noupdat
parent". The only known workaround is to use debugsetparents on
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):
"""convert a shared repository to a normal one
More information about the Mercurial-devel
mailing list