Mercurial > hg
comparison mercurial/commands.py @ 10330:d8c0e6c43791
commands: fix up stupidly untested heads simplification
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sat, 06 Feb 2010 12:47:24 +0100 |
parents | 0798a3d5f812 |
children | ec5240a22f4a |
comparison
equal
deleted
inserted
replaced
10329:ae0ae8691e47 | 10330:d8c0e6c43791 |
---|---|
1429 decode, encode = encoding.fromlocal, encoding.tolocal | 1429 decode, encode = encoding.fromlocal, encoding.tolocal |
1430 branches = set(repo[decode(br)].branch() for br in branchrevs) | 1430 branches = set(repo[decode(br)].branch() for br in branchrevs) |
1431 heads = [] | 1431 heads = [] |
1432 visitedset = set() | 1432 visitedset = set() |
1433 for b in branches: | 1433 for b in branches: |
1434 bheads = repo.branchheads(branch, start, closed=closed) | 1434 bheads = repo.branchheads(b, start, closed=closed) |
1435 if not bheads: | 1435 if not bheads: |
1436 encodedbranch = encode(b) | 1436 encodedbranch = encode(b) |
1437 if not opts.get('rev'): | 1437 if not opts.get('rev'): |
1438 ui.warn(_("no open branch heads on branch %s\n") | 1438 ui.warn(_("no open branch heads on branch %s\n") |
1439 % encodedbranch) | 1439 % encodedbranch) |
1440 elif branch != branchrev: | |
1441 ui.warn(_("no changes on branch %s containing %s are " | |
1442 "reachable from %s\n") | |
1443 % (encodedbranch, branchrev, opts.get('rev'))) | |
1444 else: | 1440 else: |
1445 ui.warn(_("no changes on branch %s are reachable from %s\n") | 1441 ui.warn(_("no changes on branch %s are reachable from %s\n") |
1446 % (encodedbranch, opts.get('rev'))) | 1442 % (encodedbranch, opts.get('rev'))) |
1447 if hideinactive: | 1443 if hideinactive: |
1448 bheads = [bhead for bhead in bheads if bhead in dagheads] | 1444 bheads = [bhead for bhead in bheads if bhead in dagheads] |