⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 random-commits.py

📁 subversion-1.4.3-1.tar.gz 配置svn的源码
💻 PY
字号:
#!/usr/bin/env python## USAGE: random-commits.py## Using the FILELIST (see config below), a series of COUNT commits will be# constructed, each changing up to MAXFILES files per commit. The commands# will be sent to stdout (formatted as a shell script).## The FILELIST can be constructed using the find-textfiles script.#import randomFILELIST = 'textfiles'COUNT = 1000	# this many commitsMAXFILES = 10	# up to 10 files at a timefiles = open(FILELIST).readlines()print '#!/bin/sh'for i in range(COUNT):    n = random.randrange(1, MAXFILES+1)    l = [ ]    print "echo '--- begin commit #%d -----------------------------------'" % (i+1,)    for j in range(n):        fname = random.choice(files)[:-1]	# strip trailing newline        print "echo 'part of change #%d' >> %s" % (i+1, fname)        l.append(fname)    print "svn commit -m 'commit #%d' %s" % (i+1, ' '.join(l))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -