Changeset 9e6c172dbfa8…
Parent c2b9832a7ca6…
by
Changes to one file · Browse files at 9e6c172dbfa8 Showing diff from parent c2b9832a7ca6 Diff from another changeset...
@@ -264,11 +264,25 @@
std::string GetHgRepoRoot(const std::string& path)
{
+ TDEBUG_TRACE("GetHgRepoRoot('" << path << "')");
+
+ if (::PathIsUNCServerShare(path.c_str()))
+ {
+ TDEBUG_TRACE("GetHgRepoRoot: path is UNC share '" << path << "'");
+ return "";
+ }
+
std::string p = IsDirectory(path)? path : DirName(path);
for (;;)
{
std::string tdir = p + "\\.hg";
- if (IsDirectory(tdir))
+ if (::PathIsUNCServerShare(tdir.c_str()))
+ {
+ TDEBUG_TRACE("GetHgRepoRoot: tdir is UNC share '" << tdir << "'");
+ p.clear();
+ break;
+ }
+ else if (IsDirectory(tdir))
break;
std::string oldp = p;
p = DirName(p);
@@ -278,6 +292,8 @@ break;
}
}
+
+ TDEBUG_TRACE("GetHgRepoRoot: returning '" << p << "'");
return p;
}
|
Loading...