The behavior you see is correct, because replacing the last part is a good idea if you want to change the file name.
I would add a backslash at the end of the first part. Then itโs clear that this is a directory, otherwise it can be interpreted as a file.
Uri branches = new Uri(@"https://127.0.0.1:8443/svn/CXB1/Validation/branches/"); Uri testBranch = new Uri(branches, "test"); Console.WriteLine(testBranch);
Get this result:
https://127.0.0.1:8443/svn/CXB1/Validation/branches/test
source share