Mercurial > hg
changeset 11508:fbab0875fd09 stable
log: fix missing diff output for hg log -p in sub directory
prep(ctx, fns) receives paths relative to repository root, not cwd.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 02 Jul 2010 23:49:06 +0900 |
parents | 35e2d453cf0d |
children | 2eaaad99f2f0 |
files | mercurial/commands.py tests/test-log tests/test-log.out |
diffstat | 3 files changed, 55 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Jul 04 17:05:17 2010 +0900 +++ b/mercurial/commands.py Fri Jul 02 23:49:06 2010 +0900 @@ -2521,7 +2521,7 @@ revmatchfn = None if opts.get('patch') or opts.get('stat'): - revmatchfn = cmdutil.match(repo, fns) + revmatchfn = cmdutil.match(repo, fns, default='path') displayer.show(ctx, copies=copies, matchfn=revmatchfn)
--- a/tests/test-log Sun Jul 04 17:05:17 2010 +0900 +++ b/tests/test-log Fri Jul 02 23:49:06 2010 +0900 @@ -181,4 +181,8 @@ echo '% log -b 2' hg log -b 2 +echo '% log -p --cwd dir (in subdir)' +mkdir dir +hg log -p --cwd dir + exit 0
--- a/tests/test-log.out Sun Jul 04 17:05:17 2010 +0900 +++ b/tests/test-log.out Fri Jul 02 23:49:06 2010 +0900 @@ -464,3 +464,53 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: commit on default +% log -p --cwd dir (in subdir) +changeset: 3:f5d8de11c2e2 +branch: test +tag: tip +parent: 1:d32277701ccb +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: commit on test + +diff -r d32277701ccb -r f5d8de11c2e2 c +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/c Thu Jan 01 00:00:00 1970 +0000 +@@ -0,0 +1,1 @@ ++c + +changeset: 2:c3a4f03cc9a7 +parent: 0:24427303d56f +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: commit on default + +diff -r 24427303d56f -r c3a4f03cc9a7 c +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/c Thu Jan 01 00:00:00 1970 +0000 +@@ -0,0 +1,1 @@ ++c + +changeset: 1:d32277701ccb +branch: test +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: commit on test + +diff -r 24427303d56f -r d32277701ccb b +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/b Thu Jan 01 00:00:00 1970 +0000 +@@ -0,0 +1,1 @@ ++b + +changeset: 0:24427303d56f +user: test +date: Thu Jan 01 00:00:00 1970 +0000 +summary: commit on default + +diff -r 000000000000 -r 24427303d56f a +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/a Thu Jan 01 00:00:00 1970 +0000 +@@ -0,0 +1,1 @@ ++a +