Mercurial > hg-stable
comparison mercurial/bundle2.py @ 22343:76677a2c1cfd
bundle2: advertise the obsmarker part in bundle2 capabilities
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 21 Aug 2014 18:18:38 -0700 |
parents | 262c5cc126c1 |
children | 9829b7948100 |
comparison
equal
deleted
inserted
replaced
22342:262c5cc126c1 | 22343:76677a2c1cfd |
---|---|
782 } | 782 } |
783 | 783 |
784 def getrepocaps(repo): | 784 def getrepocaps(repo): |
785 """return the bundle2 capabilities for a given repo | 785 """return the bundle2 capabilities for a given repo |
786 | 786 |
787 Exists to allow extensions (like evolution) to mutate the | 787 Exists to allow extensions (like evolution) to mutate the capabilities. |
788 capabilities. | |
789 """ | 788 """ |
790 return capabilities | 789 caps = capabilities.copy() |
790 if obsolete._enabled: | |
791 supportedformat = tuple('V%i' % v for v in obsolete.formats) | |
792 caps['b2x:obsmarkers'] = supportedformat | |
793 return caps | |
791 | 794 |
792 def bundle2caps(remote): | 795 def bundle2caps(remote): |
793 """return the bundlecapabilities of a peer as dict""" | 796 """return the bundlecapabilities of a peer as dict""" |
794 raw = remote.capable('bundle2-exp') | 797 raw = remote.capable('bundle2-exp') |
795 if not raw and raw != '': | 798 if not raw and raw != '': |