[Python-checkins] python/dist/src/Demo/pdist RCSProxy.py, 1.6, 1.7 client.py, 1.4, 1.5 cmdfw.py, 1.2, 1.3 cmptree.py, 1.2, 1.3 cvslock.py, 1.1, 1.2 rcslib.py, 1.9, 1.10 server.py, 1.4, 1.5

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Feb 12 12:35:36 EST 2004


Update of /cvsroot/python/python/dist/src/Demo/pdist
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21620/Demo/pdist

Modified Files:
	RCSProxy.py client.py cmdfw.py cmptree.py cvslock.py rcslib.py 
	server.py 
Log Message:
Replace backticks with repr() or "%r"

>From SF patch #852334.


Index: RCSProxy.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/pdist/RCSProxy.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** RCSProxy.py	14 Sep 1998 16:43:55 -0000	1.6
--- RCSProxy.py	12 Feb 2004 17:35:02 -0000	1.7
***************
*** 189,193 ****
              print apply(attr, tuple(sys.argv[2:]))
          else:
!             print `attr`
      else:
          print "%s: no such attribute" % what
--- 189,193 ----
              print apply(attr, tuple(sys.argv[2:]))
          else:
!             print repr(attr)
      else:
          print "%s: no such attribute" % what

Index: client.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/pdist/client.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** client.py	7 Oct 1995 19:27:20 -0000	1.4
--- client.py	12 Feb 2004 17:35:02 -0000	1.5
***************
*** 140,144 ****
  		challenge = string.atoi(string.strip(line))
  		response = self._encode_challenge(challenge)
! 		line = `long(response)`
  		if line[-1] in 'Ll': line = line[:-1]
  		self._wf.write(line + '\n')
--- 140,144 ----
  		challenge = string.atoi(string.strip(line))
  		response = self._encode_challenge(challenge)
! 		line = repr(long(response))
  		if line[-1] in 'Ll': line = line[:-1]
  		self._wf.write(line + '\n')

Index: cmdfw.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/pdist/cmdfw.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cmdfw.py	27 Apr 1995 23:32:47 -0000	1.2
--- cmdfw.py	12 Feb 2004 17:35:02 -0000	1.3
***************
*** 56,60 ****
  				method = getattr(self, mname)
  			except AttributeError:
! 				return self.usage("command %s unknown" % `cmd`)
  			try:
  				flags = getattr(self, fname)
--- 56,60 ----
  				method = getattr(self, mname)
  			except AttributeError:
! 				return self.usage("command %r unknown" % (cmd,))
  			try:
  				flags = getattr(self, fname)
***************
*** 76,80 ****
  			print "Options:"
  			for o, a in opts:
! 				print 'option', o, 'value', `a`
  			print "-"*40
  
--- 76,80 ----
  			print "Options:"
  			for o, a in opts:
! 				print 'option', o, 'value', repr(a)
  			print "-"*40
  
***************
*** 138,142 ****
  		print '-'*10, t, '-'*10
  		sts = x.run(t)
! 		print "Exit status:", `sts`
  
  
--- 138,142 ----
  		print '-'*10, t, '-'*10
  		sts = x.run(t)
! 		print "Exit status:", repr(sts)
  
  

Index: cmptree.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/pdist/cmptree.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cmptree.py	26 Apr 1995 22:57:06 -0000	1.2
--- cmptree.py	12 Feb 2004 17:35:02 -0000	1.3
***************
*** 50,54 ****
  def compare(local, remote, mode):
  	print
! 	print "PWD =", `os.getcwd()`
  	sums_id = remote._send('sumlist')
  	subdirs_id = remote._send('listsubdirs')
--- 50,54 ----
  def compare(local, remote, mode):
  	print
! 	print "PWD =", repr(os.getcwd())
  	sums_id = remote._send('sumlist')
  	subdirs_id = remote._send('listsubdirs')
***************
*** 65,69 ****
  		rsumdict[name] = rsum
  		if not lsumdict.has_key(name):
