Hello,
I often find myself in situations where I can’t merge my branch back to main “because you don’t load the latest version in the branch ‘/main’”, or “the file X is not in sync with the changeset you are working on”. Ideally in these situations I would want to be able to manually resolve these potential conflicts, or simply ignore/undo the files causing issues (but the whole merge must be undone as a whole, and undoing only the contents of the file does not seem to be enough). It also looks like if I run into this I cannot submit the pending changes to a new branch.
The fallback would be to shelve → undo → unshelve → commit, but it seems like the same restrictions apply to shelving for some reason, so often if I can’t merge/push to new branch, I also cannot shelve. Is there a way to “force” a shelve operation? My fallback the last two situations where I’ve given up trying to resolve the issue, is to zip relevant folder → undo → unzip folder → commit, which feels very cumbersome.
Any advice on how to best approach these situations?
Hi,
I’m afraid that if you want to use the smart locks feature, that is the only workflow available at the moment.
That feature prevents you from submitting content without the latest version of a file, so no content is lost.
If you need to add changes that are not related, you can exclude certain branches from the feature from the Unity Gaming Services dashboard.
Here you have some documentation on the feature:
https://docs.unity.com/ugs/en-us/manual/devops/manual/smart-locks
And here is a blogpost talking about them:
Best,
Héber.
Hello,
I’ve tried setting up branch exclusions in the DevOps version control dashboard (we’re using cloud version), but files still get retained locks on those branches. Here’s how I’ve set it up, I might have the wrong syntax?
But there’s still retained locks being generated on a branch called /main/exp-something - are there any other settings I might have missed? Is it possible to disable the smart lock feature entirely?
It would be nice to be able to force shelve locally regardless of lock status, though (behind a large warning dialog is fine).
Hi,
Is the “-” part of the branch name? If it is not, or the branch name is not complete, that may be the case.
I’m afraid it is not possible for users to disable the smart locks feature, sorry.
Best,
Héber.
The “-” is part of the branch name, I’m naming branches so they look like this (full name): /main/exp-speed-adjustments
Hi @trond-agens ,
Please try to use /main/exp-* to make the branch included in the excluding branch.
1 Like
Thanks, that seems to work! I no longer get retained locks on those branches.