Adding git repo fails
| Project: | Version Control API |
| Version: | 5.x-1.2 |
| Component: | API module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I get these error messages when I try to add a git repo:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "versioncontrol_repositories_repo_id_seq" does not exist in /home/rmh3093/public_html/includes/database.pgsql.inc on line 125.
* user warning: query: SELECT nextval('versioncontrol_repositories_repo_id_seq') in /home/rmh3093/public_html/includes/database.pgsql.inc on line 144.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for integer: "b:0;" in /home/rmh3093/public_html/includes/database.pgsql.inc on line 125.
* user warning: query: INSERT INTO versioncontrol_git_repositories (update_method, repo_id) VALUES (0, 'b:0;') in /home/rmh3093/public_html/includes/database.pgsql.inc on line 144.

#1
If I run: CREATE SEQUENCE versioncontrol_repositories_repo_id_seq;
manually the error goes away
#2
I believe the Git backend doesn't create new repository ids, so that's likely an error in Version Control API itself (or versioncontrol-backend.inc, to be exact). But shouldn't db_next_id() generate a new sequence if it doesn't exist? Anyways, the INSERT error is most probably a follow-up to the incorrectly generated repo_id.