Jump to content

How to enforce Line Endings?


Recommended Posts

Does PlasticSCM have an option to enforce, require, or auto-convert line endings upon checkin?

We have non-technical folks using tools that generate files with mixed line endings that we want to strip out on an automated basis. At the very least, we'd like to block checkins that have mixed line endings.

Link to comment
Share on other sites

Hi Andy,

I'm afraid that this feature is not available but Plastic provides the users to create their custom "before-checkin" triggers. Not sure if it helps:

https://www.plasticscm.com/documentation/triggers/plastic-scm-version-control-triggers-guide

Not sure about the editor you are using but you may be able to also handle it there:

https://stackoverflow.com/questions/48692741/how-to-make-all-line-endings-eols-in-all-files-in-visual-studio-code-unix-lik

Regards,

Carlos.

 

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

The trigger mechanism is linked to a specific Plastic operation eg: before-checkin and then, you in your trigger code can parse the files involved in the checkin and perform any necessary operation before the chckin is performed.

The "before-checkin" trigger standard input includes the file paths:

https://www.plasticscm.com/documentation/triggers/plastic-scm-version-control-triggers-guide

Regards,

Carlos.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...