-
Notifications
You must be signed in to change notification settings - Fork 36
Locked files locked for lock requester, release option not available #21
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
Comments
This issue is quite old (sorry about that, covid threw a wrench onto things...), but for googling reference, here's what's happening. @BlurEffect The reason it only shows you a force release is because it doesn't know that you're the same user that locked it. That feature was originally written to match your github username to the username that the github lfs server reports, but Git for Unity doesn't include any GitHub features, and therefore doesn't include the logic to retrieve github usernames to match against what lfs reports. This is also happening on the GitHub for Unity plugin because you're not using a GitHub server, and therefore it has no idea that you are you. The general problem is that
Therefore, matching identities is kinda hard, and this UI is not really well suited for dealing with that. There's hacks I could do, like locking a file for a second just to see who lfs thinks you are, and store that info, but all of that is really brittle and can easily fail. I should probably make the Unlock action always available regardless of whether I think it can work or not, at least that would make a user feel less bad about it, I guess. Regarding the vfx graph not displaying when it's locked, that's an unfortunate side effect of this whole mismatched identity thing, it thinks someone else has locked it. One of features of the whole locking system is for you to be able to be warned about touching things that someone else has locked, so taking that out entirely would remove the purpose of the thing... maybe the easiest way here is for you to just tell the plugin your username on lfs, that way things will work as expected. I'll see what I can do for the next release. |
Shana, Thanks for your hard work on this project! I don't know how to vote for issues, but this is one I'd like to see addressed. I'm not a coder but it doesn't seem that the unlock command needs a username. So maybe like you said the unlock menu item in the right-click project menu and in the Locks tabs could always available, and the user just needs to check the Locks tab to see if the unlock worked. My opinion on the "Asset is Locked" issue is that Unity should never block you from making changes locally. If it knows the asset is locked a pop up warning or an overlay would be better. But that's probably not in the scope of the your project. |
Is there a workaround for this? Some of my team members (on Windows and Mac) are experiencing this issue. The usernames and emails are properly set in |
Description
Hi everbody,
I have added the Git for Unity package to one of my projects (which was already under source control) and while locking seems to work mostly fine, there still is a weird issue with it. My repository is not on GitHub but on Bitbucket within a corporate environment and I am using Unity 2019.3 (but I'm having the same issue with 2019.2). Requesting a lock works fine and it will show me the little icon next to the locked file and the lock will appear in the list of locks. However, when right-clicking the locked element, the "release" option is greyed out and I can only force unlock it, although I am the person that requested the lock. I assume, that I should be able to simply release the lock. In addition, when locking a vfx graph in Unity with your plugin (and possibly other elements?), I am not able to edit the graph since I am getting a "Asset is locked" notification instead of the graph being displayed. Can you please help me with this issue and provide some assistance? As mentioned above, it's a corporate environment with a proxy server and stuff but all the git stuff works fine on the command line. I also opened this issue for the original "Github for Unity" plugin here on Github since I am having the exact same issue with that one.
Steps to Reproduce
Expected behavior: Since I locked the file, I should be able to still edit it and to release the lock
Actual behavior: Release option is greyed out (force release is working though) and element is locked for me although I requested the lock (at least I cannot edit a locked vfx graph, I didn't try this for many different types of objects)
Reproduces how often: Every time
Additional Information
Here is the log file (opening the project, requesting a lock and eventually force releasing it):
git-for-unity - Kopie.log
The text was updated successfully, but these errors were encountered: