comparison mercurial/commands.py @ 15993:0b05e0bfdc1c stable

scmutil: unify some 'no changes found' messages This keeps the wording more consistent for secret csets
author Matt Mackall <mpm@selenic.com>
date Wed, 25 Jan 2012 17:14:08 -0600
parents 85ec8036d0b9
children f1208827df7c
comparison
equal deleted inserted replaced
15992:963c8a553524 15993:0b05e0bfdc1c
981 raise util.Abort(_("--base is incompatible with specifying " 981 raise util.Abort(_("--base is incompatible with specifying "
982 "a destination")) 982 "a destination"))
983 common = [repo.lookup(rev) for rev in base] 983 common = [repo.lookup(rev) for rev in base]
984 heads = revs and map(repo.lookup, revs) or revs 984 heads = revs and map(repo.lookup, revs) or revs
985 cg = repo.getbundle('bundle', heads=heads, common=common) 985 cg = repo.getbundle('bundle', heads=heads, common=common)
986 outgoing = None
986 else: 987 else:
987 dest = ui.expandpath(dest or 'default-push', dest or 'default') 988 dest = ui.expandpath(dest or 'default-push', dest or 'default')
988 dest, branches = hg.parseurl(dest, opts.get('branch')) 989 dest, branches = hg.parseurl(dest, opts.get('branch'))
989 other = hg.peer(repo, opts, dest) 990 other = hg.peer(repo, opts, dest)
990 revs, checkout = hg.addbranchrevs(repo, other, branches, revs) 991 revs, checkout = hg.addbranchrevs(repo, other, branches, revs)
992 outgoing = discovery.findcommonoutgoing(repo, other, 993 outgoing = discovery.findcommonoutgoing(repo, other,
993 onlyheads=heads, 994 onlyheads=heads,
994 force=opts.get('force')) 995 force=opts.get('force'))
995 cg = repo.getlocalbundle('bundle', outgoing) 996 cg = repo.getlocalbundle('bundle', outgoing)
996 if not cg: 997 if not cg:
997 if 'outgoing' in locals() and outgoing.excluded: 998 scmutil.nochangesfound(ui, outgoing and outgoing.excluded)
998 repo.ui.status(_("no changes found but %i secret changesets\n")
999 % len(outgoing.excluded))
1000 else:
1001 ui.status(_("no changes found\n"))
1002 return 1 999 return 1
1003 1000
1004 bundletype = opts.get('type', 'bzip2').lower() 1001 bundletype = opts.get('type', 'bzip2').lower()
1005 btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'} 1002 btypes = {'none': 'HG10UN', 'bzip2': 'HG10BZ', 'gzip': 'HG10GZ'}
1006 bundletype = btypes.get(bundletype) 1003 bundletype = btypes.get(bundletype)