Committing file deletions to svn repository whilst ignoring some other local mods
I have svn repository where I have scheduled some files and folders to be moved in the repository with svn mv. I also have some files that are peers of the files to be moved that have local modifications of which I only want a subset of those files to be committed along with the moves.
e.g. the output of svn st
would look like:
D foo/bar
D foo/bar/a.txt
D foo/bar/b.txt
M foo/exclude.txt
M foo/include.txt
A foo/whiz/bar
A + foo/whiz/bar/c.txt
A + foo/whiz/bar/d.txt
To commit to the moves to the repository, I would need to perform the commit on foo
but that would also commit the modifications to foo/exclude.txt
and foo/include.txt
. How would I commit only the deletions/additions as a result of the move plus the mods to foo/include.txt
whilst excluding foo/exclude.txt
?
I have a feeling the answer lies with 开发者_StackOverflowthe --depth
argument to svn ci
but it's not clear to me how it will operate.
Why not commit the individual files rather than the tree?
$ svn ci foo/bar
$ svn ci foo/whiz
...
With SVN, that behaviour is usually undesired. The short answer is, don't do it.
But of course ther are other ways around it (with SVN):
- Branch out and then merge back later (painful if you aren't familiar with the process)
- Delete
foo/exclude.txt
on the SVN by usingsvn delete --keep-local
would work too, but it would also mean that file will become unversioned until yousvn add
it again.
What's your use case? Why do you need this behaviour?
精彩评论