Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 1440:bf109779f48b
Fix relative pull in a subdir
author | tonfa@arakou.lan |
---|---|
date | Mon, 24 Oct 2005 17:41:45 -0700 |
parents | 65cbe22b03fa |
children | 3a0b69ea5708 |
comparison
equal
deleted
inserted
replaced
1439:65cbe22b03fa | 1440:bf109779f48b |
---|---|
589 | 589 |
590 Unlike import/export, this exactly preserves all changeset | 590 Unlike import/export, this exactly preserves all changeset |
591 contents including permissions, rename data, and revision history. | 591 contents including permissions, rename data, and revision history. |
592 """ | 592 """ |
593 f = open(fname, "wb") | 593 f = open(fname, "wb") |
594 dest = ui.expandpath(dest) | 594 dest = ui.expandpath(dest, repo.root) |
595 other = hg.repository(ui, dest) | 595 other = hg.repository(ui, dest) |
596 o = repo.findoutgoing(other) | 596 o = repo.findoutgoing(other) |
597 cg = repo.changegroup(o) | 597 cg = repo.changegroup(o) |
598 | 598 |
599 try: | 599 try: |
1378 pull repo. These are the changesets that would be pulled if a pull | 1378 pull repo. These are the changesets that would be pulled if a pull |
1379 was requested. | 1379 was requested. |
1380 | 1380 |
1381 Currently only local repositories are supported. | 1381 Currently only local repositories are supported. |
1382 """ | 1382 """ |
1383 source = ui.expandpath(source) | 1383 source = ui.expandpath(source, repo.root) |
1384 other = hg.repository(ui, source) | 1384 other = hg.repository(ui, source) |
1385 if not other.local(): | 1385 if not other.local(): |
1386 raise util.Abort(_("incoming doesn't work for remote repositories yet")) | 1386 raise util.Abort(_("incoming doesn't work for remote repositories yet")) |
1387 o = repo.findincoming(other) | 1387 o = repo.findincoming(other) |
1388 if not o: | 1388 if not o: |
1547 | 1547 |
1548 Show changesets not found in the specified destination repo or the | 1548 Show changesets not found in the specified destination repo or the |
1549 default push repo. These are the changesets that would be pushed | 1549 default push repo. These are the changesets that would be pushed |
1550 if a push was requested. | 1550 if a push was requested. |
1551 """ | 1551 """ |
1552 dest = ui.expandpath(dest) | 1552 dest = ui.expandpath(dest, repo.root) |
1553 other = hg.repository(ui, dest) | 1553 other = hg.repository(ui, dest) |
1554 o = repo.findoutgoing(other) | 1554 o = repo.findoutgoing(other) |
1555 o = repo.newer(o) | 1555 o = repo.newer(o) |
1556 if opts['newest_first']: | 1556 if opts['newest_first']: |
1557 o.reverse() | 1557 o.reverse() |
1623 SSH requires an accessible shell account on the destination machine | 1623 SSH requires an accessible shell account on the destination machine |
1624 and a copy of hg in the remote path. With SSH, paths are relative | 1624 and a copy of hg in the remote path. With SSH, paths are relative |
1625 to the remote user's home directory by default; use two slashes at | 1625 to the remote user's home directory by default; use two slashes at |
1626 the start of a path to specify it as relative to the filesystem root. | 1626 the start of a path to specify it as relative to the filesystem root. |
1627 """ | 1627 """ |
1628 source = ui.expandpath(source) | 1628 source = ui.expandpath(source, repo.root) |
1629 ui.status(_('pulling from %s\n') % (source)) | 1629 ui.status(_('pulling from %s\n') % (source)) |
1630 | 1630 |
1631 if opts['ssh']: | 1631 if opts['ssh']: |
1632 ui.setconfig("ui", "ssh", opts['ssh']) | 1632 ui.setconfig("ui", "ssh", opts['ssh']) |
1633 if opts['remotecmd']: | 1633 if opts['remotecmd']: |
1663 ssh://[user@]host[:port][/path] | 1663 ssh://[user@]host[:port][/path] |
1664 | 1664 |
1665 SSH requires an accessible shell account on the destination | 1665 SSH requires an accessible shell account on the destination |
1666 machine and a copy of hg in the remote path. | 1666 machine and a copy of hg in the remote path. |
1667 """ | 1667 """ |
1668 dest = ui.expandpath(dest) | 1668 dest = ui.expandpath(dest, repo.root) |
1669 ui.status('pushing to %s\n' % (dest)) | 1669 ui.status('pushing to %s\n' % (dest)) |
1670 | 1670 |
1671 if ssh: | 1671 if ssh: |
1672 ui.setconfig("ui", "ssh", ssh) | 1672 ui.setconfig("ui", "ssh", ssh) |
1673 if remotecmd: | 1673 if remotecmd: |