# HG changeset patch # User Thomas Arendsen Hein # Date 2005-06-27 05:17:28 # Node ID df9b77f6799804f3d24167a33bc8a681d97344f8 # Parent c5705ab9cebdd3f3e3f0fbf9af8e7ad6b60b330f Make show_changeset show added and deleted files in verbose mode. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Make show_changeset show added and deleted files in verbose mode. manifest hash: 189c2da64862f471b75b9d205907bff86c7423a3 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCv4voW7P1GVgWeRoRAlLaAJsHGWEfNMMfDdsnk9/G9w86nf2I2QCgi4Rc 3HgiUFeTPi71I0tH+SV5Gsc= =/see -----END PGP SIGNATURE----- diff --git a/TODO b/TODO --- a/TODO +++ b/TODO @@ -25,7 +25,6 @@ Commands: - automatic pull fallback to old-http:// - hg init|pull http://example.com doesn't say that no repo was found - hg annotate -u and hgweb annotate with long $EMAIL -- hg -v history doesn't show tkmerge as modified (removed). - hg pull default in a subdir doesn't work, if it is a relative path - optionally only show merges (two parents or parent != changeset-1, etc.) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -123,7 +123,11 @@ def show_changeset(ui, repo, rev=0, chan ui.status("user: %s\n" % changes[1]) ui.status("date: %s\n" % time.asctime( time.localtime(float(changes[2].split(' ')[0])))) - ui.note("files: %s\n" % " ".join(changes[3])) + if ui.verbose: + files = repo.diffrevs(changelog.parents(changenode)[0], changenode) + for key, value in zip(["files:", "files+:", "files-:"], files): + if value: + ui.note("%-12s %s\n" % (key, " ".join(value))) description = changes[4].strip() if description: if ui.verbose: diff --git a/tests/test-rawcommit1.out b/tests/test-rawcommit1.out --- a/tests/test-rawcommit1.out +++ b/tests/test-rawcommit1.out @@ -24,7 +24,7 @@ parent: -1:000000000000000000000000 manifest: 2:f5d7a10be55c91e08fbd4f527ab313aff2761fc6 user: user date: Thu Jan 1 00:00:00 1970 -files: c +files+: c description: 2 @@ -41,7 +41,7 @@ parent: -1:000000000000000000000000 manifest: 3:1102cb6dde652ec2ba8cc2777e464853afa67cef user: user date: Thu Jan 1 00:00:00 1970 -files: b +files-: b description: 3 @@ -91,7 +91,6 @@ parent: 5:f8292b00383d88b470efcb2ea manifest: 6:71c4262e09a89666ee12a92fefa12085aad53243 user: user date: Thu Jan 1 00:00:00 1970 -files: description: 6 @@ -107,7 +106,6 @@ parent: -1:000000000000000000000000 manifest: 7:c15305fbac9dd3f49bffcc17d659b2d06d10b9a2 user: user date: Thu Jan 1 00:00:00 1970 -files: description: 7 diff --git a/tests/test-up-local-change.out b/tests/test-up-local-change.out --- a/tests/test-up-local-change.out +++ b/tests/test-up-local-change.out @@ -50,7 +50,8 @@ tag: tip manifest: 1:1165e8bd193e17ad7d321d846fcf27ff3f412758 user: test date: Thu Jan 1 00:00:00 1970 -files: a b +files: a +files+: b description: 2 @@ -58,7 +59,7 @@ changeset: 0:c19d34741b0a4ced8e4ba74bb manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 user: test date: Thu Jan 1 00:00:00 1970 -files: a +files+: a description: 1