Ejemplo n.º 1
0
def reposetup(ui, repo):
    if repo.local() and repo not in wslist:
        wslist[repo] = WorkSpace(repo)

        if ui.interactive() and sys.stdin.isatty():
            ui.setconfig('hooks', 'preoutgoing.cdm_pbconfirm',
                         'python:hgext_cdm.pbconfirm')
Ejemplo n.º 2
0
def reposetup(ui, repo):
    if repo.local() and repo not in wslist:
        wslist[repo] = WorkSpace(repo)

        if Version.at_least("1.3"):
            interactive = ui.interactive()
        else:
            interactive = ui.interactive

        if interactive and sys.stdin.isatty():
            ui.setconfig('hooks', 'preoutgoing.cdm_pbconfirm',
                         'python:hgext_cdm.pbconfirm')
Ejemplo n.º 3
0
            wspath = arg
        elif opt == '-o':
            outputfile = arg
        elif opt == '-p':
            parentpath = arg

    if not wspath:
        usage()

    try:
        repository = hg.repository(ui.ui(), wspath)
    except HgRepoError, e:
        sys.stderr.write("failed to open repository: %s\n" % e)
        sys.exit(1)

    ws = WorkSpace(repository)
    act = ws.active(parentpath)

    node = act.parenttip.node()
    parenttip = binascii.hexlify(node)

    fh = None
    if outputfile:
        try:
            fh = open(outputfile, 'w')
        except EnvironmentError, e:
            sys.stderr.write("could not open output file: %s\n" % e)
            sys.exit(1)
    else:
        fh = sys.stdout
Ejemplo n.º 4
0
            wspath = arg
        elif opt == '-o':
            outputfile = arg
        elif opt == '-p':
            parentpath = arg

    if not wspath:
        usage()

    try:
        repository = hg.repository(ui.ui(), wspath)
    except error.RepoError, e:
        sys.stderr.write("failed to open repository: %s\n" % e)
        sys.exit(1)

    ws = WorkSpace(repository)
    act = ws.active(parentpath)

    node = act.parenttip.node()
    parenttip = binascii.hexlify(node)

    fh = None
    if outputfile:
        try:
            fh = open(outputfile, 'w')
        except EnvironmentError, e:
            sys.stderr.write("could not open output file: %s\n" % e)
            sys.exit(1)
    else:
        fh = sys.stdout
Ejemplo n.º 5
0
def reposetup(ui, repo):
    if repo.local() and repo not in wslist:
        wslist[repo] = WorkSpace(repo)

        ui.setconfig('hooks', 'preoutgoing.cdm_pbconfirm',
                     'python:hgext_cdm.pbconfirm')