Show More
@@ -2877,11 +2877,14 b' def status(ui, repo, *pats, **opts):' | |||
|
2877 | 2877 | if f in copy: |
|
2878 | 2878 | ui.write(' %s%s' % (repo.pathto(copy[f], cwd), end)) |
|
2879 | 2879 | |
|
2880 | def summary(ui, repo): | |
|
2880 | def summary(ui, repo, **opts): | |
|
2881 | 2881 | """summarize working directory state |
|
2882 | 2882 | |
|
2883 | 2883 | This generates a brief summary of the working directory state, |
|
2884 | 2884 | including parents, branch, commit status, and available updates. |
|
2885 | ||
|
2886 | With the --remote option, this will check the default paths for | |
|
2887 | incoming and outgoing changes. This can be time-consuming. | |
|
2885 | 2888 | """ |
|
2886 | 2889 | |
|
2887 | 2890 | ctx = repo[None] |
@@ -2948,6 +2951,34 b' def summary(ui, repo):' | |||
|
2948 | 2951 | ui.write(_('update: %d new changesets, %d branch heads (merge)\n') % |
|
2949 | 2952 | (new, len(bheads))) |
|
2950 | 2953 | |
|
2954 | if opts.get('remote'): | |
|
2955 | t = [] | |
|
2956 | source, revs, checkout = hg.parseurl(ui.expandpath('default'), | |
|
2957 | opts.get('rev')) | |
|
2958 | other = hg.repository(cmdutil.remoteui(repo, {}), source) | |
|
2959 | ui.debug('comparing with %s\n' % url.hidepassword(source)) | |
|
2960 | repo.ui.pushbuffer() | |
|
2961 | common, incoming, rheads = repo.findcommonincoming(other) | |
|
2962 | repo.ui.popbuffer() | |
|
2963 | if incoming: | |
|
2964 | t.append(_('1 or more incoming')) | |
|
2965 | ||
|
2966 | dest, revs, checkout = hg.parseurl( | |
|
2967 | ui.expandpath('default-push', 'default')) | |
|
2968 | other = hg.repository(cmdutil.remoteui(repo, {}), dest) | |
|
2969 | ui.debug('comparing with %s\n' % url.hidepassword(dest)) | |
|
2970 | repo.ui.pushbuffer() | |
|
2971 | o = repo.findoutgoing(other) | |
|
2972 | repo.ui.popbuffer() | |
|
2973 | o = repo.changelog.nodesbetween(o, revs)[0] | |
|
2974 | if o: | |
|
2975 | t.append(_('%d outgoing') % len(o)) | |
|
2976 | ||
|
2977 | if t: | |
|
2978 | ui.write(_('remote: %s\n') % (', '.join(t))) | |
|
2979 | else: | |
|
2980 | ui.status(_('remote: (synced)\n')) | |
|
2981 | ||
|
2951 | 2982 | def tag(ui, repo, name1, *names, **opts): |
|
2952 | 2983 | """add one or more tags for the current or given revision |
|
2953 | 2984 | |
@@ -3580,7 +3611,8 b' table = {' | |||
|
3580 | 3611 | [('u', 'untrusted', None, _('show untrusted configuration options'))], |
|
3581 | 3612 | _('[-u] [NAME]...')), |
|
3582 | 3613 | "^summary|sum": |
|
3583 |
(summary, |
|
|
3614 | (summary, | |
|
3615 | [('', 'remote', None, _('check for push and pull'))], '[-p]'), | |
|
3584 | 3616 | "^status|st": |
|
3585 | 3617 | (status, |
|
3586 | 3618 | [('A', 'all', None, _('show status of all files')), |
General Comments 0
You need to be logged in to leave comments.
Login now