Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 286:bd9d1e93f8d6
hg pull: ditch .hgpaths for new .hgrc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hg pull: ditch .hgpaths for new .hgrc
The format is like this:
[paths]
main = http://selenic.com/hg
hgweb = http://edge2.net/hg/hgweb/
hgdoc = http://edge2.net/hg/man/
manifest hash: fc99889443381bdecc223f09ee65a74a8d5952c1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCp3VKywK+sNU5EO8RAsbfAKCrzNh2yKI0KF9qCzHPz7eXjx688wCeKmIL
RXfAOuycKOTVJU6oFnBbBBo=
=OjMb
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Wed, 08 Jun 2005 14:46:34 -0800 |
parents | 574420507d8c |
children | 266396e32006 |
comparison
equal
deleted
inserted
replaced
285:5a1e6d27f399 | 286:bd9d1e93f8d6 |
---|---|
359 repo.commit(files, text) | 359 repo.commit(files, text) |
360 | 360 |
361 def pull(ui, repo, source): | 361 def pull(ui, repo, source): |
362 """pull changes from the specified source""" | 362 """pull changes from the specified source""" |
363 paths = {} | 363 paths = {} |
364 try: | 364 for name, path in ui.configitems("paths"): |
365 pf = os.path.expanduser("~/.hgpaths") | |
366 for l in file(pf): | |
367 name, path = l.split() | |
368 paths[name] = path | 365 paths[name] = path |
369 except IOError: | |
370 pass | |
371 | 366 |
372 if source in paths: source = paths[source] | 367 if source in paths: source = paths[source] |
373 | 368 |
374 other = hg.repository(ui, source) | 369 other = hg.repository(ui, source) |
375 cg = repo.getchangegroup(other) | 370 cg = repo.getchangegroup(other) |