Show More
@@ -845,7 +845,7 b' def backout(ui, repo, rev, **opts):' | |||||
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= |
|
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 | |
@@ -860,7 +860,7 b' def bundle(ui, repo, fname, dest="defaul' | |||||
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') | |
@@ -2047,7 +2047,7 b' def merge(ui, repo, node=None, **opts):' | |||||
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= |
|
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 | |
@@ -2056,7 +2056,7 b' def outgoing(ui, repo, dest="default-pus' | |||||
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']: | |
@@ -2179,7 +2179,7 b' def pull(ui, repo, source="default", **o' | |||||
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= |
|
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. | |
@@ -2201,7 +2201,7 b' def push(ui, repo, dest="default-push", ' | |||||
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']) |
@@ -197,12 +197,12 b' class ui(object):' | |||||
197 | if not self.verbose: user = util.shortuser(user) |
|
197 | if not self.verbose: user = util.shortuser(user) | |
198 | return user |
|
198 | return user | |
199 |
|
199 | |||
200 | def expandpath(self, loc): |
|
200 | def expandpath(self, loc, default=None): | |
201 | """Return repository location relative to cwd or from [paths]""" |
|
201 | """Return repository location relative to cwd or from [paths]""" | |
202 | if loc.find("://") != -1 or os.path.exists(loc): |
|
202 | if loc.find("://") != -1 or os.path.exists(loc): | |
203 | return loc |
|
203 | return loc | |
204 |
|
204 | |||
205 | return self.config("paths", loc, loc) |
|
205 | return self.config("paths", loc, default or loc) | |
206 |
|
206 | |||
207 | def write(self, *args): |
|
207 | def write(self, *args): | |
208 | if self.header: |
|
208 | if self.header: |
General Comments 0
You need to be logged in to leave comments.
Login now