Jump to content

Ignoring specific line in specific file


mjensen

Recommended Posts

Is there a way to ignore a ignore specific line in specific file? Otherwise is a way to say whichever version of the file is fine for merging? 

In our Unity project we set the project version to match what cs we are working on, which gives a lot of merge conflicts...

If there is no built in feature to deal with a known recurring conflict, is there any good workaround?
We are thinking of setting up a pre-merge trigger that sets the value to 1 or something like that, but would much rather use a existing feature instead.

 

Link to comment
Share on other sites

Hi,

Why are are you editing the file content to match the cs you re working one? Why don't you use a different approach like using "attributes"? Could you describe the details of your workflow to understand why are you doing it this way?

Do you need to keep under version control the file where you set the project version if then, you don't want to merge these changes? You could add this file to the hidden changes list (or keep it as private) so this way, you are not facing merge conflicts with it.

Regards,

Carlos.

Link to comment
Share on other sites

I honestly agree that there should be a better way to do it that doesn't generate all those conflicts... 

The workflow is that that we want to use the cs as version number when we build in with unity. It works well when we use TeamCity to build as it discards whatever changes is made when it builds, but if we want to build manually Unity reads from project settings what the version number is. Which is then saved and causes conflicts.

There are workarounds which should be possible, but if Plastic had a way to simply ignore a given line it would be easier :) 

 

Link to comment
Share on other sites

Quote

The workflow is that that we want to use the cs as version number when we build in with unity. It works well when we use TeamCity to build as it discards whatever changes is made when it builds, but if we want to build manually Unity reads from project settings what the version number is. Which is then saved and causes conflicts.

Why don't you run a query "cm find changeset..." instead of manually typing the changeset id inside the file content? The same happens if you need to query any changeset/branch metadata information:

https://www.plasticscm.com/documentation/cmfind/plastic-scm-version-control-query-system-guide

Not sure if you are aware of our mergebots feature. It allows to automate the branch intergation and it's based on the branch attribute value:

https://www.plasticscm.com/mergebot-devops

Quote

There are workarounds which should be possible, but if Plastic had a way to simply ignore a given line it would be easier :) 

We are considring a new feature that allows to shelve/checkin individual lines or hunks as opposed to the entire file.

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...