! 			print `name`, "only remote"
  			if 'r' in mode and 'c' in mode:
  				recvfile(local, remote, name)
--- 65,69 ----
  		rsumdict[name] = rsum
  		if not lsumdict.has_key(name):
! 			print repr(name), "only remote"
  			if 'r' in mode and 'c' in mode:
  				recvfile(local, remote, name)
***************
*** 71,75 ****
  			lsum = lsumdict[name]
  			if lsum != rsum:
! 				print `name`,
  				rmtime = remote.mtime(name)
  				lmtime = local.mtime(name)
--- 71,75 ----
  			lsum = lsumdict[name]
  			if lsum != rsum:
! 				print repr(name),
  				rmtime = remote.mtime(name)
  				lmtime = local.mtime(name)
***************
*** 87,91 ****
  	for name in lsumdict.keys():
  		if not rsumdict.keys():
! 			print `name`, "only locally",
  			fl()
  			if 'w' in mode and 'c' in mode:
--- 87,91 ----
  	for name in lsumdict.keys():
  		if not rsumdict.keys():
! 			print repr(name), "only locally",
  			fl()
  			if 'w' in mode and 'c' in mode:
***************
*** 161,165 ****
  	finally:
  		if not ok:
! 			print "*** recvfile of %s failed, deleting" % `name`
  			local.delete(name)
  
--- 161,165 ----
  	finally:
  		if not ok:
! 			print "*** recvfile of %r failed, deleting" % (name,)
  			local.delete(name)
  

Index: cvslock.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/pdist/cvslock.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** cvslock.py	23 Jun 1995 22:03:28 -0000	1.1
--- cvslock.py	12 Feb 2004 17:35:02 -0000	1.2
***************
*** 115,119 ****
  		self.lockdir = None
  		self.lockfile = None
! 		pid = `os.getpid()`
  		self.cvslck = self.join(CVSLCK)
  		self.cvsrfl = self.join(CVSRFL + pid)
--- 115,119 ----
  		self.lockdir = None
  		self.lockfile = None
! 		pid = repr(os.getpid())
  		self.cvslck = self.join(CVSLCK)
  		self.cvsrfl = self.join(CVSRFL + pid)

Index: rcslib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/pdist/rcslib.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rcslib.py	9 Aug 2002 16:38:32 -0000	1.9
--- rcslib.py	12 Feb 2004 17:35:02 -0000	1.10
***************
*** 233,237 ****
          name, rev = self._unmangle(name_rev)
          if not self.isvalid(name):
!             raise os.error, 'not an rcs file %s' % `name`
          return name, rev
  
--- 233,237 ----
          name, rev = self._unmangle(name_rev)
          if not self.isvalid(name):
!             raise os.error, 'not an rcs file %r' % (name,)
          return name, rev
  
***************
*** 253,257 ****
          if rev:
              cmd = cmd + ' ' + rflag + rev
!         return os.popen("%s %s" % (cmd, `namev`))
  
      def _unmangle(self, name_rev):
--- 253,257 ----
          if rev:
              cmd = cmd + ' ' + rflag + rev
!         return os.popen("%s %r" % (cmd, namev))
  
      def _unmangle(self, name_rev):

Index: server.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/pdist/server.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** server.py	21 Jun 1995 02:10:32 -0000	1.4
--- server.py	12 Feb 2004 17:35:02 -0000	1.5
***************
*** 135,143 ****
  		except string.atol_error:
  			if self._verbose > 0:
! 				print "Invalid response syntax", `response`
  			return 0
  		if not self._compare_challenge_response(challenge, response):
  			if self._verbose > 0:
! 				print "Invalid response value", `response`
  			return 0
  		if self._verbose > 1:
--- 135,143 ----
  		except string.atol_error:
  			if self._verbose > 0:
! 				print "Invalid response syntax", repr(response)
  			return 0
  		if not self._compare_challenge_response(challenge, response):
  			if self._verbose > 0:
! 				print "Invalid response value", repr(response)
  			return 0
  		if self._verbose > 1:




More information about the Python-checkins mailing list