I know this questions is a little off topic but I was wondering how other people handles this problem. I want my log directory and the files in my log directory to stay under version control in subversion so that people get empty log files when they check the application. But I want all *.log files to be ignored when I do a commit so that they stay nil. Any suggestions how to go about doing this? How are other people handling this problem? Thanks. Your Friend, John
John Kopanas said the following on 2005-05-24 12:04:> Any suggestions how to go about doing this? How are other people > handling this problem?svn propset svn:ignore "*" logs svn commit -m "Ignoring all files under logs/" Hope that helps ! François
It works great but it only works for one commit... the next time I try to commit it tries to include it again. Is there a way to permanently set subversion to ignore the log directory? On 24-May-05, at 12:07 PM, François Beausoleil wrote:> > John Kopanas said the following on 2005-05-24 12:04: > >> Any suggestions how to go about doing this? How are other people >> handling this problem? >> > > svn propset svn:ignore "*" logs > svn commit -m "Ignoring all files under logs/" > > Hope that helps ! > François > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Why not just have your app test for the existance of the log files (and create if necessary) before trying to write to them? Subversion isn''t a "make sure a file exists" system. Using subversion to sort of, maybe, if the moon is in the right position, track a file isn''t the right way of going about this. Proper tool for the job........ -- John W Higgins wishdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
You need to remove the log files first. See: http://wiki.rubyonrails.com/rails/show/HowtoUseRailsWithSubversion On May 24, 2005 10:24 am, John Kopanas wrote:> It works great but it only works for one commit... the next time I > try to commit it tries to include it again. Is there a way to > permanently set subversion to ignore the log directory? > > On 24-May-05, at 12:07 PM, François Beausoleil wrote: > > John Kopanas said the following on 2005-05-24 12:04: > >> Any suggestions how to go about doing this? How are other people > >> handling this problem? > > > > svn propset svn:ignore "*" logs > > svn commit -m "Ignoring all files under logs/" > > > > Hope that helps ! > > François > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- Scott Brooks Network Operations Manager Binary Solutions Ltd. sbrooks-7+OF9GBfT4Xe9wHmmfpqLOTW4wlIGRCZ@public.gmane.org
I run "rake clear_logs" prior to the first svn import (to zero out the logfile size) and I do the same thing prior to every commit. That way the logs are effectively "unchanged" whenever I commit and it fits with my habits of always running tests prior to a commit (i.e. I''ve already got a shell open to run rake) Hope this helps, Trevor On 24-May-05, at 9:04 AM, John Kopanas wrote:> I know this questions is a little off topic but I was wondering how > other people handles this problem. > > I want my log directory and the files in my log directory to stay > under version control in subversion so that people get empty log files > when they check the application. But I want all *.log files to be > ignored when I do a commit so that they stay nil. > > Any suggestions how to go about doing this? How are other people > handling this problem? > > Thanks. > > Your Friend, > > John > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
That worked great thanks! :-) The problem though I run into is that I have to chmod the files because the server does not have enough permission to write in to the development.log log! :-) But that is ok for now. On 24-May-05, at 12:29 PM, Scott Brooks wrote:> You need to remove the log files first. > > See: http://wiki.rubyonrails.com/rails/show/ > HowtoUseRailsWithSubversion > > On May 24, 2005 10:24 am, John Kopanas wrote: > >> It works great but it only works for one commit... the next time I >> try to commit it tries to include it again. Is there a way to >> permanently set subversion to ignore the log directory? >> >> On 24-May-05, at 12:07 PM, François Beausoleil wrote: >> >>> John Kopanas said the following on 2005-05-24 12:04: >>> >>>> Any suggestions how to go about doing this? How are other people >>>> handling this problem? >>>> >>> >>> svn propset svn:ignore "*" logs >>> svn commit -m "Ignoring all files under logs/" >>> >>> Hope that helps ! >>> François >>> >>> >>> _______________________________________________ >>> Rails mailing list >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > -- > Scott Brooks > Network Operations Manager > Binary Solutions Ltd. > sbrooks-7+OF9GBfT4Xe9wHmmfpqLOTW4wlIGRCZ@public.gmane.org > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >