forked from SRombauts/UEPlasticPlugin
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new View Locks window similar to the recent View Branches #107
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRombautsU
commented
Jan 18, 2024
•
edited
edited
- Add a new View Locks window similar to the recent View Branches
- Fix existing lock list parser to filter upfront by --repository
- Refactor FSmartLockInfoParser to use the new FPlasticSourceControlLock class
- NOTE: --dateformat was added to smartlocks a couple of releases later in version 11.0.16.8133
- New "GetLocks" operation, and binding to the existing PlasticSourceControlUtils::RunListSmartLocks()
- Implement OnReleaseLocksClicked() and OnRemovedLocksClicked() with ExecuteUnlock()...
- Also register for any source control change to detect new local locks on check-out, and release of them on check-in
- Also display the current branch in the View locks window as it's important in the context
- Micro optimization with reserve allocation on the XML branch parser
- Change the "Unlock" operation to uses strings for ItemIds so they can include a branch spec: #br:
- Refactor ParseFileinfoResults() to handle multiple matching locks in case of multiple destination branches
- If there are multiple locks matching for a single path, concatenate all string informations (like the branch & owner) but leave the ItmeId to invalid if there are more than one: there would be no way to know which one to unlock from the context menu. Unlocking in such a case require using the View Locks window instead for disambiguation.
- FPlasticSourceControlState::CanCheckout() now let the user try to checkout even if an asset is already checked-out elsewhere As with multiple destination branches it is possible to have as many locks on the same asset as destination branches.
SRombautsU
force-pushed
the
1004409-view-locks-window
branch
8 times, most recently
from
January 25, 2024 15:09
9743fdf
to
867e1f3
Compare
SRombautsU
force-pushed
the
1004409-view-locks-window
branch
6 times, most recently
from
January 29, 2024 17:46
0c9c06c
to
4639b34
Compare
… in version 11.0.16.8133
…ntrolUtils::RunListSmartLocks()
…ecuteUnlock() Apply the same wording decided for the Unity Plugin, to both the new View Locks window but also the existing Locks context menu
… on check-out, and release of them on check-in
…rtant in the context
so they can include a branch spec: <ItemId>#br:<BranchName>
…case of multiple destination branches If there are multiple locks matching for a single path, concatenate all string informations (like the branch & owner) but leave the ItmeId to invalid if there are more than one: there would be no way to know which one to unlock from the context menu. Unlocking in such a case require using the View Locks window instead for disambiguation.
…ckout even if an asset is already checked-out elsewhere As with multiple destination branches it is possible to have as many locks on the same asset as destination branches. Note: Ideally we would want to check explicitly if the other lock is "on the same destination branch" as the current branch, but that's overly complex and not possible currently with cm.
SRombautsU
force-pushed
the
1004409-view-locks-window
branch
from
January 29, 2024 17:53
4639b34
to
40cd6db
Compare
Also updated the Revision Control menu to show tht View Locks entry under the View Branches
SRombautsU
force-pushed
the
1004409-view-locks-window
branch
from
February 1, 2024 09:45
9ab21b2
to
20e643b
Compare
…fix for the Unlock not updating file states A) It now uses an exclusive if/else structure to differentiate the two use case, and simplify the case 2: 1. The View Locks window works with object specs using ItemIds and Branch names 2. While the context "Unlock" menu only fills in the Files (from Asset Paths given by Content Browser) B) It now directly use ObjectSpecs already correctly formatted
… the Files variable It's required to update status of files after the Unlock operation has been executed
SRombautsU
force-pushed
the
1004409-view-locks-window
branch
3 times, most recently
from
February 2, 2024 16:39
e16c4ab
to
6ecbbea
Compare
…ment "--branch=" The unlock operation works on a per-branch basis when multiple Lock destinations are involved, so we have to call "cm lock unlock" as many time with the correct set of locks!
…ningful changes to the Editor Now PlasticSourceControlUtils::UpdateCachedStates() only reports that the cache was updated if the state changed in a meaningful way, useful to the Editor Mainly for the purpose of updating Content Browser overlay icons
SRombautsU
force-pushed
the
1004409-view-locks-window
branch
2 times, most recently
from
February 5, 2024 09:53
d97fe5b
to
a67db35
Compare
… appropriate InvalidateLocksCache() Works with a with a Timestamp on one hand, and an InvalidateLocksCache() method to force refreshes after specific operations (CheckOut, CheckIn, Revert[All/Unchanged], Unlock) and when the user manually refreshes the Lock view
SRombautsU
force-pushed
the
1004409-view-locks-window
branch
from
February 5, 2024 10:40
a67db35
to
32ea377
Compare
juliomaqueda
approved these changes
Feb 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @SRombautsU!
SRombautsU
added a commit
that referenced
this pull request
Feb 19, 2024
… PlasticSCM/1004409-view-locks-window
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.