MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / VcsMapResource

Method VcsMapResource

radiantcore/map/VcsMapResource.cpp:14–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12{
13
14VcsMapResource::VcsMapResource(const std::string& mapFileUri) :
15 MapResource(vcs::getVcsFilePath(mapFileUri)),
16 _mapFileUri(mapFileUri)
17{
18 assert(vcs::pathIsVcsUri(_mapFileUri));
19
20 auto prefix = vcs::getVcsPrefix(_mapFileUri);
21 _vcsModule = GlobalVersionControlManager().getModuleForPrefix(prefix);
22
23 if (!_vcsModule)
24 {
25 rWarning() << "Unrecognised VCS URI prefix: " << prefix << std::endl;
26 }
27
28 auto infoFilePath = vcs::getVcsFilePath(_mapFileUri);
29 infoFilePath = os::replaceExtension(infoFilePath, game::current::getInfoFileExtension());
30
31 _infoFileUri = vcs::constructVcsFileUri(prefix, vcs::getVcsRevision(_mapFileUri), infoFilePath);
32}
33
34bool VcsMapResource::load()
35{

Callers

nothing calls this directly

Calls 9

getVcsFilePathFunction · 0.85
pathIsVcsUriFunction · 0.85
getVcsPrefixFunction · 0.85
rWarningFunction · 0.85
replaceExtensionFunction · 0.85
getInfoFileExtensionFunction · 0.85
constructVcsFileUriFunction · 0.85
getVcsRevisionFunction · 0.85
getModuleForPrefixMethod · 0.80

Tested by

no test coverage detected