[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn stat on new files

From: Matt Kraai <kraai_at_alumni.cmu.edu>
Date: 2002-12-07 00:09:24 CET

On Fri, Dec 06, 2002 at 01:46:09PM -0600, Karl Fogel wrote:
> Philip Martin <philip@codematters.co.uk> writes:
> > Which means that we don't have a regression test for the r3746
> > behaviour, or that Matt forgot to run the tests...
>
> Maybe we should ask Matt to write a regression test for that :-).
>
> Ahem.

Is the following test what you had in mind?

Matt

Index: subversion/tests/clients/cmdline/stat_tests.py
===================================================================
--- subversion/tests/clients/cmdline/stat_tests.py (revision 4008)
+++ subversion/tests/clients/cmdline/stat_tests.py (working copy)
@@ -243,6 +243,33 @@
   return 0
 
 
+def status_blank_for_ignored_file(sbox):
+ "status blank for ignored file"
+
+ if sbox.build():
+ return 1
+
+ wc_dir = sbox.wc_dir
+ was_cwd = os.getcwd()
+
+ os.chdir(wc_dir)
+
+ svntest.main.file_append('newfile', 'this is a new file')
+ svntest.main.run_svn(None, 'propset', 'svn:ignore', 'newfile', '.')
+ stat_output, err_output = svntest.main.run_svn(None, 'status', '--no-ignore',
+ '.')
+ if err_output:
+ return 1
+ status = 1
+ for line in stat_output:
+ if re.match(" +newfile", line):
+ status = 0
+
+ os.chdir(was_cwd)
+
+ return status
+
+
 ########################################################################
 # Run the tests
 
@@ -255,6 +282,7 @@
               status_missing_file,
               status_type_change,
               status_with_new_files_pending,
+ status_blank_for_ignored_file,
              ]
 
 if __name__ == '__main__':

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 7 00:06:00 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.