Mercurial > hg
comparison mercurial/wireproto.py @ 14419:ede7cea1550f
wireproto: do not hash when heads == ['force']
Changeset 88f0e41d8802 introduced the unbundlehash capability and
unconditionally hashed the heads on the client side. By mistake, the
heads were also cased in the heads == ['force'] case.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 24 May 2011 16:12:01 +0200 |
parents | ce99d887585f |
children | 5adb52524779 |
comparison
equal
deleted
inserted
replaced
14418:0174d1f79280 | 14419:ede7cea1550f |
---|---|
137 '''Send cg (a readable file-like object representing the | 137 '''Send cg (a readable file-like object representing the |
138 changegroup to push, typically a chunkbuffer object) to the | 138 changegroup to push, typically a chunkbuffer object) to the |
139 remote server as a bundle. Return an integer indicating the | 139 remote server as a bundle. Return an integer indicating the |
140 result of the push (see localrepository.addchangegroup()).''' | 140 result of the push (see localrepository.addchangegroup()).''' |
141 | 141 |
142 if self.capable('unbundlehash'): | 142 if heads != ['force'] and self.capable('unbundlehash'): |
143 heads = encodelist(['hashed', | 143 heads = encodelist(['hashed', |
144 util.sha1(''.join(sorted(heads))).digest()]) | 144 util.sha1(''.join(sorted(heads))).digest()]) |
145 else: | 145 else: |
146 heads = encodelist(heads) | 146 heads = encodelist(heads) |
147 | 147 |