Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 06/11/2020 in all areas

  1. 1 point
    I made a video showing the workflow in TortoiseHg Workbench. Here's a description of how it would have avoided the key pain points I had with Plastic SCM. I've created a dummy project with some text files checked in. For demonstration purposes, the contents of three of these files are identical, to confuse automatic detection of renames. Move files using Explorer to a different folder Switch to TortoiseHg Workbench Perform manual refresh to detect changes in the workspace TortoiseHg now lists four removed files (in red, prefixed with "!") and four added files (in pink, prefixed with "?") I can use two different methods for telling the SCM about renamed and moved files. First, I'm going to show the quick manual method, which has no equivalent in Plastic. Right-click on an added file to bring up the context menu Select "Was renamed from" This brings up a submenu that lists all deleted files I can now quickly pick the correct file from the submenu No automatic move detection is performed at any point - this process would be fast even with thousands of files. Naturally finding the correct target from the submenu would be slow for the user, but I believe the submenu uses some kind of a quick sorting method, perhaps based on filename similarity, because I often find the correct files near the top of the list The second method uses automatic move detection, similar to Plastic SCM. However, this is a user-initiated action on the workspace, rather than being a global preference that must be either on or off at all times - again reducing the amount of unnecessary processing compared to Plastic. Select any number of added files Right-click to bring up the context menu Select "Detect Renames..." This brings up a separate window for processing renames Just like Plastic, I can now adjust the similarity percentage and then run contents comparison. However, unlike Plastic, I am able to adjust the percentage and run the detection multiple times. Each time, it will only run on the files selected in the left pane, rather than all files (which would be really slow). Detection results are listed in the right pane I can now select the matches I want, and manually accept them. If this was a real situation, some matches would have a higher percentage, and these would be prioritised, just like when Plastic chooses the best match. However, unlike Plastic, if the similarity percentage gives the wrong match (for example, a file was both renamed and changed, as happens often with Unity .meta files), I can still quickly fix it by manually choosing a different match. The only way to do this in Plastic is to globally turn off move detection, refresh the workspace, and manually try to find the correct files from among all changes (which are no longer easy to find due to the move detection being turned off). I can keep making matches within this window until I'm satisfied, then close the window Once the window is closed, TortoiseHg will refresh the workspace - in Plastic SCM, the workspace would have been unnecessarily refreshed several times, which can take minutes when there are hundreds of moved files. Hope this helps clarify the workflow that is missing from Plastic. tortoisehg_detect_renames.mp4
  2. 1 point
  3. 1 point
    Use DateTime.ParseExact.- Converts the specified string representation of a date and time to its DateTime equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly. ParseExact and TryParseExact allows to use a custom format string. DateTime date = DateTime.ParseExact(strDate, "dd/MM/yyyy", CultureInfo.InvariantCulture); The IFormatProvider parameter specifies the culture to use to parse the date. Unless your string comes from the user, you should pass CultureInfo.InvariantCulture. If the string does come from the user, you should pass CultureInfo.CurrentCulture, which will use the settings that the user specified in Regional Options in Control Panel.
  4. 1 point
    Thanks - that seems like a workflow which would work for my use-case. However, since we are using plastic cloud - I can't use shelving . I'll reapply my changes manually for now. Which can also be a step where code quality can improve, because I'm now recreating/reintroducing the end result while knowing where I am going. But when shelving gets supported for cloud I'll try it out
  5. 1 point
    I shared this request with the team. We already internally commented some improvements about how the user can fine tune the move detections performed by Plastic. It would be a nicefeature but I'm afraid it's not scheduled for the near future. Regards, Carlos.
  6. 1 point
    Although you're past your issue, I figure I might as well mention this for anybody else that comes across this thread looking for a solution in a similar situation: in a scenario where you have hundreds of moves, the least-effort solution is probably to check-in the moves that were correct, then turn off auto-detect and check-in the other ones in a separate changeset. While it might sound messy to have two commits where you could have one, ideally, these moves are being performed on a task-branch, so you would still have a single commit on your main-line. Of course, this is still a work-around. While I can understand from a software architecture perspective why Plastic does not allow you to selectively undo auto-moves (because the auto-moves are transient), it would be much better if Plastic SCM allowed auto-moves to be "staged" (or "locked-in"), just like how you can change items from Private to Added.
×
×
  • Create New...