Reputation: 82734
$svn diff > patchfile
creates a nice patchfile. However, using TortoiseSVN under Windows I've set some files as being "ignored-on-commit", that is, it is under version control but doesn't get selected, when i do a commit.
TortoiseSVN seemingly handles this via a custom entry in .svn/entries
for this file. Note, that it it isn't a normal SVN property (that is, not fetchable via svn propget).
My problem is, that I want to create a patch file via command line (via Cygwin's bash and SVN port), but this patch file should not include the files with this 'ignore-on-commit' flag.
Has anyone an idea how to do this (besides walking with awk recursively through each .svn/entries
...)?
Upvotes: 1
Views: 2863
Reputation: 496
I've had this problem too, and thus developed a simple command chain to server the need:
svn st | grep -A 1000 'ignore-on-commit' | grep -v 'ignore-on-commit' | sed 's/^.* //g' | xargs svn diff | gvim -
(Assuming there is less then 1000 files modified outside changelist 'ignore-on-commit')
Using this command, files modified outside changelist 'ignore-on-commit' will be diff-ed, and no file modification within 'ignore-on-commit' will be included.
Upvotes: 1
Reputation: 19612
You can see the changelist via 'svn info' on the file. And set/reset changelists via 'svn changelist'
$ svn help cl
changelist (cl): Associate (or dissociate) changelist CLNAME with the named files.
usage: 1. changelist CLNAME TARGET...
2. changelist --remove TARGET...
Valid options:
-q [--quiet] : print nothing, or only summary information
-R [--recursive] : descend recursively, same as --depth=infinity
--depth ARG : limit operation by depth ARG ('empty', 'files',
'immediates', or 'infinity')
--remove : remove changelist association
--targets ARG : pass contents of file ARG as additional args
--changelist ARG : operate only on members of changelist ARG
[aliases: --cl]
Upvotes: 1
Reputation: 5349
Apparently it's a special changelist entry. As for how to then ignore the file/s from the command line, it doesn't look like there's a particularly easy way.
Upvotes: 2