Mercurial > hg
comparison hgext/graphlog.py @ 10365:d757bc0c7865
interpret repo#name url syntax as branch instead of revision
Previously, the name part of an repo#name url was interpreted as a
revision, similar to using the --rev option. Now it is instead looked
up as a branch first, and if that succeeds all the heads of the branch
will be processed instead of just its tip-most head. If the branch
lookup fails, it will be assumed to be an revision as before (e.g. for
tags).
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Sun, 07 Feb 2010 14:29:07 +0100 |
parents | b9e44cc97355 |
children | a78bfaf988e1 |
comparison
equal
deleted
inserted
replaced
10364:de1e7099d100 | 10365:d757bc0c7865 |
---|---|
274 Nodes printed as an @ character are parents of the working | 274 Nodes printed as an @ character are parents of the working |
275 directory. | 275 directory. |
276 """ | 276 """ |
277 | 277 |
278 check_unsupported_flags(opts) | 278 check_unsupported_flags(opts) |
279 dest, revs, checkout = hg.parseurl( | 279 dest = ui.expandpath(dest or 'default-push', dest or 'default') |
280 ui.expandpath(dest or 'default-push', dest or 'default'), | 280 dest, branches = hg.parseurl(dest) |
281 opts.get('rev')) | 281 revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
282 other = hg.repository(cmdutil.remoteui(ui, opts), dest) | |
282 if revs: | 283 if revs: |
283 revs = [repo.lookup(rev) for rev in revs] | 284 revs = [repo.lookup(rev) for rev in revs] |
284 other = hg.repository(cmdutil.remoteui(ui, opts), dest) | |
285 ui.status(_('comparing with %s\n') % url.hidepassword(dest)) | 285 ui.status(_('comparing with %s\n') % url.hidepassword(dest)) |
286 o = repo.findoutgoing(other, force=opts.get('force')) | 286 o = repo.findoutgoing(other, force=opts.get('force')) |
287 if not o: | 287 if not o: |
288 ui.status(_("no changes found\n")) | 288 ui.status(_("no changes found\n")) |
289 return | 289 return |
303 Nodes printed as an @ character are parents of the working | 303 Nodes printed as an @ character are parents of the working |
304 directory. | 304 directory. |
305 """ | 305 """ |
306 | 306 |
307 check_unsupported_flags(opts) | 307 check_unsupported_flags(opts) |
308 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev')) | 308 source, branches = hg.parseurl(ui.expandpath(source)) |
309 other = hg.repository(cmdutil.remoteui(repo, opts), source) | 309 other = hg.repository(cmdutil.remoteui(repo, opts), source) |
310 revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) | |
310 ui.status(_('comparing with %s\n') % url.hidepassword(source)) | 311 ui.status(_('comparing with %s\n') % url.hidepassword(source)) |
311 if revs: | 312 if revs: |
312 revs = [other.lookup(rev) for rev in revs] | 313 revs = [other.lookup(rev) for rev in revs] |
313 incoming = repo.findincoming(other, heads=revs, force=opts["force"]) | 314 incoming = repo.findincoming(other, heads=revs, force=opts["force"]) |
314 if not incoming: | 315 if not incoming: |