Jump to content

Branch ownership after fast-import


Recommended Posts

Doing the fast import to our new install resulted in all the branches losing their owners. Can this be changed and the original owners regained?

If not how can I change the owner I of the imported branches? The branches imported under my account with me as the owner and when I set a query in the GUI for my branches everything is shaded/color for me. At a minimum I want the ownership changed to our admin account so going forward my ownerships are correct.

Link to comment
Share on other sites

You were correct it wasn't the find command failing it was the for command because it was written to presume our branch names didn't have spaces in them. The updated command sets that resolved the problem were:

Output the branch names with quotes around them: cm find branches --format="\"{name}\"" --nototal > out.txt

By default the for command uses spaces and tabs as the delimiter, bad if your branch names contain spaces. Since we exported the filenames above with quotes we can use the usebackq option and no delimiters to get the full branch name with: for /f "usebackq delims=" %i in (out.txt) do cm setowner -user=Admin br:%i

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...