comparison mercurial/commands.py @ 3707:67f44b825784

Removed unused ui parameter from revpair/revrange and fix its users.
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 22 Nov 2006 23:02:28 +0100
parents 0d810798acb1
children ad3d5b4367cb
comparison
equal deleted inserted replaced
3706:0d810798acb1 3707:67f44b825784
833 833
834 Without the -a option, diff will avoid generating diffs of files 834 Without the -a option, diff will avoid generating diffs of files
835 it detects as binary. With -a, diff will generate a diff anyway, 835 it detects as binary. With -a, diff will generate a diff anyway,
836 probably with undesirable results. 836 probably with undesirable results.
837 """ 837 """
838 node1, node2 = cmdutil.revpair(ui, repo, opts['rev']) 838 node1, node2 = cmdutil.revpair(repo, opts['rev'])
839 839
840 fns, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) 840 fns, matchfn, anypats = cmdutil.matchpats(repo, pats, opts)
841 841
842 patch.diff(repo, node1, node2, fns, match=matchfn, 842 patch.diff(repo, node1, node2, fns, match=matchfn,
843 opts=patch.diffopts(ui, opts)) 843 opts=patch.diffopts(ui, opts))
869 With the --switch-parent option, the diff will be against the second 869 With the --switch-parent option, the diff will be against the second
870 parent. It can be useful to review a merge. 870 parent. It can be useful to review a merge.
871 """ 871 """
872 if not changesets: 872 if not changesets:
873 raise util.Abort(_("export requires at least one changeset")) 873 raise util.Abort(_("export requires at least one changeset"))
874 revs = cmdutil.revrange(ui, repo, changesets) 874 revs = cmdutil.revrange(repo, changesets)
875 if len(revs) > 1: 875 if len(revs) > 1:
876 ui.note(_('exporting patches:\n')) 876 ui.note(_('exporting patches:\n'))
877 else: 877 else:
878 ui.note(_('exporting patch:\n')) 878 ui.note(_('exporting patch:\n'))
879 patch.export(repo, map(repo.lookup, revs), template=opts['output'], 879 patch.export(repo, map(repo.lookup, revs), template=opts['output'],
1434 else: 1434 else:
1435 limit = sys.maxint 1435 limit = sys.maxint
1436 count = 0 1436 count = 0
1437 1437
1438 if opts['copies'] and opts['rev']: 1438 if opts['copies'] and opts['rev']:
1439 endrev = max(cmdutil.revrange(ui, repo, opts['rev'])) + 1 1439 endrev = max(cmdutil.revrange(repo, opts['rev'])) + 1
1440 else: 1440 else:
1441 endrev = repo.changelog.count() 1441 endrev = repo.changelog.count()
1442 rcache = {} 1442 rcache = {}
1443 ncache = {} 1443 ncache = {}
1444 dcache = [] 1444 dcache = []
2118 I = ignored (not shown by default) 2118 I = ignored (not shown by default)
2119 = the previous added file was copied from here 2119 = the previous added file was copied from here
2120 """ 2120 """
2121 2121
2122 all = opts['all'] 2122 all = opts['all']
2123 node1, node2 = cmdutil.revpair(ui, repo, opts.get('rev')) 2123 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
2124 2124
2125 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) 2125 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts)
2126 cwd = (pats and repo.getcwd()) or '' 2126 cwd = (pats and repo.getcwd()) or ''
2127 modified, added, removed, deleted, unknown, ignored, clean = [ 2127 modified, added, removed, deleted, unknown, ignored, clean = [
2128 [util.pathto(cwd, x) for x in n] 2128 [util.pathto(cwd, x) for x in n]