views:

442

answers:

2
$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...)?

+1  A: 

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.

Blair McMillan
Thanks for the answer! An easy way is to list all files with a certain changelist entry, which can be done (how I learned right now) with `svn status --changelist ignore-on-commit working-copy`. That should do the trick.
Boldewyn
+1  A: 

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]
Bert Huijben
But then I would have to grep all files recursively and call for every file the `svn info`. I think, parsing the output of `svn st --changelist ignore-on-commit` ould be easier.
Boldewyn
You can also use --depth infinity on 'svn info' to show all items. That should be a lot faster if the files are modified. (Status compares, info just shows the metadata)
Bert Huijben