comparison mercurial/commands.py @ 1893:6569651a4f1e

Read paths specified in .hg/hgrc relative to repo root, otherwise to home dir.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 12 Mar 2006 20:13:58 +0100
parents 622ee75cb4c9
children 4c53aaf2d153
comparison
equal deleted inserted replaced
1892:622ee75cb4c9 1893:6569651a4f1e
627 627
628 Unlike import/export, this exactly preserves all changeset 628 Unlike import/export, this exactly preserves all changeset
629 contents including permissions, rename data, and revision history. 629 contents including permissions, rename data, and revision history.
630 """ 630 """
631 f = open(fname, "wb") 631 f = open(fname, "wb")
632 dest = ui.expandpath(dest, repo.root) 632 dest = ui.expandpath(dest)
633 other = hg.repository(ui, dest) 633 other = hg.repository(ui, dest)
634 o = repo.findoutgoing(other) 634 o = repo.findoutgoing(other)
635 cg = repo.changegroup(o, 'bundle') 635 cg = repo.changegroup(o, 'bundle')
636 636
637 try: 637 try:
1541 pull repo. These are the changesets that would be pulled if a pull 1541 pull repo. These are the changesets that would be pulled if a pull
1542 was requested. 1542 was requested.
1543 1543
1544 Currently only local repositories are supported. 1544 Currently only local repositories are supported.
1545 """ 1545 """
1546 source = ui.expandpath(source, repo.root) 1546 source = ui.expandpath(source)
1547 other = hg.repository(ui, source) 1547 other = hg.repository(ui, source)
1548 if not other.local(): 1548 if not other.local():
1549 raise util.Abort(_("incoming doesn't work for remote repositories yet")) 1549 raise util.Abort(_("incoming doesn't work for remote repositories yet"))
1550 o = repo.findincoming(other) 1550 o = repo.findincoming(other)
1551 if not o: 1551 if not o:
1728 default push repo. These are the changesets that would be pushed 1728 default push repo. These are the changesets that would be pushed
1729 if a push was requested. 1729 if a push was requested.
1730 1730
1731 See pull for valid source format details. 1731 See pull for valid source format details.
1732 """ 1732 """
1733 dest = ui.expandpath(dest, repo.root) 1733 dest = ui.expandpath(dest)
1734 other = hg.repository(ui, dest) 1734 other = hg.repository(ui, dest)
1735 o = repo.findoutgoing(other) 1735 o = repo.findoutgoing(other)
1736 o = repo.changelog.nodesbetween(o)[0] 1736 o = repo.changelog.nodesbetween(o)[0]
1737 if opts['newest_first']: 1737 if opts['newest_first']:
1738 o.reverse() 1738 o.reverse()
1802 SSH requires an accessible shell account on the destination machine 1802 SSH requires an accessible shell account on the destination machine
1803 and a copy of hg in the remote path. With SSH, paths are relative 1803 and a copy of hg in the remote path. With SSH, paths are relative
1804 to the remote user's home directory by default; use two slashes at 1804 to the remote user's home directory by default; use two slashes at
1805 the start of a path to specify it as relative to the filesystem root. 1805 the start of a path to specify it as relative to the filesystem root.
1806 """ 1806 """
1807 source = ui.expandpath(source, repo.root) 1807 source = ui.expandpath(source)
1808 ui.status(_('pulling from %s\n') % (source)) 1808 ui.status(_('pulling from %s\n') % (source))
1809 1809
1810 if opts['ssh']: 1810 if opts['ssh']:
1811 ui.setconfig("ui", "ssh", opts['ssh']) 1811 ui.setconfig("ui", "ssh", opts['ssh'])
1812 if opts['remotecmd']: 1812 if opts['remotecmd']:
1847 ssh://[user@]host[:port][/path] 1847 ssh://[user@]host[:port][/path]
1848 1848
1849 SSH requires an accessible shell account on the destination 1849 SSH requires an accessible shell account on the destination
1850 machine and a copy of hg in the remote path. 1850 machine and a copy of hg in the remote path.
1851 """ 1851 """
1852 dest = ui.expandpath(dest, repo.root) 1852 dest = ui.expandpath(dest)
1853 ui.status('pushing to %s\n' % (dest)) 1853 ui.status('pushing to %s\n' % (dest))
1854 1854
1855 if opts['ssh']: 1855 if opts['ssh']:
1856 ui.setconfig("ui", "ssh", opts['ssh']) 1856 ui.setconfig("ui", "ssh", opts['ssh'])
1857 if opts['remotecmd']: 1857 if opts['remotecmd']: