I want to ignore all files whithin the Binaries folder except dll files in that folder.
# Ignore all files and folders
Binaries/*
# Dont ignore dll files
!Binaries/*/*.dll
With this, all files and folders get ignored. Even dll files.
But i want to allow dll files. For example
Binaries/Win64/someName.dll
Should NOT be ignored.
Please help. P4 ignore file name is ".gitignore"
I think you want:
# Ignore everything under Binaries except .dll files
Binaries/
!Binaries/**.dll
Testing this out gets me:
C:\Perforce\test>p4 add -n Binaries/foo
//stream/main/Binaries/foo#1 - opened for add
c:\Perforce\test\Binaries\foo - ignored file can't be added.
C:\Perforce\test>p4 add -n Binaries/Win64/someName.dll
//stream/main/Binaries/Win64/someName.dll#1 - opened for add
which seems correct for your use case.
Related
I know there has been a huge discussion about this but I have not found something this specific.
Im trying to copy all .key files in /home// directory
This does not work
/usr/bin/rsync -auPA --include="*/*.key" --exclude="*" /home/* /tmp/test
This works but it copies over unwanted empty directories like /home/uname/Documents
/usr/bin/rsync -auPA --include="*/" --include="*.key" --exclude="*" /home /tmp/test
Basically what i need for rsync to do is to copy only files with .key extension and only create necessarily folders that contain .key files
I think you are looking for the -m option. From the man page:
-m, --prune-empty-dirs
This option tells the receiving rsync to get rid of empty directories from the file-list, including nested directories that
have no non-directory children. This is useful for avoiding the creation of a bunch of useless directories when the sending
rsync is recursively scanning a hierarchy of files using include/exclude/filter rules.
Note that the use of transfer rules, such as the --min-size option, does not affect what goes into the file list, and thus
does not leave directories empty, even if none of the files in a directory match the transfer rule.
Because the file-list is actually being pruned, this option also affects what directories get deleted when a delete is active.
However, keep in mind that excluded files and directories can prevent existing items from being deleted due to an exclude both
hiding source files and protecting destination files. See the perishable filter-rule option for how to avoid this.
You can prevent the pruning of certain empty directories from the file-list by using a global "protect" filter. For instance,
this option would ensure that the directory "emptydir" was kept in the file-list:
--filter ’protect emptydir/’
Here’s an example that copies all .pdf files in a hierarchy, only creating the necessary destination directories to hold the
.pdf files, and ensures that any superfluous files and directories in the destination are removed (note the hide filter of
non-directories being used instead of an exclude):
rsync -avm --del --include=’*.pdf’ -f ’hide,! */’ src/ dest
If you didn’t want to remove superfluous destination files, the more time-honored options of "--include='*/' --exclude='*'"
would work fine in place of the hide-filter (if that is more natural to you).
I have a .p4ignore file and it does the job for the most part but I am trying to ignore certain subfolders but it does not seem to work.
# Ignore .meta, csproj files at the moment
*.meta
.DS_Store
# Ignore these folders
Data
Library
obj
# Ignore these subfolders
Resources/Subfolder1
Resources/Subfolder2
The resources folder is in the same directory as the .p4ignore yet it still checks out Subfolder1 and Subfolder2 into the changelist. It ignores Data, Library and obj. What am I missing?
In my experience, you need to append /** in order to get Perforce to ignore the contents of a directory, so in your example:
Resources/Subfolder1/**
Resources/Subfolder2/**
I would like to remove all svn directories from a zip file. Can not find correct pattern. This is the pattern I tried ".svn/*"
Was able to remove all .class files.
Found pattern. Should work for any directory.
"/.svn/"
Avoid the problem in the first place. Don't create your zip file directly from your working copy. Just use svn export to create a new directory without the .svn directories, and without any unversioned files, and zip that instead.
I tried to pull some changes while I had some files opened in vim, and while committing and merging and the sort, ended up coming up with:
alex#adebian:~/cs4290/p3$ hg status
R test
! project3_framework/protocols/.MI_protocol.cpp.swp
! project3_framework/protocols/.MSI_protocol.cpp.swp
I added a .hgignore file in my project with the following:
syntax: glob
*.cpp.swp
I've since closed my vim session (removing the files) yet the files keep showing up. How do I get mercurail to ignore the .swp files?
! sign means that mercurial cannot find the file that has been already added to the repository. So you need to forget or remove those files at first. After that - they will not appear anymore in the status since you have ignored them.
I agree with zerkms... forget or remove those files to get rid of the !. Also, as you've probably noticed, simply creating a .hgignore file with some content does not go through the repository and remove matching files. If you've added foo.c to your project and then you create the following .hgignore:
syntax: glob
*.c
foo.c will still be a part of the project - you would need to remove it explicitly.
You can use
set directory=c:\\workfiles\\
in your .vimrc to write swap files in a "special" folder
In my NSIS script, I use this line:
File "..\help\*.*"
My problem is that I have the help directory in my subversion repository (its constantly updated as we add new functionality). This means that the help directory contains a .svn directory.
I wish to view the contents of the setup.exe that NSIS created to verify that it does not have the .svn directory.
P.s. I experimented to see if NSIS recursively adds files when wildcards are used. It doesn't. But I want to verify this, hence the question.
These things are typically compressed files.
You could check with 7z/7-zip to open the EXE archive.
As a record, after the comments below,
I'd like to point to my recent notes on the merits of 7-zip at Superuser,
Compressing with RAR vs ZIP
Rather than look at what's in your NSIS exe itself, just exclude the .svn directories so you know they'll never be in there.
Something like this will do the trick:
File /r /x .svn "..\help\*.*"
The /x .svn bit tells NSIS to exclude those directories.
Coincidentally, if you're not using the /r switch, then you're not adding files and folders recursively, so it wouldn't add the .svn subdirectories anyway.
Instead of unzipping, my suggestion is to look at the NSIS compilation log. It will tell you everything about files included. When doing changes in my NSIS scripts I always check the logs to make sure that everything is going according to plan. Streaming the log from the command line to a text file, then read it from your favorite editor.
I use 7zip File Manager and the "Open Inside" command.