comparison tests/test-log.t @ 21998:739095270f48

log: allow patterns with -f It's not uncommon for a user to want to run log with a pattern or directory name on the history of their current commit. Currently we prevent that, but I can't think of any reason to continue blocking that. This commit removes the restriction and allows 'hg log -f <dir/pat>'
author Durham Goode <durham@fb.com>
date Tue, 22 Jul 2014 22:40:16 -0700
parents be94ed4baa5d
children fab9dda0f2a3
comparison
equal deleted inserted replaced
21997:93c3b3f55d59 21998:739095270f48
76 user: test 76 user: test
77 date: Thu Jan 01 00:00:03 1970 +0000 77 date: Thu Jan 01 00:00:03 1970 +0000
78 summary: c 78 summary: c
79 79
80 80
81 -f, directory 81 -f, non-existent directory
82 82
83 $ hg log -f dir 83 $ hg log -f dir
84 abort: cannot follow file not in parent revision: "dir" 84 abort: cannot follow file not in parent revision: "dir"
85 [255] 85 [255]
86
87 -f, directory
88
89 $ hg up -q 3
90 $ hg log -f dir
91 changeset: 2:f8954cd4dc1f
92 user: test
93 date: Thu Jan 01 00:00:03 1970 +0000
94 summary: c
95
96 -f, directory with --patch
97
98 $ hg log -f dir -p
99 changeset: 2:f8954cd4dc1f
100 user: test
101 date: Thu Jan 01 00:00:03 1970 +0000
102 summary: c
103
104 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
105 --- /dev/null* (glob)
106 +++ b/dir/b* (glob)
107 @@ -0,0 +1,1 @@
108 +a
109
110
111 -f, pattern
112
113 $ hg log -f -I 'dir**' -p
114 changeset: 2:f8954cd4dc1f
115 user: test
116 date: Thu Jan 01 00:00:03 1970 +0000
117 summary: c
118
119 diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
120 --- /dev/null* (glob)
121 +++ b/dir/b* (glob)
122 @@ -0,0 +1,1 @@
123 +a
124
125 $ hg up -q 4
86 126
87 -f, a wrong style 127 -f, a wrong style
88 128
89 $ hg log -f -l1 --style something 129 $ hg log -f -l1 --style something
90 abort: style 'something' not found 130 abort: style 'something' not found