1285 Repository "heads" are changesets that don't have children |
1285 Repository "heads" are changesets that don't have children |
1286 changesets. They are where development generally takes place and |
1286 changesets. They are where development generally takes place and |
1287 are the usual targets for update and merge operations. |
1287 are the usual targets for update and merge operations. |
1288 """ |
1288 """ |
1289 if opts['rev']: |
1289 if opts['rev']: |
1290 heads = repo.heads(repo.lookup(rev)) |
1290 heads = repo.heads(repo.lookup(opts['rev'])) |
1291 else: |
1291 else: |
1292 heads = repo.heads() |
1292 heads = repo.heads() |
1293 br = None |
1293 br = None |
1294 if opts['branches']: |
1294 if opts['branches']: |
1295 br = repo.branchlookup(list(heads)) |
1295 br = repo.branchlookup(heads) |
1296 for n in heads: |
1296 for n in heads: |
1297 show_changeset(ui, repo, changenode=n, brinfo=br) |
1297 show_changeset(ui, repo, changenode=n, brinfo=br) |
1298 |
1298 |
1299 def identify(ui, repo): |
1299 def identify(ui, repo): |
1300 """print information about the working copy |
1300 """print information about the working copy |
2239 ('u', 'user', None, _('print user who committed change'))], |
2239 ('u', 'user', None, _('print user who committed change'))], |
2240 "hg grep [OPTION]... PATTERN [FILE]..."), |
2240 "hg grep [OPTION]... PATTERN [FILE]..."), |
2241 "heads": |
2241 "heads": |
2242 (heads, |
2242 (heads, |
2243 [('b', 'branches', None, _('find branch info')), |
2243 [('b', 'branches', None, _('find branch info')), |
2244 ('r', 'rev', None, _('show only heads descendants from rev'))], |
2244 ('r', 'rev', "", _('show only heads which are descendants of rev'))], |
2245 _('hg heads [-b] [-r <rev>]')), |
2245 _('hg heads [-b] [-r <rev>]')), |
2246 "help": (help_, [], _('hg help [COMMAND]')), |
2246 "help": (help_, [], _('hg help [COMMAND]')), |
2247 "identify|id": (identify, [], _('hg identify')), |
2247 "identify|id": (identify, [], _('hg identify')), |
2248 "import|patch": |
2248 "import|patch": |
2249 (import_, |
2249 (import_, |