comparison mercurial/commands.py @ 4063:96863fc3036a

Open bundle files in binary mode
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 30 Jan 2007 20:37:58 -0200
parents f1622b4f467d
children 5d9ede002453
comparison
equal deleted inserted replaced
4058:e7282dede8cd 4063:96863fc3036a
2489 2489
2490 Apply a compressed changegroup file generated by the bundle 2490 Apply a compressed changegroup file generated by the bundle
2491 command. 2491 command.
2492 """ 2492 """
2493 if os.path.exists(fname): 2493 if os.path.exists(fname):
2494 f = open(fname) 2494 f = open(fname, "rb")
2495 else: 2495 else:
2496 f = urllib.urlopen(fname) 2496 f = urllib.urlopen(fname)
2497 gen = changegroup.readbundle(f, fname) 2497 gen = changegroup.readbundle(f, fname)
2498 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) 2498 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
2499 return postincoming(ui, repo, modheads, opts['update']) 2499 return postincoming(ui, repo, modheads, opts['update'])