comparison hgext/patchbomb.py @ 8188:f3abe032fc89

add cmdutil.remoteui remoteui sorts out the issues of getting ssh config options from the local repo into the remote one while not copying other options like hooks.
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Apr 2009 16:50:43 -0500
parents 094e0d982c8a
children 32a2a1e244f1
comparison
equal deleted inserted replaced
8187:d2504744e7a5 8188:f3abe032fc89
218 218
219 def outgoing(dest, revs): 219 def outgoing(dest, revs):
220 '''Return the revisions present locally but not in dest''' 220 '''Return the revisions present locally but not in dest'''
221 dest = ui.expandpath(dest or 'default-push', dest or 'default') 221 dest = ui.expandpath(dest or 'default-push', dest or 'default')
222 revs = [repo.lookup(rev) for rev in revs] 222 revs = [repo.lookup(rev) for rev in revs]
223 other = hg.repository(ui, dest) 223 other = hg.repository(cmdutil.remoteui(repo, opts), dest)
224 ui.status(_('comparing with %s\n') % dest) 224 ui.status(_('comparing with %s\n') % dest)
225 o = repo.findoutgoing(other) 225 o = repo.findoutgoing(other)
226 if not o: 226 if not o:
227 ui.status(_("no changes found\n")) 227 ui.status(_("no changes found\n"))
228 return [] 228 return []
256 if not (revs or opts.get('rev') 256 if not (revs or opts.get('rev')
257 or opts.get('outgoing') or opts.get('bundle') 257 or opts.get('outgoing') or opts.get('bundle')
258 or opts.get('patches')): 258 or opts.get('patches')):
259 raise util.Abort(_('specify at least one changeset with -r or -o')) 259 raise util.Abort(_('specify at least one changeset with -r or -o'))
260 260
261 cmdutil.setremoteconfig(ui, opts)
262 if opts.get('outgoing') and opts.get('bundle'): 261 if opts.get('outgoing') and opts.get('bundle'):
263 raise util.Abort(_("--outgoing mode always on with --bundle;" 262 raise util.Abort(_("--outgoing mode always on with --bundle;"
264 " do not re-specify --outgoing")) 263 " do not re-specify --outgoing"))
265 264
266 if opts.get('outgoing') or opts.get('bundle'): 265 if opts.get('outgoing') or opts.get('bundle'):