comparison mercurial/commands.py @ 10390:f163775e36e0

summary: various fixes, add a test fix breakage from recent parseurl changes fix reporting of resolved fix reporting of update in certain cases
author Matt Mackall <mpm@selenic.com>
date Mon, 08 Feb 2010 11:04:38 +0100
parents 6dc25b01e170
children 4612cded5176
comparison
equal deleted inserted replaced
10389:6dc25b01e170 10390:f163775e36e0
3004 if branch != 'default': 3004 if branch != 'default':
3005 ui.write(m) 3005 ui.write(m)
3006 else: 3006 else:
3007 ui.status(m) 3007 ui.status(m)
3008 3008
3009 st = list(repo.status(unknown=True))[:7] 3009 st = list(repo.status(unknown=True))[:6]
3010 ms = merge_.mergestate(repo) 3010 ms = merge_.mergestate(repo)
3011 st.append([f for f in ms if f == 'u']) 3011 st.append([f for f in ms if ms[f] == 'u'])
3012 labels = [_('%d modified'), _('%d added'), _('%d removed'), 3012 labels = [_('%d modified'), _('%d added'), _('%d removed'),
3013 _('%d deleted'), _('%d unknown'), _('%d ignored'), 3013 _('%d deleted'), _('%d unknown'), _('%d ignored'),
3014 _('%d unresolved')] 3014 _('%d unresolved')]
3015 t = [] 3015 t = []
3016 for s, l in zip(st, labels): 3016 for s, l in zip(st, labels):
3036 ui.write(_('commit: %s\n') % t.strip()) 3036 ui.write(_('commit: %s\n') % t.strip())
3037 3037
3038 # all ancestors of branch heads - all ancestors of parent = new csets 3038 # all ancestors of branch heads - all ancestors of parent = new csets
3039 new = [0] * len(repo) 3039 new = [0] * len(repo)
3040 cl = repo.changelog 3040 cl = repo.changelog
3041 for a in [cl.rev(n) for n in bheads]:
3042 new[a] = 1
3041 for a in cl.ancestors(*[cl.rev(n) for n in bheads]): 3043 for a in cl.ancestors(*[cl.rev(n) for n in bheads]):
3042 new[a] = 1 3044 new[a] = 1
3045 for a in [p.rev() for p in parents]:
3046 if a >= 0:
3047 new[a] = 0
3043 for a in cl.ancestors(*[p.rev() for p in parents]): 3048 for a in cl.ancestors(*[p.rev() for p in parents]):
3044 new[a] = 0 3049 new[a] = 0
3045 new = sum(new) 3050 new = sum(new)
3046 3051
3047 if new == 0: 3052 if new == 0:
3069 other = hg.repository(cmdutil.remoteui(repo, {}), dest) 3074 other = hg.repository(cmdutil.remoteui(repo, {}), dest)
3070 ui.debug('comparing with %s\n' % url.hidepassword(dest)) 3075 ui.debug('comparing with %s\n' % url.hidepassword(dest))
3071 repo.ui.pushbuffer() 3076 repo.ui.pushbuffer()
3072 o = repo.findoutgoing(other) 3077 o = repo.findoutgoing(other)
3073 repo.ui.popbuffer() 3078 repo.ui.popbuffer()
3074 o = repo.changelog.nodesbetween(o, revs)[0] 3079 o = repo.changelog.nodesbetween(o, None)[0]
3075 if o: 3080 if o:
3076 t.append(_('%d outgoing') % len(o)) 3081 t.append(_('%d outgoing') % len(o))
3077 3082
3078 if t: 3083 if t:
3079 ui.write(_('remote: %s\n') % (', '.join(t))) 3084 ui.write(_('remote: %s\n') % (', '.join(t)))