We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9c2b975 + 2f3a283 commit 3175573Copy full SHA for 3175573
src/model.ts
@@ -184,7 +184,22 @@ export class Model {
184
return;
185
}
186
187
- if (fs.existsSync(path + "/.svn")) {
+ let isSvnFolder = fs.existsSync(path + "/.svn");
188
+
189
+ // If open only a subpath.
190
+ if (!isSvnFolder && level === 0) {
191
+ let pathParts = path.split(/[\\/]/);
192
+ while (pathParts.length > 0) {
193
+ pathParts.pop();
194
+ let topPath = pathParts.join("/") + "/.svn";
195
+ isSvnFolder = fs.existsSync(topPath);
196
+ if (isSvnFolder) {
197
+ break;
198
+ }
199
200
201
202
203
try {
204
const repositoryRoot = await this.svn.getRepositoryRoot(path);
205
0 commit comments