cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Ignore folders from current project/repository

Chandu
1-Newbie

Ignore folders from current project/repository

Hi,

I am new to PTC Integrity Source Control.

Am used to Git/Svn, wherein I can specify an ignore file to ignore specific files/folders providing a pattern.

In my current project there are some files which are already checked in and as a part of restrucring, I want to ignore specific folders (obj, bin folders of a Visual Studio project). I am unable to figure out how to do it.

I tried the Sandbox -> View -> Non Member, but unable to see any items listed there.

Can anyone guide me as to how to ignore folders from an existing repository?

Thanks,

Chandu

14 REPLIES 14
tdalon
4-Participant
(To:Chandu)

Hi

have a look in the User Guide to "Scoped Sandbox".

Chandu
1-Newbie
(To:tdalon)

Thanks Theirry.

The scope is to include members. What if I want to specify exclusion? (members to be included in larger compared to exclusion in my case). Also is there an option lik e.mksignore (similar to .gitignore) in PTC?

Please let me know.

tdalon
4-Participant
(To:Chandu)

The docu is not perfect, you are right.

You can define by command line complex exclude filters like this: --scope=!path:doc/helpAVLab/* --scope=!path:doc/m2html/* - see si_configuresandbox

In the GUI, it is not so flexible but if you click twice on the "Path" checkbox it will become a ! for exclude.

HTH

Chandu
1-Newbie
(To:tdalon)

Thanks tried the command specifying scope with negated paths. No luck...

Wish MKS had a file based ignore settings like gitignore. Do I have any other options?

mrump
14-Alexandrite
(To:Chandu)

HI Chandra,

As Thierry already tried to tell you, "EXCLUDES must be AND combined, INCLUDES must be OR combined".

E.G. if you want to filter all PDF and ZIP files from you Sandbox, you write:

si configuresandbox --scope="!name:*.PDF" --scope="!name:*.ZIP" <sandbox> (this is an combined Exclude filter)

E.G. if you want to filter all files but *.c and *.h files from you Sandbox, you write:

si configuresandbox --scope="name:*.c, name:*.h" <sandbox> (this is an combined Include filter)

If you want to filter certain Subprojects as well, this done like this

si configuresandbox --scope="name:*.c, name:*.h" --scope="!path:project/ignore1" --scope="!path:out/*/ignore2" <sandbox> (this is an combined Exclude/Include filter)

HTH Matthias

Chandu
1-Newbie
(To:mrump)

@Matthias/Thierry, Thanks for your inputs.

Chandu
1-Newbie
(To:Chandu)

@Matthias: This question on SO reflects the issue I have at hand, unfortunately there are no answers, Can you please shed some light on to how to resolve this issue:

http://stackoverflow.com/questions/14858939/mks-cleaning-projects-of-not-useful-files

To summarize my issue:

I have to work on code (.Net based) that was already checked in to the repo.

During the checking all the build related folders were checked in. When I create a local sandbox, I cannot compile my solution as bin and obj folders are marked as readonly and the build command gives me access denied error.

All I want to do it to remove/ignore certain folders/files (.suo, .pdb, .txt, bin folders, obj folders) from the repo so that they are not marked as readonly and also don't want to maintain tepmorary build components in the repository.

I am pretty sure there is a way to achieve this in MKS, just that I am not aware of.

Thanks

mrump
14-Alexandrite
(To:Chandu)

As far as I understand you, all you need to do is to drop members and subprojects you do not want in you repository:

- Temporay user files (*.suo, *.user , …)

- Reproducable build output files (*.obj, anything in “/bin”)

Nothing simpler than that:

For backup reasons: first of all create a checkpoint on you current project!

Then you have to “choose your weapons”

manually

  1. Open you project in a project or sandbox view
  2. Click on the root project and “Expand all”
  3. Press F11 >> the Select Member dialog shows up
  4. In the dialog, enter your criteria to match the members you want to remove >> Press OK
  5. All members matching your criteria should be selected in the view >> Press DEL-key
  6. Enter CP-ID if needed and OK
  7. (optional) drop now empty subprojects as well
  8. DONE

CLI

  1. Call the “si drop” command and use the “--filter” Option to define the criteria for members to be dropped. The way to use/combine the --filter option is exactly the same as the --scope option in the configure sandbox command
  2. DONE

As soon as the members are dropped they will be marked for deletion in your sandbox, so just “Resynchronize” to get rid of them.

Now you should not have any problen in you NET development.

NOTE:

Next time you store a new project in MKS, use the “View Non-Members” dialog in the sandbox view to filter the files and folders BEFORE the first checkin, instead of blindly adding the entire solutions directory 😉

Assuming you use the visual studio (2005 -2012) integration for developing you project, there is an option in the integration where you can configure the path and file to be ignored by the integration. For details see the according manual.

HTH

Chandu
1-Newbie
(To:mrump)

Thanks Matthias.

In future for checking in a new project, given a choice I would rather use GIT for my SCM instead of MKS(so that even if I inherit the code I can easily ignore as et of files/folders and have very good documentation at hand), but thanks for the advice.

ssaul
15-Moonstone
(To:Chandu)

You could also set the "writable" attribute on the members that are modified by the build process.

Maybe this also works for complete folders/subprojects.

Chandu
1-Newbie
(To:ssaul)

Thanks Stephan.

Can this be done through UI or `si makewriable` the only way to go?

ssaul
15-Moonstone
(To:Chandu)

It can be done via "Member/View Member Information/Tab Attributes", add variable "writable", no value.

Chandu
1-Newbie
(To:ssaul)

Thanks Stephan

tdalon
4-Participant
(To:ssaul)

Alt+F2.

ViewSet Customize : CM->Member->Sandbox Member:Edit Working File

Top Tags