Example #1
0
def cygwin_find_dyalog():
    # the horrible bastard child of two operating systems

    try:
        # find which versions of Dyalog are installed
        regpath = b"\\user\\Software\\Dyalog"
        dyalogs = Popen([b"regtool", b"list", regpath],
                        stdout=PIPE).communicate()[0].split(b"\n")

        # we only want unicode versions for obvious reasons
        dyalogs = [d for d in dyalogs if b'unicode' in d.lower()]
        if not dyalogs:
            raise RuntimeError("Cannot find a suitable Dyalog APL.")

        # we want the highest version
        # the format should be: Dyalog APL-[WS](-64)? version Unicode
        dyalogs.sort(key=lambda x: float(x.split()[2]))
        dyalog = dyalogs[0]

        # find the path to that dyalog
        path = Popen([b"regtool",b"get",regpath+b"\\"+dyalog+b"\\dyalog"],stdout=PIPE)\
                  .communicate()[0].split(b"\n")[0]
        path += b"\\dyalog.exe"

        # of course, now it needs to be converted back into Unix format...
        path = cyg_convert_path(path, b"--unix")
        return path
    except:
        #raise
        raise RuntimeError("Cannot find a suitable Dyalog APL.")
    'qemu-old',
    'stp/papers/',
    'stp/tests',
    # The following directory contains a symlink to /dev/random
    # which makes QtCreator search go crazy
    'klee/runtime/POSIX/testing-dir',
]

if os.path.isdir('.git'):
    git_files = Popen(['git', 'ls-files'],
                  stdout=PIPE).communicate()[0].split('\n')
else:
    sys.stderr.write('This is not a git repository!\n')
    sys.exit(1)

git_files.sort()

dirs = set([""])
s2e_files = open('s2e.files', 'w')
s2e_includes = open('s2e.includes', 'w')
for fname in git_files:
    for b in blacklist:
        if fname.startswith(b):
            break
    else:
        if not os.path.isdir(fname):
            s2e_files.write(fname + '\n')

            fdir = fname
            while fdir != "":
                fdir = os.path.dirname(fdir)
Example #3
0
    for b in blacklist:
        if fname.startswith(b):
            return True

    return False


if os.path.isdir('.git'):
    git_files = Popen(['git', 'ls-files'],
                  stdout=PIPE).communicate()[0].split('\n')
else:
    sys.stderr.write('This is not a git repository!\n')
    sys.exit(1)

git_files.sort()

dirs = set([""])
qemu_files = open('qemu.files', 'w')
qemu_includes = open('qemu.includes', 'w')
for fname in git_files:
    if is_blacklisted(fname):
        break

    if not os.path.isdir(fname):
        qemu_files.write(fname + '\n')

        fdir = fname
        while fdir != "":
            fdir = os.path.dirname(fdir)
            if fdir not in dirs and os.path.isdir(fdir):
Example #4
0
 def list_branches(self):
     'list existing branches, with current branch first'
     l = Popen(["git", "branch"], stdout=PIPE).communicate()[0].split('\n')[:-1]
     l.sort(reverse=True) # force starred branch to be first
     return [s[2:] for s in l]
Example #5
0
 def list_branches(self):
     'list existing branches, with current branch first'
     l = Popen(["git", "branch"],
               stdout=PIPE).communicate()[0].split('\n')[:-1]
     l.sort(reverse=True)  # force starred branch to be first
     return [s[2:] for s in l]