[Python-checkins] CVS: distutils/distutils file_util.py,1.3,1.4

Greg Ward python-dev@python.org
2000年6月22日 18:42:43 -0700


Update of /cvsroot/python/distutils/distutils
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21979
Modified Files:
	file_util.py 
Log Message:
Bastian Kleineidam: 'copy_file()' now returns the output filename, rather
than a boolean indicating whether it did the copy.
Index: file_util.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/file_util.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** file_util.py	2000年05月20日 16:05:34	1.3
--- file_util.py	2000年06月23日 01:42:40	1.4
***************
*** 97,103 ****
 contents.
 
! Return true if the file was copied (or would have been copied),
! false otherwise (ie. 'update' was true and the destination is
! up-to-date)."""
 
 # XXX if the destination file already exists, we clobber it if
--- 97,102 ----
 contents.
 
! Return the name of the destination file, whether it was actually
! copied or not."""
 
 # XXX if the destination file already exists, we clobber it if
***************
*** 124,128 ****
 if verbose:
 print "not copying %s (output up-to-date)" % src
! return 0
 
 try:
--- 123,127 ----
 if verbose:
 print "not copying %s (output up-to-date)" % src
! return dst
 
 try:
***************
*** 138,142 ****
 
 if dry_run:
! return 1
 
 # On a Mac, use the native file copy routine
--- 137,141 ----
 
 if dry_run:
! return dst
 
 # On a Mac, use the native file copy routine
***************
*** 172,176 ****
 os.chmod (dst, S_IMODE (st[ST_MODE]))
 
! return 1
 
 # copy_file ()
--- 171,175 ----
 os.chmod (dst, S_IMODE (st[ST_MODE]))
 
! return dst
 
 # copy_file ()

AltStyle によって変換されたページ (->オリジナル) /