Show More
@@ -1135,7 +1135,7 b' class revlogfilestorage(object):' | |||||
1135 | """File storage when using revlogs.""" |
|
1135 | """File storage when using revlogs.""" | |
1136 |
|
1136 | |||
1137 | def file(self, path): |
|
1137 | def file(self, path): | |
1138 |
if path |
|
1138 | if path.startswith(b'/'): | |
1139 | path = path[1:] |
|
1139 | path = path[1:] | |
1140 |
|
1140 | |||
1141 | return filelog.filelog(self.svfs, path) |
|
1141 | return filelog.filelog(self.svfs, path) | |
@@ -1146,7 +1146,7 b' class revlognarrowfilestorage(object):' | |||||
1146 | """File storage when using revlogs and narrow files.""" |
|
1146 | """File storage when using revlogs and narrow files.""" | |
1147 |
|
1147 | |||
1148 | def file(self, path): |
|
1148 | def file(self, path): | |
1149 |
if path |
|
1149 | if path.startswith(b'/'): | |
1150 | path = path[1:] |
|
1150 | path = path[1:] | |
1151 |
|
1151 | |||
1152 | return filelog.narrowfilelog(self.svfs, path, self._storenarrowmatch) |
|
1152 | return filelog.narrowfilelog(self.svfs, path, self._storenarrowmatch) |
@@ -845,7 +845,7 b' def _makematcher(repo, revs, wopts):' | |||||
845 | # slowpath; otherwise, we can turn off the slowpath |
|
845 | # slowpath; otherwise, we can turn off the slowpath | |
846 | if slowpath: |
|
846 | if slowpath: | |
847 | for path in match.files(): |
|
847 | for path in match.files(): | |
848 |
if path |
|
848 | if not path or path in repo.store: | |
849 | break |
|
849 | break | |
850 | else: |
|
850 | else: | |
851 | slowpath = False |
|
851 | slowpath = False |
@@ -102,6 +102,41 b' log on directory' | |||||
102 | summary: c |
|
102 | summary: c | |
103 |
|
103 | |||
104 |
|
104 | |||
|
105 | log empty path (or repo root) of slow path shouldn't crash (issue6478) | |||
|
106 | ||||
|
107 | $ hg log -ql1 '' inexistent | |||
|
108 | 4:7e4639b4691b | |||
|
109 | $ hg log -ql1 . inexistent | |||
|
110 | 4:7e4639b4691b | |||
|
111 | $ hg log -ql1 "`pwd`" inexistent | |||
|
112 | 4:7e4639b4691b | |||
|
113 | ||||
|
114 | $ hg log -ql1 '' e | |||
|
115 | 4:7e4639b4691b | |||
|
116 | $ hg log -ql1 . e | |||
|
117 | 4:7e4639b4691b | |||
|
118 | $ hg log -ql1 "`pwd`" e | |||
|
119 | 4:7e4639b4691b | |||
|
120 | ||||
|
121 | log -f empty path (or repo root) shouldn't crash | |||
|
122 | ||||
|
123 | $ hg log -qfl1 '' inexistent | |||
|
124 | abort: cannot follow file not in parent revision: "inexistent" | |||
|
125 | [255] | |||
|
126 | $ hg log -qfl1 . inexistent | |||
|
127 | abort: cannot follow file not in parent revision: "inexistent" | |||
|
128 | [255] | |||
|
129 | $ hg log -qfl1 "`pwd`" inexistent | |||
|
130 | abort: cannot follow file not in parent revision: "inexistent" | |||
|
131 | [255] | |||
|
132 | ||||
|
133 | $ hg log -qfl1 '' e | |||
|
134 | 4:7e4639b4691b | |||
|
135 | $ hg log -qfl1 . e | |||
|
136 | 4:7e4639b4691b | |||
|
137 | $ hg log -qfl1 "`pwd`" e | |||
|
138 | 4:7e4639b4691b | |||
|
139 | ||||
105 | -X, with explicit path |
|
140 | -X, with explicit path | |
106 |
|
141 | |||
107 | $ hg log a -X a |
|
142 | $ hg log a -X a |
General Comments 0
You need to be logged in to leave comments.
Login now