843 else: |
843 else: |
844 ui.status(_('the backout changeset is a new head - ' |
844 ui.status(_('the backout changeset is a new head - ' |
845 'do not forget to merge\n')) |
845 'do not forget to merge\n')) |
846 ui.status(_('(use "backout -m" if you want to auto-merge)\n')) |
846 ui.status(_('(use "backout -m" if you want to auto-merge)\n')) |
847 |
847 |
848 def bundle(ui, repo, fname, dest="default-push", **opts): |
848 def bundle(ui, repo, fname, dest=None, **opts): |
849 """create a changegroup file |
849 """create a changegroup file |
850 |
850 |
851 Generate a compressed changegroup file collecting all changesets |
851 Generate a compressed changegroup file collecting all changesets |
852 not found in the other repository. |
852 not found in the other repository. |
853 |
853 |
858 extension is ".hg". |
858 extension is ".hg". |
859 |
859 |
860 Unlike import/export, this exactly preserves all changeset |
860 Unlike import/export, this exactly preserves all changeset |
861 contents including permissions, rename data, and revision history. |
861 contents including permissions, rename data, and revision history. |
862 """ |
862 """ |
863 dest = ui.expandpath(dest) |
863 dest = ui.expandpath(dest or 'default-push', dest or 'default') |
864 other = hg.repository(ui, dest) |
864 other = hg.repository(ui, dest) |
865 o = repo.findoutgoing(other, force=opts['force']) |
865 o = repo.findoutgoing(other, force=opts['force']) |
866 cg = repo.changegroup(o, 'bundle') |
866 cg = repo.changegroup(o, 'bundle') |
867 write_bundle(cg, fname) |
867 write_bundle(cg, fname) |
868 |
868 |
2045 marked as changed for the next commit and a commit must be |
2045 marked as changed for the next commit and a commit must be |
2046 performed before any further updates are allowed. |
2046 performed before any further updates are allowed. |
2047 """ |
2047 """ |
2048 return doupdate(ui, repo, node=node, merge=True, **opts) |
2048 return doupdate(ui, repo, node=node, merge=True, **opts) |
2049 |
2049 |
2050 def outgoing(ui, repo, dest="default-push", **opts): |
2050 def outgoing(ui, repo, dest=None, **opts): |
2051 """show changesets not found in destination |
2051 """show changesets not found in destination |
2052 |
2052 |
2053 Show changesets not found in the specified destination repository or |
2053 Show changesets not found in the specified destination repository or |
2054 the default push location. These are the changesets that would be pushed |
2054 the default push location. These are the changesets that would be pushed |
2055 if a push was requested. |
2055 if a push was requested. |
2056 |
2056 |
2057 See pull for valid destination format details. |
2057 See pull for valid destination format details. |
2058 """ |
2058 """ |
2059 dest = ui.expandpath(dest) |
2059 dest = ui.expandpath(dest or 'default-push', dest or 'default') |
2060 if opts['ssh']: |
2060 if opts['ssh']: |
2061 ui.setconfig("ui", "ssh", opts['ssh']) |
2061 ui.setconfig("ui", "ssh", opts['ssh']) |
2062 if opts['remotecmd']: |
2062 if opts['remotecmd']: |
2063 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
2063 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
2064 |
2064 |
2177 elif opts['rev']: |
2177 elif opts['rev']: |
2178 revs = [other.lookup(rev) for rev in opts['rev']] |
2178 revs = [other.lookup(rev) for rev in opts['rev']] |
2179 modheads = repo.pull(other, heads=revs, force=opts['force']) |
2179 modheads = repo.pull(other, heads=revs, force=opts['force']) |
2180 return postincoming(ui, repo, modheads, opts['update']) |
2180 return postincoming(ui, repo, modheads, opts['update']) |
2181 |
2181 |
2182 def push(ui, repo, dest="default-push", **opts): |
2182 def push(ui, repo, dest=None, **opts): |
2183 """push changes to the specified destination |
2183 """push changes to the specified destination |
2184 |
2184 |
2185 Push changes from the local repository to the given destination. |
2185 Push changes from the local repository to the given destination. |
2186 |
2186 |
2187 This is the symmetrical operation for pull. It helps to move |
2187 This is the symmetrical operation for pull. It helps to move |
2199 ssh://[user@]host[:port][/path] |
2199 ssh://[user@]host[:port][/path] |
2200 |
2200 |
2201 Look at the help text for the pull command for important details |
2201 Look at the help text for the pull command for important details |
2202 about ssh:// URLs. |
2202 about ssh:// URLs. |
2203 """ |
2203 """ |
2204 dest = ui.expandpath(dest) |
2204 dest = ui.expandpath(dest or 'default-push', dest or 'default') |
2205 |
2205 |
2206 if opts['ssh']: |
2206 if opts['ssh']: |
2207 ui.setconfig("ui", "ssh", opts['ssh']) |
2207 ui.setconfig("ui", "ssh", opts['ssh']) |
2208 if opts['remotecmd']: |
2208 if opts['remotecmd']: |
2209 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
2209 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |