Mercurial > public > mercurial-scm > hg-stable
diff contrib/hgit @ 396:8f8bb77d560e
Show revisions in diffs like CVS, based on a patch from Goffredo Baroncelli.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Show revisions in diffs like CVS, based on a patch from Goffredo Baroncelli.
Changes from the original patch:
- - Use 'diff -r ...' instead of 'hg diff -r ...' to support filetype detection
by at least file(1) and vim.
- - Adjusted tests for this change.
- - Some cleanups.
manifest hash: 5f37d1ef75ea7f4e48b53f02371053ba54fb70f8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCsyZzW7P1GVgWeRoRAqczAJ479lR9Z289sP+VH5L+N7pQRU14SACfUueq
88ABloIR3VyRIa4qbujnZio=
=Vva9
-----END PGP SIGNATURE-----
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 17 Jun 2005 20:37:23 +0100 |
parents | 1cb3d9d5119e |
children | d8abb687d501 688d03d6997a |
line wrap: on
line diff
--- a/contrib/hgit Fri Jun 17 11:03:44 2005 -0800 +++ b/contrib/hgit Fri Jun 17 20:37:23 2005 +0100 @@ -10,7 +10,7 @@ import time, sys, signal from mercurial import hg, mdiff, fancyopts, commands, ui -def difftree(args, repo): +def difftree(args, ui, repo): def __difftree(repo, files = None, node1 = None, node2 = None): def date(c): return time.asctime(time.gmtime(float(c[2].split(' ')[0]))) @@ -61,7 +61,7 @@ revs.append(repo.lookup(args[1])) args = args[2:] if doptions['patch']: - commands.dodiff(repo, "", args, *revs) + commands.dodiff(ui, repo, "", args, *revs) else: __difftree(repo, args, *revs) @@ -236,10 +236,10 @@ repo = hg.repository(ui = u) if cmd == "diff-tree": - difftree(args, repo) + difftree(args, u, repo) elif cmd == "cat-file": - catfile(args, ui, repo) + catfile(args, u, repo) elif cmd == "rev-tree": revtree(args, repo)