# HG changeset patch # User Pierre-Yves David # Date 1396042831 25200 # Node ID 31eacf182f80daba870d50684727167f20e998ec # Parent 6aae815f3e0dccd12c672db5db7e927da16e3700 wireproto: use decorator for the heads command diff -r 6aae815f3e0d -r 31eacf182f80 mercurial/wireproto.py --- a/mercurial/wireproto.py Fri Mar 28 14:40:07 2014 -0700 +++ b/mercurial/wireproto.py Fri Mar 28 14:40:31 2014 -0700 @@ -605,6 +605,7 @@ cg = repo.getbundle('serve', **opts) return streamres(proto.groupchunks(cg)) +@wireprotocommand('heads') def heads(repo, proto): h = repo.heads() return encodelist(h) + "\n" @@ -790,7 +791,6 @@ os.unlink(tempname) commands.update({ - 'heads': (heads, ''), 'hello': (hello, ''), 'known': (known, 'nodes *'), 'listkeys': (listkeys, 'namespace'),