我正在使用命令:git config http.postBuffer 524288000
通过SourceTree的终端,但它没有做任何事情,也没有错误。我输入它,它就像一条新线一样,好像什么都没发生一样。
我怎样才能让它发挥作用?
答案 0 :(得分:0)
你这样做
import ntpath, sys, tkFileDialog, Tkinter
import xml.etree.ElementTree as ET
class Comparison:
def __init__(self, file):
self.file = ET.parse(file)
self.filename = self.get_file_name(file)
self.root = self.file.getroot()
self.file_length = len(self.root)
self.data_dict = dict()
self.master_list = list()
self.parse_xml(self.root)
print self.master_list
def get_file_name(self, file):
filename_list = list()
for char in ntpath.basename(str(file)):
filename_list.append(char)
if ''.join(filename_list[-4:]) == '.xml':
return ''.join(filename_list)
def parse_xml(self, tree):
for child in tree:
if tree == self.root:
self.step_number = child.attrib['id']
self.data_dict['Step'] = self.step_number
if len(child.tag) > 0:
self.data_dict['Tag'] = child.tag
else:
self.data_dict['Tag'] = ""
if len(child.attrib) > 0:
self.data_dict['Attrib'] = child.attrib
else:
self.data_dict['Attrib'] = ""
if child.text is not None:
self.data_dict['Text'] = child.text
else:
self.data_dict['Text'] = ""
print self.data_dict
print "Step: "+str(self.data_dict['Step'])
try:
print "Tag: "+str(self.data_dict['Tag'])
except:
pass
try:
for key,value in self.data_dict['Attrib'].iteritems():
print "Attrib: "+str(key)
print "Attrib Value: "+str(value)
except:
pass
try:
if len(str(self.data_dict['Text'])) > 0:
print "Text Length: "+str(len(str(self.data_dict['Text'])))
print "Text: "+str(self.data_dict['Text'])
except:
pass
print ""
print len(self.data_dict)
self.master_list.append(self.data_dict)
print self.data_dict
self.data_dict.clear()
if len(child) > 0:
self.parse_xml(child)
if __name__ == "__main__":
root = Tkinter.Tk()
root.iconify()
if sys.argv[1] != "":
file_a = Comparison(sys.argv[1])
else:
file_a = Comparison(tkFileDialog.askopenfilename())
例如:
git config --global http.postBuffer your_prefer_post_size