# HG changeset patch # User mason@suse.com # Date 1121794846 18000 # Node ID dda2585728474fe4320ba7deec808ecb0c1b393a # Parent 7dae73778114fedef91b6d4711f25da4f844933b Fix hgit usage of repo.changes and fancyopts to reflect current hg api diff -r 7dae73778114 -r dda258572847 contrib/hgit --- a/contrib/hgit Sun Jul 17 08:39:44 2005 +0100 +++ b/contrib/hgit Tue Jul 19 12:40:46 2005 -0500 @@ -18,7 +18,7 @@ if node2: change = repo.changelog.read(node2) mmap2 = repo.manifest.read(change[0]) - (c, a, d) = repo.diffrevs(node1, node2) + (c, a, d, u) = repo.changes(node1, node2) def read(f): return repo.file(f).read(mmap2[f]) date2 = date(change) else: @@ -51,8 +51,7 @@ doptions = {} opts = [('p', 'patch', None, 'patch'), ('r', 'recursive', None, 'recursive')] - args = fancyopts.fancyopts(args, opts, doptions, - 'hg diff-tree [options] sha1 sha1') + args = fancyopts.fancyopts(args, opts, doptions) if len(args) < 2: help() @@ -61,7 +60,7 @@ revs.append(repo.lookup(args[1])) args = args[2:] if doptions['patch']: - commands.dodiff(ui, repo, "", args, *revs) + commands.dodiff(sys.stdout, ui, repo, args, *revs) else: __difftree(repo, args, *revs) @@ -87,8 +86,7 @@ def catfile(args, ui, repo): doptions = {} opts = [('s', 'stdin', None, 'stdin')] - args = fancyopts.fancyopts(args, opts, doptions, - 'hg cat-file type sha1') + args = fancyopts.fancyopts(args, opts, doptions) # in stdin mode, every line except the commit is prefixed with two # spaces. This way the our caller can find the commit without magic @@ -209,8 +207,7 @@ doptions = {} opts = [('c', 'commit', None, 'commit'), ('n', 'max-nr', 0, 'max-nr')] - args = fancyopts.fancyopts(args, opts, doptions, - 'hg rev-list') + args = fancyopts.fancyopts(args, opts, doptions) if doptions['commit']: full = "commit" else: