Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninformative exception on pushing to repo #42

Closed
rchl opened this issue May 19, 2013 · 1 comment
Closed

Uninformative exception on pushing to repo #42

rchl opened this issue May 19, 2013 · 1 comment

Comments

@rchl
Copy link
Collaborator

rchl commented May 19, 2013

I can clone newly created repo. I've also created a commit and tried to push but getting this:

% g push origin HEAD:test
Counting objects: 3, done.
Writing objects: 100% (3/3), 233 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: An exception was raised while processing the request.  A message has
remote: been sent to the system administrator(s).
To xxx.xxx.xxx:/var/git/test.git
 ! [remote rejected] HEAD -> test (pre-receive hook declined)
error: failed to push some refs to 'xxx.xxx.xxx:/var/git/test.git'

In the log I see this:

Request:
{
  "repository_name": "test",
  "refs": [
    {
      "new_sha1": "cff12eff12a224e8f0aa33d78ae119067538c1f3",
      "name": "refs/heads/test",
      "old_sha1": "0000000000000000000000000000000000000000"
    }
  ],
  "user_name": "rchlodnicki"
}

Traceback (most recent call last):
  File "background/githook.py", line 111, in <module>
    index.createBranches(user_name, repository_name, create_branches)
  File "/usr/share/critic/index.py", line 155, in createBranches
    for name, head in branches: processCommits(repository_name, head)
  File "/usr/share/critic/index.py", line 89, in processCommits
    commit = gitutils.Commit.fromSHA1(db, repository, sha1)
  File "/usr/share/critic/gitutils.py", line 665, in fromSHA1
    return Commit.fromGitObject(db, repository, repository.fetch(sha1), commit_id)
  File "/usr/share/critic/gitutils.py", line 259, in fetch
    stdin.write(sha1 + '\n')
IOError: [Errno 32] Broken pipe

Filed this for the record. I'll submit a fix.

jensl pushed a commit that referenced this issue May 19, 2013
Report 'git cat-file's standard output in case of failure to
make problems easier to diagnose.

Issue #42
@rchl
Copy link
Collaborator Author

rchl commented May 19, 2013

Referenced commit improves exception message.

@rchl rchl closed this as completed May 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant