# HG changeset patch # User Pierre-Yves David # Date 2014-03-28 21:43:30 # Node ID d771641b705127218044ea858c809ff12753171e # Parent 588e24f3eea37b05c1aa78325a65fdd3b068f828 wireproto: use decorator for the ubundle command diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -750,6 +750,7 @@ def stream(repo, proto): return streamres(streamer(repo, entries, total_bytes)) +@wireprotocommand('unbundle', 'heads') def unbundle(repo, proto, heads): their_heads = decodelist(heads) @@ -795,7 +796,3 @@ def unbundle(repo, proto, heads): finally: fp.close() os.unlink(tempname) - -commands.update({ - 'unbundle': (unbundle, 'heads'), -})