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

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

?? svnshell.py

?? subversion-1.4.3-1.tar.gz 配置svn的源碼
?? PY
字號:
#!/usr/bin/env python## svnshell.py : a Python-based shell interface for cruising 'round in#               the filesystem.######################################################################### 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.########################################################################import sysimport stringimport timeimport refrom cmd import Cmdfrom random import randintfrom svn import fs, core, reposclass SVNShell(Cmd):  def __init__(self, path):    """initialize an SVNShell object"""    Cmd.__init__(self)    path = core.svn_path_canonicalize(path)    self.fs_ptr = repos.fs(repos.open(path))    self.is_rev = 1    self.rev = fs.youngest_rev(self.fs_ptr)    self.txn = None    self.root = fs.revision_root(self.fs_ptr, self.rev)    self.path = "/"    self._setup_prompt()    self.cmdloop()      def precmd(self, line):    if line == "EOF":      # Ctrl-D is a command without a newline.  Print a newline, so the next      # shell prompt is not on the same line as the last svnshell prompt.      print      return "exit"    return line  def postcmd(self, stop, line):    self._setup_prompt()  _errors = ["Huh?",             "Whatchoo talkin' 'bout, Willis?",             "Say what?",             "Nope.  Not gonna do it.",             "Ehh...I don't think so, chief."]  def default(self, line):    print self._errors[randint(0, len(self._errors) - 1)]      def do_cat(self, arg):    """dump the contents of a file"""    if not len(arg):      print "You must supply a file path."      return    catpath = self._parse_path(arg)    kind = fs.check_path(self.root, catpath)    if kind == core.svn_node_none:      print "Path '%s' does not exist." % catpath      return    if kind == core.svn_node_dir:      print "Path '%s' is not a file." % catpath      return    ### be nice to get some paging in here.    stream = fs.file_contents(self.root, catpath)    while 1:      data = core.svn_stream_read(stream, core.SVN_STREAM_CHUNK_SIZE)      sys.stdout.write(data)      if len(data) < core.SVN_STREAM_CHUNK_SIZE:        break      def do_cd(self, arg):    """change directory"""    newpath = self._parse_path(arg)        # make sure that path actually exists in the filesystem as a directory    kind = fs.check_path(self.root, newpath)    if kind != core.svn_node_dir:      print "Path '%s' is not a valid filesystem directory." % newpath      return    self.path = newpath  def do_ls(self, arg):    """list the contents of the current directory or provided path"""    parent = self.path    if not len(arg):      # no arg -- show a listing for the current directory.      entries = fs.dir_entries(self.root, self.path)    else:      # arg?  show a listing of that path.      newpath = self._parse_path(arg)      kind = fs.check_path(self.root, newpath)      if kind == core.svn_node_dir:        parent = newpath        entries = fs.dir_entries(self.root, parent)      elif kind == core.svn_node_file:        parts = self._path_to_parts(newpath)        name = parts.pop(-1)        parent = self._parts_to_path(parts)        print parent + ':' + name        tmpentries = fs.dir_entries(self.root, parent)        if not tmpentries.get(name, None):          return        entries = {}        entries[name] = tmpentries[name]      else:        print "Path '%s' not found." % newpath        return          keys = entries.keys()    keys.sort()    print "   REV   AUTHOR  NODE-REV-ID     SIZE         DATE NAME"    print "----------------------------------------------------------------------------"    for entry in keys:      fullpath = parent + '/' + entry      size = ''      is_dir = fs.is_dir(self.root, fullpath)      if is_dir:        name = entry + '/'      else:        size = str(fs.file_length(self.root, fullpath))        name = entry      node_id = fs.unparse_id(entries[entry].id)      created_rev = fs.node_created_rev(self.root, fullpath)      author = fs.revision_prop(self.fs_ptr, created_rev,                                core.SVN_PROP_REVISION_AUTHOR)      if not author:        author = ""      date = fs.revision_prop(self.fs_ptr, created_rev,                              core.SVN_PROP_REVISION_DATE)      if not date:        date = ""      else:        date = self._format_date(date)           print "%6s %8s %12s %8s %12s %s" % (created_rev, author[:8],                                          node_id, size, date, name)    def do_lstxns(self, arg):    """list the transactions available for browsing"""    txns = fs.list_transactions(self.fs_ptr)    txns.sort()    counter = 0    for txn in txns:      counter = counter + 1      print "%8s  " % txn,      if counter == 6:        print ""        counter = 0    print ""      def do_pcat(self, arg):    """list the properties of a path"""    catpath = self.path    if len(arg):      catpath = self._parse_path(arg)    kind = fs.check_path(self.root, catpath)    if kind == core.svn_node_none:      print "Path '%s' does not exist." % catpath      return    plist = fs.node_proplist(self.root, catpath)    if not plist:      return    for pkey, pval in plist.items():      print 'K ' + str(len(pkey))      print pkey      print 'P ' + str(len(pval))      print pval    print 'PROPS-END'      def do_setrev(self, arg):    """set the current revision to view"""    try:      if arg.lower() == 'head':        rev = fs.youngest_rev(self.fs_ptr)      else:        rev = int(arg)      newroot = fs.revision_root(self.fs_ptr, rev)    except:      print "Error setting the revision to '" + arg + "'."      return    fs.close_root(self.root)    self.root = newroot    self.rev = rev    self.is_rev = 1    self._do_path_landing()  def do_settxn(self, arg):    """set the current transaction to view"""    try:      txnobj = fs.open_txn(self.fs_ptr, arg)      newroot = fs.txn_root(txnobj)    except:      print "Error setting the transaction to '" + arg + "'."      return    fs.close_root(self.root)    self.root = newroot    self.txn = arg    self.is_rev = 0    self._do_path_landing()    def do_youngest(self, arg):    """list the youngest revision available for browsing"""    rev = fs.youngest_rev(self.fs_ptr)    print rev  def do_exit(self, arg):    sys.exit(0)  def _path_to_parts(self, path):    return filter(None, string.split(path, '/'))  def _parts_to_path(self, parts):    return '/' + string.join(parts, '/')  def _parse_path(self, path):    # cleanup leading, trailing, and duplicate '/' characters    newpath = self._parts_to_path(self._path_to_parts(path))    # if PATH is absolute, use it, else append it to the existing path.    if path.startswith('/') or self.path == '/':      newpath = '/' + newpath    else:      newpath = self.path + '/' + newpath    # cleanup '.' and '..'    parts = self._path_to_parts(newpath)    finalparts = []    for part in parts:      if part == '.':        pass      elif part == '..':        if len(finalparts) != 0:          finalparts.pop(-1)      else:        finalparts.append(part)    # finally, return the calculated path    return self._parts_to_path(finalparts)      def _format_date(self, date):    date = core.svn_time_from_cstring(date)    date = time.asctime(time.localtime(date / 1000000))    return date[4:-8]    def _do_path_landing(self):    """try to land on self.path as a directory in root, failing up to '/'"""    not_found = 1    newpath = self.path    while not_found:      kind = fs.check_path(self.root, newpath)      if kind == core.svn_node_dir:        not_found = 0      else:        parts = self._path_to_parts(newpath)        parts.pop(-1)        newpath = self._parts_to_path(parts)    self.path = newpath  def _setup_prompt(self):    """present the prompt and handle the user's input"""    if self.is_rev:      self.prompt = "<rev: " + str(self.rev)    else:      self.prompt = "<txn: " + self.txn    self.prompt += " " + self.path + ">$ "    def _complete(self, text, line, begidx, endidx, limit_node_kind=None):    """Generic tab completer.  Takes the 4 standard parameters passed to a    cmd.Cmd completer function, plus LIMIT_NODE_KIND, which should be a    svn.core.svn_node_foo constant to restrict the returned completions to, or    None for no limit.  Catches and displays exceptions, because otherwise    they are silently ignored - which is quite frustrating when debugging!"""     try:      args = line.split()      if len(args) > 1:        arg = args[1]      else:        arg = ""      dirs = arg.split('/')        user_elem = dirs[-1]      user_dir = "/".join(dirs[:-1] + [''])      canon_dir = self._parse_path(user_dir)      entries = fs.dir_entries(self.root, canon_dir)      acceptable_completions = []      for name, dirent_t in entries.items():        if not name.startswith(user_elem):          continue        if limit_node_kind and dirent_t.kind != limit_node_kind:          continue        if dirent_t.kind == core.svn_node_dir:          name += '/'        acceptable_completions.append(name)      if limit_node_kind == core.svn_node_dir or not limit_node_kind:        if user_elem in ('.', '..'):          for extraname in ('.', '..'):            if extraname.startswith(user_elem):              acceptable_completions.append(extraname + '/')      return acceptable_completions    except:      ei = sys.exc_info()      sys.stderr.write("EXCEPTION WHILST COMPLETING\n")      import traceback      traceback.print_tb(ei[2])      sys.stderr.write("%s: %s\n" % (ei[0], ei[1]))      raise      def complete_cd(self, text, line, begidx, endidx):    return self._complete(text, line, begidx, endidx, core.svn_node_dir)  def complete_cat(self, text, line, begidx, endidx):    return self._complete(text, line, begidx, endidx, core.svn_node_file)  def complete_ls(self, text, line, begidx, endidx):    return self._complete(text, line, begidx, endidx)  def complete_pcat(self, text, line, begidx, endidx):    return self._complete(text, line, begidx, endidx)def _basename(path):  "Return the basename for a '/'-separated path."  idx = string.rfind(path, '/')  if idx == -1:    return path  return path[idx+1:]def usage(exit):  if exit:    output = sys.stderr  else:    output = sys.stdout  output.write(    "usage: %s REPOS_PATH\n"    "\n"    "Once the program has started, type 'help' at the prompt for hints on\n"    "using the shell.\n" % sys.argv[0])  sys.exit(exit)def main():  if len(sys.argv) != 2:    usage(1)  SVNShell(sys.argv[1])if __name__ == '__main__':  main()

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人自拍视频在线| 成人免费高清视频| 国产精品高潮久久久久无| 欧美三级电影网| 国产高清在线精品| 日韩av中文字幕一区二区三区| 久久精品综合网| 日韩欧美国产精品一区| 欧洲精品一区二区三区在线观看| 九九精品视频在线看| 亚洲成av人片在www色猫咪| 日本一区二区成人在线| 欧美精品一区二区在线观看| 欧美另类z0zxhd电影| 色婷婷av一区二区三区软件| 国产精品中文字幕一区二区三区| 三级在线观看一区二区| 亚洲精品国产视频| 国产精品传媒在线| 国产视频一区二区在线| 精品国产露脸精彩对白| 91精品国产一区二区人妖| 欧美午夜电影在线播放| 91色porny蝌蚪| 高清beeg欧美| 成人一区二区视频| 国产乱对白刺激视频不卡| 精品一区二区在线观看| 日韩福利视频导航| 舔着乳尖日韩一区| 天天射综合影视| 日日欢夜夜爽一区| 日韩高清不卡一区| 日本亚洲天堂网| 日产欧产美韩系列久久99| 日韩电影在线免费观看| 欧美aaaaa成人免费观看视频| 午夜精品在线看| 日韩精品久久久久久| 天堂一区二区在线| 日韩精品国产精品| 久久激情综合网| 国内外成人在线视频| 国产一区二区0| 成人精品亚洲人成在线| 播五月开心婷婷综合| 成人免费毛片高清视频| 99这里只有久久精品视频| 91首页免费视频| 91国产免费看| 欧美日韩mp4| 91精品午夜视频| 精品欧美一区二区三区精品久久 | 91视频观看免费| 99精品久久久久久| 欧美在线小视频| 欧美精品日韩精品| 精品国产一区二区亚洲人成毛片 | 国产麻豆午夜三级精品| 国产91对白在线观看九色| 99久久精品99国产精品| 在线精品视频免费播放| 777xxx欧美| 久久精品视频免费观看| 国产精品久久久爽爽爽麻豆色哟哟 | 欧美三区免费完整视频在线观看| 欧美日韩中文另类| 精品国产亚洲在线| 国产精品美女久久久久aⅴ国产馆| 日韩一区欧美小说| 亚洲h在线观看| 国产一区二区免费视频| 91偷拍与自偷拍精品| 欧美一区二区三区在线电影| 国产日韩欧美不卡在线| 亚洲综合色成人| 韩国精品一区二区| 91视频www| 精品国产亚洲在线| 亚洲尤物视频在线| 国产九色精品成人porny| 色婷婷香蕉在线一区二区| 日韩欧美电影在线| 亚洲激情图片小说视频| 美女视频一区二区三区| av亚洲精华国产精华| 欧美一区中文字幕| 亚洲欧洲国产日本综合| 久久国产精品72免费观看| 99国产精品一区| 精品少妇一区二区三区 | 丝袜脚交一区二区| 国产成人超碰人人澡人人澡| 777久久久精品| 1024亚洲合集| 国产一区福利在线| 欧美日韩成人在线| 中文字幕一区二| 狠狠色丁香婷婷综合久久片| 日本精品一区二区三区高清 | 欧美高清dvd| 亚洲三级在线免费| 国产精品一二二区| 日韩视频在线你懂得| 一区二区久久久久| 成人午夜av在线| 日韩视频不卡中文| 水野朝阳av一区二区三区| 波多野结衣欧美| 国产亚洲一二三区| 精品制服美女丁香| 欧美肥胖老妇做爰| 亚洲免费在线观看视频| 成人免费视频app| 国产亚洲一本大道中文在线| 美女国产一区二区三区| 欧美日韩aaa| 亚洲综合男人的天堂| 一本一本久久a久久精品综合麻豆| 国产欧美1区2区3区| 国产真实乱偷精品视频免| 日韩一区二区三区av| 五月天欧美精品| 欧美日韩久久久一区| 夜夜操天天操亚洲| 色www精品视频在线观看| 综合激情成人伊人| 91丨porny丨国产入口| 亚洲视频一区在线| 色偷偷一区二区三区| 亚洲精品中文在线| 色综合色综合色综合| 一区二区三区美女| 欧洲人成人精品| 无吗不卡中文字幕| 91精品一区二区三区在线观看| 日韩精品欧美成人高清一区二区| 欧美二区三区91| 蜜臀av一区二区在线免费观看| 91麻豆精品国产91久久久久| 免费看日韩精品| 精品国产在天天线2019| 国产精一区二区三区| 日本一区二区三区高清不卡 | 欧美视频完全免费看| 亚洲成在线观看| 欧美久久久久久久久中文字幕| 三级不卡在线观看| 日韩精品一区二区三区蜜臀 | 在线亚洲欧美专区二区| 亚洲韩国一区二区三区| 91精品国产美女浴室洗澡无遮挡| 日本中文在线一区| 久久精品水蜜桃av综合天堂| 成人禁用看黄a在线| 亚洲欧美日韩系列| 欧美麻豆精品久久久久久| 麻豆精品国产传媒mv男同| 国产日韩欧美精品综合| 色综合天天综合| 日韩在线观看一区二区| 久久天堂av综合合色蜜桃网| 成人av第一页| 五月婷婷另类国产| 久久精品欧美一区二区三区不卡| av成人老司机| 视频在线观看91| 久久精品人人做人人爽97 | 久久久国产精品午夜一区ai换脸 | 精品国产乱码久久久久久影片| 国产盗摄一区二区| 亚洲二区视频在线| 337p粉嫩大胆噜噜噜噜噜91av | 777久久久精品| 成人一级片网址| 午夜婷婷国产麻豆精品| 久久久三级国产网站| 欧美视频中文字幕| 黄一区二区三区| 一区二区高清视频在线观看| 精品日韩在线一区| 欧美在线三级电影| 国产成人精品免费看| 青草av.久久免费一区| 亚洲欧美日韩国产综合| 日韩欧美国产电影| 欧亚一区二区三区| 国产成人小视频| 日韩福利电影在线| 亚洲精品国久久99热| 久久综合色8888| 欧美日韩一级二级| 成人av综合一区| 麻豆精品视频在线观看| 一区二区三区四区激情| 国产午夜精品理论片a级大结局 | 国产尤物一区二区在线| 亚洲一二三四区不卡| 国产欧美一区二区精品秋霞影院| 欧美日韩卡一卡二|