comparison mercurial/wireproto.py @ 11620:86b49e0083a7

protocol: do not translate error messages on the remote side
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Fri, 16 Jul 2010 23:02:46 +0200
parents 48667abddd60
children 1d48681b17a4
comparison
equal deleted inserted replaced
11619:48667abddd60 11620:86b49e0083a7
227 heads = repo.heads() 227 heads = repo.heads()
228 return their_heads == ['force'] or their_heads == heads 228 return their_heads == ['force'] or their_heads == heads
229 229
230 # fail early if possible 230 # fail early if possible
231 if not check_heads(): 231 if not check_heads():
232 return _('unsynced changes') 232 return 'unsynced changes'
233 233
234 # write bundle data to temporary file because it can be big 234 # write bundle data to temporary file because it can be big
235 fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-') 235 fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-')
236 fp = os.fdopen(fd, 'wb+') 236 fp = os.fdopen(fd, 'wb+')
237 r = 0 237 r = 0
241 lock = repo.lock() 241 lock = repo.lock()
242 try: 242 try:
243 if not check_heads(): 243 if not check_heads():
244 # someone else committed/pushed/unbundled while we 244 # someone else committed/pushed/unbundled while we
245 # were transferring data 245 # were transferring data
246 return _('unsynced changes') 246 return 'unsynced changes'
247 247
248 # push can proceed 248 # push can proceed
249 fp.seek(0) 249 fp.seek(0)
250 header = fp.read(6) 250 header = fp.read(6)
251 if header.startswith('HG'): 251 if header.startswith('HG'):