comparison mercurial/commands.py @ 522:2f1de824798a

Fix empty pull bug that appeared this morning -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fix empty pull bug that appeared this morning manifest hash: 53e4709a701f03d9905933c80758ba13caf3998c -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwxdJywK+sNU5EO8RAuoPAJ4tb9fd1Emm21/HLAEpyntaW2uoHQCfcc8z J8LB4mVG3gTsvRtiLZBVV/g= =+2C3 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Wed, 29 Jun 2005 13:48:57 -0800
parents b0187336843c
children 003df62ae39f
comparison
equal deleted inserted replaced
521:0fb8ade0f756 522:2f1de824798a
300 300
301 else: 301 else:
302 repo = hg.repository(ui, ".", create=1) 302 repo = hg.repository(ui, ".", create=1)
303 other = hg.repository(ui, source) 303 other = hg.repository(ui, source)
304 fetch = repo.findincoming(other) 304 fetch = repo.findincoming(other)
305 cg = other.changegroup(fetch) 305 if fetch:
306 repo.addchangegroup(cg) 306 cg = other.changegroup(fetch)
307 repo.addchangegroup(cg)
307 308
308 f = repo.opener("hgrc", "w") 309 f = repo.opener("hgrc", "w")
309 f.write("[paths]\n") 310 f.write("[paths]\n")
310 f.write("default = %s\n" % source) 311 f.write("default = %s\n" % source)
311 312
547 548
548 ui.status('pulling from %s\n' % (source)) 549 ui.status('pulling from %s\n' % (source))
549 550
550 other = hg.repository(ui, source) 551 other = hg.repository(ui, source)
551 fetch = repo.findincoming(other) 552 fetch = repo.findincoming(other)
553 if not fetch:
554 ui.status("no changes found\n")
555 return
556
552 cg = other.changegroup(fetch) 557 cg = other.changegroup(fetch)
553 r = repo.addchangegroup(cg) 558 r = repo.addchangegroup(cg)
554 if cg and not r: 559 if cg and not r:
555 if opts['update']: 560 if opts['update']:
556 return update(ui, repo) 561 return update(ui, repo)