comparison mercurial/revlog.py @ 7874:d812029cda85

cleanup: drop variables for unused return values They are unnecessary. I did leave them in localrepo.py where there is something like: _junk = foo() _junk = None to free memory early. I don't know if just `foo()` will free the return value as early.
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Mon, 23 Mar 2009 13:13:02 +0100
parents 4a4c7f6a5912
children c63c30ae9e39
comparison
equal deleted inserted replaced
7873:4a4c7f6a5912 7874:d812029cda85
833 if len(id) == 20: 833 if len(id) == 20:
834 # possibly a binary node 834 # possibly a binary node
835 # odds of a binary node being all hex in ASCII are 1 in 10**25 835 # odds of a binary node being all hex in ASCII are 1 in 10**25
836 try: 836 try:
837 node = id 837 node = id
838 r = self.rev(node) # quick search the index 838 self.rev(node) # quick search the index
839 return node 839 return node
840 except LookupError: 840 except LookupError:
841 pass # may be partial hex id 841 pass # may be partial hex id
842 try: 842 try:
843 # str(rev) 843 # str(rev)
853 pass 853 pass
854 if len(id) == 40: 854 if len(id) == 40:
855 try: 855 try:
856 # a full hex nodeid? 856 # a full hex nodeid?
857 node = bin(id) 857 node = bin(id)
858 r = self.rev(node) 858 self.rev(node)
859 return node 859 return node
860 except (TypeError, LookupError): 860 except (TypeError, LookupError):
861 pass 861 pass
862 862
863 def _partialmatch(self, id): 863 def _partialmatch(self, id):