亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? svn-fast-backup

?? subversion-1.4.5.tar.gz 配置svn的源碼
??
字號:
#!/usr/bin/env python2.4# $Id: svn-fast-backup 8698 2005-09-02 07:28:22Z quarl $# svn-fast-backup: use rsync snapshots for very fast FSFS repository backup.#    Multiple FSFS backups share data via hardlinks, meaning old backups are#    almost free, since a newer revision of a repository is almost a complete#    superset of an older revision.# This is good for replacing incremental log-dump+restore-style backups# because it is just as space-conserving and even faster; there is no# inter-backup state (old backups are essentially caches); each backup# directory is self-contained.  It keeps the same interface as svn-hot-backup# (if you use --force), but only works for FSFS repositories.# Author: Karl Chen <quarl@quarl.org>## quarl 2005-08-17 initial version## quarl 2005-09-01 refactor, documentation; new options: --force, --keep,##                  --simulate, --trace# Originally based on svn-hot-backup.py, whose copyright notice states:# ====================================================================# Copyright (c) 2000-2004 CollabNet.  All rights reserved.## This software is licensed as described in the file COPYING, which# you should have received as part of this distribution.  The terms# are also available at http://subversion.tigris.org/license-1.html.# If newer versions of this license are posted there, you may use a# newer version instead, at your option.## This software consists of voluntary contributions made by many# individuals.  For exact contribution history, see the revision# history and logs, available at http://subversion.tigris.org/.# ====================================================================######################################################################import sys, os, reimport getoptimport subprocess                                   # python2.4####################################################################### Global Settingssvnlook = "svnlook"                                 # Path to svnlooksvnadmin = "svnadmin"                               # Path to svnadminrsync = "rsync"                                     # Path to rsync####################################################################### Command line argumentsdef usage():    raise SystemExit("""Syntax: %s [OPTIONS] repos_path backup_dirMakes a hot backup of a Subversion FSFS repository at REPOS_PATH toBACKUP_DIR/repos-rev.If a previous version exists, make hard links of its files using rsync.As multiple FSFS backups share data via hardlinks, old backups usealmost no space, since a newer revision of a repository is almost a completesuperset of an older revision (excluding direct repository modifications).Keeps up to N backups and deletes the rest.  (N includes the current backup.)OPTIONS:   -h, --help        This screen   -q, --quiet       Quieter than usual   -k, --keep=N      Keep N backups instead of 64   -k, --keep=all    Keep all backups (never delete any)   -f, --force       Make a new backup even if one with current revision exists   -t, --trace       Show actions   -s, --simulate    Don't perform actions""" %sys.argv[0])class Options: passdef default_options():    options = Options()    options.force = False    options.trace = False    options.simulate = False    options.quiet = False    options.keep = 64                       # Number of backups to keep around    return optionsdef parse_commandline():    options = default_options()    try:        opts, args = getopt.getopt(sys.argv[1:], 'qhk:fts', ['quiet', 'help', 'keep=', 'force',                                                             'trace', 'simulate'])    except getopt.GetoptError, e:        print >>sys.stderr, "Error:", e        usage()    for (o,a) in opts:        if o == '-h' or o == '--help':            usage()        elif o == '-q' or o == '--quiet':            options.quiet = True        elif o == '-f' or o == '--force':            options.force = True        elif o == '-t' or o == '--trace':            options.trace = True        elif o == '-s' or o == '--simulate':            options.simulate = True        elif o == '-k' or o == '--keep':            if a.strip().lower() == 'all':                options.keep = 0            else:                options.keep = int(a)        else:            raise Exception("Internal error")    if len(args) != 2:        usage()    # Path to repository    options.repo_dir = args[0]    # Where to store the repository backup.  The backup will be placed in a    # *subdirectory* of this location, named after the youngest revision.    options.backup_dir = os.path.abspath(args[1])    options.repo = os.path.basename(os.path.abspath(options.repo_dir))    return optionsdef comparator(a, b):    # We pass in filenames so there is never a case where they are equal.    regexp = re.compile("-(?P<revision>[0-9]+)(-(?P<increment>[0-9]+))?$")    matcha = regexp.search(a)    matchb = regexp.search(b)    reva = int(matcha.groupdict()['revision'])    revb = int(matchb.groupdict()['revision'])    if (reva < revb):        return -1    elif (reva > revb):        return 1    else:        inca = matcha.groupdict()['increment']        incb = matchb.groupdict()['increment']    if not inca:        return -1    elif not incb:        return 1;    elif (int(inca) < int(incb)):        return -1    else:        return 1def pipe(command):    return subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0].strip()def readfile(filename):    try:        return open(filename).read().strip()    except:        return ''def runcmd(cmd):    if options.trace:        print >>sys.stderr, '#', cmd    if options.simulate:        return 0    return subprocess.call(cmd)def deltree(path):    runcmd(['rm', '-r', path])def get_youngest_revision():    if readfile(os.path.join('db', 'fs-type')) != 'fsfs':        raise SystemExit("Path '%s' doesn't contain a FSFS repository"%options.repo_dir)    return pipe(["svnlook","youngest","."])def list_repo_backups():    '''Return a sorted list of backups for this repository.'''    regexp = re.compile(options.repo + "-[0-9]+(-[0-9]+)?$")    directory_list = [x for x in os.listdir(options.backup_dir) if regexp.match(x)]    directory_list.sort(comparator)    return directory_listdef delete_old_backups():    if options.keep <= 0:        return    for item in list_repo_backups()[:-options.keep]:        old_backup_subdir = os.path.join(options.backup_dir, item)        print "  Removing old backup: ", old_backup_subdir        deltree(old_backup_subdir)def find_next_backup_name(youngest):    # If there is already a backup of this revision, then append the next    # highest increment to the path.  We still need to do a backup because the    # repository might have changed despite no new revision having been    # created.  We find the highest increment and add one rather than start    # from 1 and increment because the starting increments may have already    # been removed due to options.keep.    regexp = re.compile(options.repo + "-" + youngest + "(-(?P<increment>[0-9]+))?$")    directory_list = os.listdir(options.backup_dir)    young_list = [ x for x in directory_list if regexp.match(x) ]    young_list.sort(comparator)    if not young_list:        return "%s-%s" %(options.repo, youngest)    # Backups for this revision exist already.    if not options.force:        if not options.quiet:            print "Backup already exists at",young_list[-1]        raise SystemExit    increment = int(regexp.match(young_list[-1]).groupdict()['increment'] or '0')    return "%s-%s-%d" %(options.repo, youngest, increment+1)def do_rsync_backup():    youngest = get_youngest_revision()    if not options.quiet:        print "Beginning hot backup of '%s' (youngest revision is %s)..." %(options.repo, youngest),    backup_subdir = os.path.join(options.backup_dir, find_next_backup_name(youngest))    backup_tmpdir = backup_subdir + '.tmp'    if os.path.exists(backup_tmpdir):        raise SystemExit("%s: Backup in progress?  '%s' exists -- aborting."%(sys.argv[0],backup_tmpdir))    if not options.simulate:        os.mkdir(backup_tmpdir)                     # ensures atomicity    if os.path.exists(backup_subdir):        # Check again after doing mkdir (which serves as a mutex acquire) --        # just in case another process just finished the same backup.        if not options.quiet:            print "Backup already exists at",backup_subdir        raise SystemExit    previous_backups = list_repo_backups()    ### Use rsync to make a copy.    # We need to copy the 'current' file first.    # Don't copy the transactions/ directory.    # See http://svn.collab.net/repos/svn/trunk/notes/fsfs    rsync_dest = os.path.join(backup_tmpdir,'')    # copy db/current.  -R tells rsync to use relative pathnames.    if runcmd(['rsync', '-aR', 'db/current', rsync_dest]):        raise "%s: rsync failed" %sys.argv[0]    # Now copy everything else.    cmd = [rsync, '-a',           '--exclude', 'db/current',           '--exclude', 'db/transactions/*',           '--exclude', 'db/log.*',           '.', rsync_dest]    # If there's a previous backup, make hard links against the latest.    if previous_backups:        cmd += ['--link-dest', os.path.join(options.backup_dir, previous_backups[-1])]    if runcmd(cmd):        raise "%s: rsync failed" %sys.argv[0]    # Rename to final name.    if not options.simulate:        os.rename(backup_tmpdir, backup_subdir)    print "Finished backup to", backup_subdiroptions = parse_commandline()os.chdir(options.repo_dir)do_rsync_backup()delete_old_backups()

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩毛片精品高清免费| 中文字幕一区二区三区在线播放| 国产精品高潮呻吟久久| 欧洲在线/亚洲| 国产美女娇喘av呻吟久久| 亚洲黄色免费网站| 欧美国产激情二区三区| 成人av动漫在线| 1024国产精品| 久久网站最新地址| 国产盗摄女厕一区二区三区| 亚洲成人黄色影院| 亚洲人成精品久久久久| 欧美日韩亚洲综合在线 | 91精品蜜臀在线一区尤物| 成a人片国产精品| 日韩一区欧美小说| 日本道精品一区二区三区| 国产a级毛片一区| 激情久久五月天| 欧美a级一区二区| 久久久久久久久久美女| 粉嫩av一区二区三区| 精品中文字幕一区二区| 亚洲成人自拍一区| 一区二区三区四区蜜桃| 欧美日韩电影一区| 精品一区二区免费看| 日本一区二区电影| 欧美va天堂va视频va在线| 国产白丝精品91爽爽久久| 久久精品国产一区二区三区免费看| xnxx国产精品| 久久综合av免费| 色综合天天性综合| av色综合久久天堂av综合| 国产98色在线|日韩| 国产v日产∨综合v精品视频| 国产乱码精品一区二区三区忘忧草 | 一本色道综合亚洲| 成人av网址在线| 视频在线观看一区| 久久品道一品道久久精品| 91行情网站电视在线观看高清版| 99久久伊人网影院| 不卡的av电影在线观看| 首页国产欧美久久| 久99久精品视频免费观看| 捆绑紧缚一区二区三区视频| 激情偷乱视频一区二区三区| 国产一区二区成人久久免费影院| 国产精一品亚洲二区在线视频| 国产成人自拍网| 播五月开心婷婷综合| 久久精品国产精品亚洲精品| 国内欧美视频一区二区| 亚洲高清视频在线| 日韩二区三区在线观看| 老司机精品视频线观看86| 国内精品嫩模私拍在线| 亚洲色图丝袜美腿| 亚洲一二三四在线| 日韩影院精彩在线| 国产美女在线精品| 99国产精品久久久久久久久久久| 在线观看日韩电影| 555夜色666亚洲国产免| 久久久亚洲综合| 亚洲色图.com| 美女一区二区在线观看| 亚洲一区二区三区在线看| 毛片基地黄久久久久久天堂| 粉嫩aⅴ一区二区三区四区 | 久久免费电影网| 欧美日韩中文另类| 91视频免费观看| 国产suv精品一区二区6| 精品无人码麻豆乱码1区2区| 亚洲一区在线电影| 亚洲乱码日产精品bd| 蜜臀av国产精品久久久久| 成人免费看片app下载| 欧美体内she精高潮| 久久免费看少妇高潮| 精品va天堂亚洲国产| 成人欧美一区二区三区黑人麻豆 | 成人免费毛片高清视频| 国产福利一区二区三区在线视频| 成人小视频在线观看| 高潮精品一区videoshd| 欧美日韩一区小说| 国产亚洲欧洲一区高清在线观看| 亚洲一区免费观看| 国产成人在线色| 欧美一区二区福利在线| 亚洲欧洲成人av每日更新| 老色鬼精品视频在线观看播放| 免费高清在线一区| 色综合天天综合网天天看片| 久久久久久毛片| 国产欧美日韩不卡| 国产精品国产三级国产普通话三级| 国产精品久久综合| 美女一区二区视频| 精品一区二区在线看| 在线观看亚洲精品视频| 欧美裸体bbwbbwbbw| 欧美一区二区视频网站| 亚洲天堂av一区| 国产黄色精品网站| 欧美大片一区二区| 性做久久久久久| 91福利精品第一导航| 国产农村妇女精品| 在线观看日韩电影| 国产色综合一区| 麻豆精品在线播放| 欧美另类一区二区三区| 欧美一区二区三区在线电影 | 国产精品77777| 欧美一区二区三区在线观看视频| 亚洲国产va精品久久久不卡综合| 成人av网址在线| 中文字幕第一区二区| 国产精品一区二区在线观看网站| 99久久精品国产毛片| 国产日韩欧美一区二区三区乱码| 亚洲老司机在线| 91香蕉视频污| 亚洲欧美国产高清| 色爱区综合激月婷婷| 亚洲色欲色欲www在线观看| 99久久精品免费| 欧美成人精品福利| 另类中文字幕网| 久久伊99综合婷婷久久伊| 激情国产一区二区 | 日韩欧美高清dvd碟片| 日韩电影在线观看网站| 欧美电影在线免费观看| 久久精品亚洲精品国产欧美| 激情五月婷婷综合| 91片黄在线观看| 一区二区三区资源| 欧美三级视频在线观看| 久久久精品国产免大香伊| 国产又粗又猛又爽又黄91精品| 久久综合一区二区| 国产91在线观看| 欧美一区二区精品在线| 精品一区二区三区欧美| 欧美影院精品一区| 日韩精品视频网站| 99re这里只有精品6| 亚洲精品一线二线三线无人区| 国产一区 二区| 日韩视频一区二区在线观看| 激情图片小说一区| 国产精品传媒视频| 欧美性高清videossexo| 日本美女一区二区| 国产三级一区二区| 一本色道久久综合亚洲aⅴ蜜桃| 久久精品亚洲麻豆av一区二区| 国产91精品久久久久久久网曝门| 亚洲精品菠萝久久久久久久| 成人免费看片app下载| 一区二区高清在线| 日韩欧美精品在线视频| 成人精品视频.| 天堂在线一区二区| 国产亲近乱来精品视频| 激情欧美一区二区| 欧美刺激脚交jootjob| 国产1区2区3区精品美女| 精品日韩一区二区| 91蝌蚪porny九色| 亚洲1区2区3区4区| 国产精品欧美一区喷水| 欧美精品电影在线播放| 在线播放91灌醉迷j高跟美女 | 风流少妇一区二区| 亚洲国产精品久久久久秋霞影院| 日韩视频一区二区在线观看| 亚洲成av人片在线观看无码| 国产人妖乱国产精品人妖| 91国在线观看| 国产福利一区二区三区在线视频| 久久精品人人做| 欧美三级电影一区| 国产超碰在线一区| 天天操天天干天天综合网| 中文在线一区二区| 欧美一区二区三区四区五区 | 欧美日韩视频不卡| 国产91精品免费| 国产精品不卡在线| 精品国精品国产| 国产一区二区视频在线播放| 亚洲国产三级在线|