equal
deleted
inserted
replaced
5867 [('', 'remote', None, _('check for push and pull'))], '[--remote]') |
5867 [('', 'remote', None, _('check for push and pull'))], '[--remote]') |
5868 def summary(ui, repo, **opts): |
5868 def summary(ui, repo, **opts): |
5869 """summarize working directory state |
5869 """summarize working directory state |
5870 |
5870 |
5871 This generates a brief summary of the working directory state, |
5871 This generates a brief summary of the working directory state, |
5872 including parents, branch, commit status, and available updates. |
5872 including parents, branch, commit status, phase and available updates. |
5873 |
5873 |
5874 With the --remote option, this will check the default paths for |
5874 With the --remote option, this will check the default paths for |
5875 incoming and outgoing changes. This can be time-consuming. |
5875 incoming and outgoing changes. This can be time-consuming. |
5876 |
5876 |
5877 Returns 0 on success. |
5877 Returns 0 on success. |
5994 ui.write(_('update: %d new changesets (update)\n') % new) |
5994 ui.write(_('update: %d new changesets (update)\n') % new) |
5995 else: |
5995 else: |
5996 # i18n: column positioning for "hg summary" |
5996 # i18n: column positioning for "hg summary" |
5997 ui.write(_('update: %d new changesets, %d branch heads (merge)\n') % |
5997 ui.write(_('update: %d new changesets, %d branch heads (merge)\n') % |
5998 (new, len(bheads))) |
5998 (new, len(bheads))) |
|
5999 |
|
6000 t = [] |
|
6001 draft = len(repo.revs('draft()')) |
|
6002 if draft: |
|
6003 t.append(_('%d draft') % draft) |
|
6004 secret = len(repo.revs('secret()')) |
|
6005 if secret: |
|
6006 t.append(_('%d secret') % secret) |
|
6007 |
|
6008 if parents: |
|
6009 parentphase = max(p.phase() for p in parents) |
|
6010 else: |
|
6011 parentphase = phases.public |
|
6012 |
|
6013 if draft or secret: |
|
6014 ui.status(_('phases: %s (%s)\n') % (', '.join(t), |
|
6015 phases.phasenames[parentphase])) |
|
6016 else: |
|
6017 ui.note(_('phases: (%s)\n') % phases.phasenames[parentphase]) |
5999 |
6018 |
6000 cmdutil.summaryhooks(ui, repo) |
6019 cmdutil.summaryhooks(ui, repo) |
6001 |
6020 |
6002 if opts.get('remote'): |
6021 if opts.get('remote'): |
6003 needsincoming, needsoutgoing = True, True |
6022 needsincoming, needsoutgoing = True, True |