Skip to content

Commit 11642e0

Browse files
authored
Set username for S/R commits if provided (#424)
Before this change, we set the username in the mercurial.ini file only when a repo was cloned. There are situations where we want to pass the `user` option to a Send/Receive process as well. +semver:minor
1 parent 431da63 commit 11642e0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/LfMergeBridge/LanguageForgeSendReceiveActionHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ void IBridgeActionTypeHandler.StartWorking(IProgress progress, Dictionary<string
167167
syncOptions.RepositorySourcesToTry.Clear(); // Get rid of any default ones, since LF only sends off to the internet (Language Depot).
168168
// We use the generic creation code here to make testing easier. In the real world we will only create "HttpRepositoryPath".
169169
syncOptions.RepositorySourcesToTry.Add(repositoryAddress);
170+
var user = options.ContainsKey(LfMergeBridgeUtilities.user) ? options[LfMergeBridgeUtilities.user] : null;
171+
if (user != null) hgRepository.SetUserNameInIni(user, progress);
170172

171173
progress.WriteVerbose("Syncing");
172174
var syncResults = synchronizer.SyncNow(syncOptions);

0 commit comments

Comments
 (0)