You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Christer J. Nyfält" <ch...@welho.com> on 2005/07/03 16:37:17 UTC
Diff, ignore & deleted files
Dear Sirs,
I have switched from CVS to subversion and I'm happy with the increased
functionality.
However there is one little problem that is causing me some trouble.
The scenario is as follows:
- I imported an source of a program to keep track of my local changes.
Things went fine.
- The program uses automake and I had to rebuild the Makefiles.
- I ran svn stat and noticed a lot of M Makefile.in.
- I ran svn diff and noticed that diff was very long and full of changes
concerning Makefile.in files that I rather not see.
- I decided to delete all Makefile.in files from the repository,
svn:ignore them and rebuild them.
An here comes the problem:
The files deleted from the repository and ignored still clutter the diff
if I compare with the original version. I could use --no-diff-deleted,
but there will be occasions when I want to see other deleted files and
old hide the ignored ones.
So is there a way to solve this currently or should I file an issue
request for adding a --no-diff-ignored flag for svn diff?
Yours Sincerely,
Christer Nyfält
--
Christer J. Nyfält <ch...@welho.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Diff, ignore & deleted files
Posted by "Christer J. Nyfält" <ch...@welho.com>.
On Sun, 2005-07-03 at 11:08 -0600, Bob Proulx wrote:
> Christer J. Nyfält wrote:
> > - I ran svn diff and noticed that diff was very long and full of changes
> > concerning Makefile.in files that I rather not see.
> > - I decided to delete all Makefile.in files from the repository,
> > svn:ignore them and rebuild them.
>
> By what exact method did you use to delete those files? I believe
> your problem lies in those details.
>
svn delete Makefile.in
svn commit
automake
svn propedit svn:ignore <dir>
[Added files to hide]
svn commit
> > An here comes the problem:
> > The files deleted from the repository and ignored still clutter the diff
> > if I compare with the original version. I could use --no-diff-deleted,
> > but there will be occasions when I want to see other deleted files and
> > old hide the ignored ones.
> >
old->only
> > So is there a way to solve this currently or should I file an issue
> > request for adding a --no-diff-ignored flag for svn diff?
>
> If they were really deleted then you would not see them in your diff
> and they would not show up as an M in the status. Because you are
> seeing them in your diff I believe you have not really deleted them.
>
It seems that I was unclear.
I have no problems with svn stat and plain svn diff.
The problem comes when I run svn diff -r 6, where 6 is the revision
number of the imported sources that I want to compare with when I
generate patches. Now I either get a lot of junk or the problem that
--no-diff-deleted hides too much.
BTW, is there a way to also hide Property changes in diff output?
--
Christer J. Nyfält <ch...@welho.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Diff, ignore & deleted files
Posted by Bob Proulx <bo...@proulx.com>.
Christer J. Nyfält wrote:
> - I ran svn diff and noticed that diff was very long and full of changes
> concerning Makefile.in files that I rather not see.
> - I decided to delete all Makefile.in files from the repository,
> svn:ignore them and rebuild them.
By what exact method did you use to delete those files? I believe
your problem lies in those details.
> An here comes the problem:
> The files deleted from the repository and ignored still clutter the diff
> if I compare with the original version. I could use --no-diff-deleted,
> but there will be occasions when I want to see other deleted files and
> old hide the ignored ones.
>
> So is there a way to solve this currently or should I file an issue
> request for adding a --no-diff-ignored flag for svn diff?
If they were really deleted then you would not see them in your diff
and they would not show up as an M in the status. Because you are
seeing them in your diff I believe you have not really deleted them.
Because there are differences in your working copy subversion will try
hard not to lose any of those changes. Therefore it is necessary to
make sure those files are not changed with regards to subversion
before performing some of the operations. I can think of at least
three ways to do this. Here is one way off the top of my head.
svn revert $(find . -name Makefile.in -print)
svn rm $(find . -name Makefile.in -print)
svn commit
autoreconf
The revert will make sure that the current files are the same as those
checked in. Otherwise subversion will avoid losing your changes by
refusing the operation. Then schedule those files for remove. Then
commit those changes. Then rebuild your files.
The observant unix/gnu user will realize that by running the find on
the command line I might overflow ARG_MAX and filenames with funny
characters such as spaces and newlines may cause trouble. But I
thought it was more clear that way by way of description. To avoid
any possiblity of overflowing the fixed size buffer for arguments and
avoid any problems with funny characters in filenames use find and
xargs together.
find . -name Makefile.in -print0 | xargs -r0 svn revert
find . -name Makefile.in -print0 | xargs -r0 svn rm
svn commit
autoreconf
Using -print0, print a zero terminated string so that filenames are
handled as binary data. The xargs command will expand as many args as
possible into each of the svn commands.
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org