0

I cannot find documentation of how exactly to set the line ending settings for a workspace using p4 from the command line. I know how to do this from p4v but I need to do it programmatically in a script and so using p4v isn't an option.

I know I can query the current state using the command

p4 client -o

I have found documentation about a setting LineEnd and the different values it can be set to of local, unix, mac, win, and share but I can't figure out or find documentation telling me how to actually issue the command to pass a new value.

Any help would be much appreciated.

Brian
  • 3,264
  • 4
  • 30
  • 43

1 Answers1

2

The basic idea is you do "p4 client -o" to get the current client spec, modify it, and then pass the modified version to "p4 client -i".

p4 client -o | sed -e "s/LineEnd:.*/LineEnd: unix/" | p4 client -i

Substitute your own value of LineEnd and/or your own sed replacement.

Samwise
  • 68,105
  • 3
  • 30
  • 44