comparison mercurial/wireproto.py @ 20923:d771641b7051

wireproto: use decorator for the ubundle command
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 28 Mar 2014 14:43:30 -0700
parents 588e24f3eea3
children 24a443948627
comparison
equal deleted inserted replaced
20922:588e24f3eea3 20923:d771641b7051
748 raise 748 raise
749 sopener.mustaudit = oldaudit 749 sopener.mustaudit = oldaudit
750 750
751 return streamres(streamer(repo, entries, total_bytes)) 751 return streamres(streamer(repo, entries, total_bytes))
752 752
753 @wireprotocommand('unbundle', 'heads')
753 def unbundle(repo, proto, heads): 754 def unbundle(repo, proto, heads):
754 their_heads = decodelist(heads) 755 their_heads = decodelist(heads)
755 756
756 def check_heads(): 757 def check_heads():
757 heads = repo.heads() 758 heads = repo.heads()
793 return pushres(r) 794 return pushres(r)
794 795
795 finally: 796 finally:
796 fp.close() 797 fp.close()
797 os.unlink(tempname) 798 os.unlink(tempname)
798
799 commands.update({
800 'unbundle': (unbundle, 'heads'),
801 })