430 elif srcrepo and destpeer.capable("pushkey"): |
430 elif srcrepo and destpeer.capable("pushkey"): |
431 for k, n in srcrepo._bookmarks.iteritems(): |
431 for k, n in srcrepo._bookmarks.iteritems(): |
432 destpeer.pushkey('bookmarks', k, '', hex(n)) |
432 destpeer.pushkey('bookmarks', k, '', hex(n)) |
433 |
433 |
434 if destrepo: |
434 if destrepo: |
|
435 template = ( |
|
436 '# You may want to set your username here if it is not set\n' |
|
437 "# globally, or this repository requires a different\n" |
|
438 '# username from your usual configuration. If you want to\n' |
|
439 '# set something for all of your repositories on this\n' |
|
440 '# computer, try running the command\n' |
|
441 "# 'hg config --edit --global'\n" |
|
442 '# [ui]\n' |
|
443 '# username = Jane Doe <jdoe@example.com>\n' |
|
444 '[paths]\n' |
|
445 'default = %s\n' |
|
446 ) |
435 fp = destrepo.opener("hgrc", "w", text=True) |
447 fp = destrepo.opener("hgrc", "w", text=True) |
436 fp.write("[paths]\n") |
|
437 u = util.url(abspath) |
448 u = util.url(abspath) |
438 u.passwd = None |
449 u.passwd = None |
439 defaulturl = str(u) |
450 defaulturl = str(u) |
440 fp.write("default = %s\n" % defaulturl) |
451 fp.write(template % defaulturl) |
441 fp.close() |
452 fp.close() |
442 |
453 |
443 destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone') |
454 destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone') |
444 |
455 |
445 if update: |
456 if update: |