Did I find the right examples for you? yes no

All Samples(17)  |  Call(11)  |  Derive(0)  |  Import(6)

src/r/a/ranger-HEAD/ranger/ext/vcs/hg.py   ranger(Download)
    from ConfigParser import RawConfigParser
 
from .vcs import Vcs, VcsError
 
 
    def _hg_file_status(self, st):
        if len(st) != 1: raise VcsError("Wrong hg file status string: %s" % st)
        if   st in "ARM":    return 'staged'
        elif st in "!":      return 'deleted'
        elif st in "I":      return 'ignored'
            os.rmdir(self.path)
        except OSError:
            raise VcsError("Can't clone to %s. It is not an empty directory" % self.path)
 
        self._hg(path, ['clone', src, name])
        L = self._log(refspec=rev)
        if len(L) == 0:
            raise VcsError("Revision %s does not exist" % rev)
        elif len(L) > 1:
            raise VcsError("More than one instance of revision %s ?!?" % rev)

src/r/a/ranger-HEAD/ranger/ext/vcs/git.py   ranger(Download)
from datetime import datetime
 
from .vcs import Vcs, VcsError
 
 
    def _git_file_status(self, st):
        if len(st) != 2: raise VcsError("Wrong git file status string: %s" % st)
        X, Y = (st[0], st[1])
        if   X in " "      and Y in " " : return 'sync'
        elif X in "MADRC"  and Y in " " : return 'staged'
            os.rmdir(self.path)
        except OSError:
            raise VcsError("Can't clone to %s. It is not an empty directory" % self.path)
 
        self._git(path, ['clone', src, name])
        L = self._log(refspec=rev)
        if len(L) == 0:
            raise VcsError("Revision %s does not exist" % rev)
        elif len(L) > 1:
            raise VcsError("More than one instance of revision %s ?!?" % rev)

src/r/a/ranger-HEAD/ranger/ext/vcs/bzr.py   ranger(Download)
from datetime import datetime
 
from .vcs import Vcs, VcsError
 
 
            os.rmdir(self.path)
        except OSError:
            raise VcsError("Can't clone to %s. It is not an empty directory" % self.path)
 
        self._bzr(path, ['branch', src, name])
        L = self._log(refspec=rev)
        if len(L) == 0:
            raise VcsError("Revision %s does not exist" % rev)
        elif len(L) > 1:
            raise VcsError("More than one instance of revision %s ?!?" % rev)

src/r/a/ranger-HEAD/ranger/ext/vcs/__init__.py   ranger(Download)
import os
 
from .vcs import VcsError, Vcs
 
# vim: expandtab:shiftwidth=4:tabstop=4:softtabstop=4:textwidth=80