Skip to content

Auth needed "git" repository pull slow #147

Description

@delijati

There is problem with auth needed repositories, it seems that after sending username and password the pull request takes very long. As i figured out thats because reading from stderr produces that delay.

This seems not a mr.developer bug but it cold be fixed there and maybe someone is having the same error with some other vcs.

Steps to reproduce:

  1. Private repo bitbucket or a self hosted with rhodecode with auth needed
  2. Clone repo
  3. Run time git pull 2>&1 | tee it should take much longer that time git pull or run the example code from this gist [1]. The output form the gist [2]

As you can see if we use tempfile the problem is solved.

So i would propose to change the code to use tempfile insted of suprocess.PIPE. Just as remark i also tried setting O_NONBLOCK flag. [3]

Use versions:

  • Python: Python 3.4.2
  • Git: git version 2.1.0
  • OS: Ubuntu 14.10

[1] https://gist.github.com/delijati/e1ff03c3ad40dfe225ba
[2] https://gist.github.com/delijati/10d78d4f4f681851603d
[3] http://eyalarubas.com/python-subproc-nonblock.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions