sgrassie Posted March 18, 2022 Report Share Posted March 18, 2022 Is there a way from the command line to find what the currently active branch in the repo is? Link to comment Share on other sites More sharing options...
ollieblanks Posted March 22, 2022 Report Share Posted March 22, 2022 Hi, I believe the command you want is cm showselector. To find out more about this command please type in cm showselector --help. Hope that helps! 1 Link to comment Share on other sites More sharing options...
Patrice Beauvais Posted March 24, 2022 Report Share Posted March 24, 2022 cm status --header is not bad too since it returns the last synched changeset at same time too.. 1 Link to comment Share on other sites More sharing options...
Wolfram Posted April 7, 2022 Report Share Posted April 7, 2022 On 3/24/2022 at 2:03 PM, Patrice Beauvais said: cm status --header is not bad too since it returns the last synched changeset at same time too.. But it may not return the branch name at all, if the selector is on a changeset (for example, you right-clicked on a changeset (instead of the branch) and did a "Switch workspace to..."). Note that IF (and only if) the selector is on a changeset, "cm showselector" does print the associated cs number as well. Link to comment Share on other sites More sharing options...
ollieblanks Posted April 12, 2022 Report Share Posted April 12, 2022 The command cm status --machinereadable --header will always return the changeset number as the second output parameter. With this information you can run cm log cs:## --csformat={branch} to return the branch name. (Only caveat is this solution will not work on Gluon workspaces, as they don't technically point to a single changeset!) Hope this helps! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now