Jump to content


Files that should be ignored getting edited anyway.

ignore windows

  • Please log in to reply
6 replies to this topic

#1 gws

gws

    Newbie

  • Members
  • Pip
  • 5 posts
  • Location904

Posted 22 May 2018 - 03:02 PM

I've got a couple of files in my workspace that Perforce will insist on opening for edit despite my telling it not to. I have %P4IGNORE% set as per documentation and p4.exe recognizes the file, I can tell because p4 ignores shows how all the rules are interpreted and it looks the same as the contents of my .gitignore.

Quote

C:\core\guidewire\Release\5.2\ClaimCenter>p4 ignores
.../.p4root/...
.../.p4root
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/config/web/templates/about/About.html/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/config/web/templates/about/About.html
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/gtest/sandbox/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/plugins/Gosu/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/configuration.iml/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/configuration.iml
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/gradle/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/generated_classes/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/generated/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/deploy/...
c:/core/guidewire/Release/5.2/ClaimCenter/.../build/...
c:/core/guidewire/Release/5.2/ClaimCenter/build/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/gtest/sandbox*/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/gtest/sandbox*
!c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration/...
!c:/core/guidewire/Release/5.2/ClaimCenter/modules/configuration
c:/core/guidewire/Release/5.2/ClaimCenter/modules/*/...
c:/core/guidewire/Release/5.2/ClaimCenter/modules/*
!c:/core/guidewire/Release/5.2/ClaimCenter/modules/...
!c:/core/guidewire/Release/5.2/ClaimCenter/modules
c:/core/guidewire/Release/5.2/ClaimCenter/*/...
c:/core/guidewire/Release/5.2/ClaimCenter/*
c:/core/guidewire/Release/5.2/ClaimCenter/.../.p4client/...
c:/core/guidewire/Release/5.2/ClaimCenter/.p4client/...
c:/core/guidewire/Release/5.2/ClaimCenter/.../.p4client
c:/core/guidewire/Release/5.2/ClaimCenter/.p4client

But I'm all the time having to remove About.html and configuration.iml from my changelists after reconciling lest they get submitted and bother everyone else's workspaces.

Quote

C:\core\guidewire\Release\5.2\ClaimCenter>p4 status ...
modules\configuration\config\web\templates\about\About.html - reconcile to edit //core/guidewire/Release/5.2/ClaimCenter/modules/configuration/config/web/templates/about/About.html#2
modules\configuration\configuration.iml - reconcile to edit //core/guidewire/Release/5.2/ClaimCenter/modules/configuration/configuration.iml#1
(And sure enough those files get picked up by the next 'reconcile' just like 'status' says they will.)

How can I troubleshoot this?

I've tried setting %P4IGNORE% to absolute and relative paths as well as running p4 reconcile from different working directories and variations on p4 reconcile SOMEDIR/..., without success.
These two 'problem' files are the only entries in .gitignore that are not directories; is the syntax really correct?

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1004 posts

Posted 23 May 2018 - 06:35 PM

P4IGNORE only prevents files from being added; if you add a file anyway, it doesn't prevent it from being edited after that point, nor does it prevent it from being synced, etc.

If you remove a local file from your client view, it will be completely invisible to Perforce -- the next time you sync it'll be removed from your workspace, and after that point it will no longer sync, anything you put there can no longer be added, etc.  Remove a file from your client view by running "p4 client" and adding exclusions like:

-//depot/5.2/ClaimCenter/modules/configuration/config/web/templates/about/About.html //client/5.2/ClaimCenter/modules/configuration/config/web/templates/about/About.html

If you're using a stream client, the equivalent is to add to the "Ignored" section in the stream spec.

#3 gws

gws

    Newbie

  • Members
  • Pip
  • 5 posts
  • Location904

Posted 23 May 2018 - 06:58 PM

View PostSambwise, on 23 May 2018 - 06:35 PM, said:

P4IGNORE only prevents files from being added

Okay, that's where I went wrong. Thank you for clarifying.

I'd like one of those two files to be synced and present in the workspace but never submitted. Is there a canonical way to do this? I already have a 'master' workspace that maps the entire depot so I can sync configuration.iml from there, but it feels a bit clunky. And of course one other approach is to throw it in a 'DO NOT SUBMIT THIS CHANGELIST' changelist...

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1004 posts

Posted 23 May 2018 - 08:20 PM

How do you want depot-side modifications to this file to be handled relative to the local changes that you're not submitting?  Do you want them to overwrite your local changes, do you want to ignore them, merge them, handle them on a case-by-case basis...?

If you want the depot changes, do you want that to happen as part of a normal sync or would it be better to have that be a more explicit action?

(I have a few ideas in mind but rather than explaining all of them would prefer to focus on the one that actually fits your use case...)

#5 gws

gws

    Newbie

  • Members
  • Pip
  • 5 posts
  • Location904

Posted 24 May 2018 - 07:41 PM

Well, let's see... a template web page gets the build number and time inserted and that result is written to About.html, so as a build artifact there's no reason to check it in and it utterly doesn't matter whether I have the latest version from the depot (which should not have been updated anyway). So I can exclude that from the workspace, no problem.

configuration.iml, on the other hand, is IntelliJ settings that I've just determined are quite necessary so I can't not have this one. I'l have to investigate further to see exactly what changes are getting saved there; it may be that I should be checking those in after all.

#6 gws

gws

    Newbie

  • Members
  • Pip
  • 5 posts
  • Location904

Posted 26 September 2018 - 07:56 PM

Followup/closure: Adding '-' lines to the client spec to exclude that HTML build artifact has worked perfectly and I don't have to worry about the IDE config file after all.
Thank you @Sambwise for your help.

#7 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1004 posts

Posted 26 September 2018 - 08:10 PM

View Postgws, on 26 September 2018 - 07:56 PM, said:

Followup/closure: Adding '-' lines to the client spec to exclude that HTML build artifact has worked perfectly and I don't have to worry about the IDE config file after all.
Thank you @Sambwise for your help.

Perfect!  That's generally the easiest solution for files like build artifacts that you don't want to version at all.





Also tagged with one or more of these keywords: ignore, windows

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users