Skip to content

change languagedepot.org url to lexbox.org #342

@hahn-kev

Description

@hahn-kev

this will change the domain used in the dialog, but we also want to change any pre existing projects. This will require hooking this ini check code

internal void CheckAndUpdateHgrc()
{
CheckMercurialIni();
if (!_hgrcUpdateNeeded)
return;
try
{
lock(_pathToRepository) // Avoid crash if two threads try to Sync simultaneously
{
EnsureChorusMergeAddedToHgrc();
EnsureCacertsIsSet();
var extensions = HgExtensions;
EnsureTheseExtensionsAndFormatSet(extensions);
_hgrcUpdateNeeded = false;
}
}
catch (Exception error)
{
throw new ApplicationException($"Failed to set up extensions for the repository: {error.Message}", error);
}
}

if the domain is Ld then change it to lexbox. Be careful to make sure it's not changing the domain in other cases.


I'd also like to try and change how the protocol logic works so we can drop all the domains except lexbox. This will require changing

public static bool IsKnownResumableRepository(string uri)
{
// REVIEW (Hasso) 2021.01: this seems to apply only to HTTP repositories, and is now stored in a separate property of
// ServerSettingsModel.cs. Perhaps we should move IsResumable to HttpRepositoryAddress and this logic to determine
// resumability to ServerSettingsModel.
return uri.ToLower().Contains("resumable");
}

and any code that calls it to use a stored value of what protocol to use for a project (or it might be global?).


For HG It will also require changing the assumption that the url is https:://{host}/{projectId} to https:://{host}/hg/{projectId} (project id being the chorus term, lexbox calls it project code)

ProjectId = WebUtility.UrlDecode(UrlHelper.GetPathAfterHost(url));

and
return $"https://{Host}/{WebUtility.UrlEncode(ProjectId)}";

though there may be other places.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions