Thread: Re: Multiple head revisions after git pull (2.0rc1 --> 2.0)
Just to clarify, this is not a git question
Op 1 nov. 2017 12:19 p.m. schreef "Willy-Bas Loos" <willybas@gmail.com>:
Hi,After my stash & pull to upgrade from 2.0rc1 to 2.0, these commands both end in the error below.
- ../web$ FLASK_APP=pgAdmin4.py flask db revision
- ../web$ python pgAdmin4.py
File "/home/wbloos/.virtualenvs/pgadmin4/lib/python3.5/site- packages/alembic/script/ revision.py", line 270, in get_current_head
"%s@head" % branch_label if branch_label else "head")
alembic.util.exc.CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all headsI use Version: webpack 3.6.0Any tips?Cheers,--Willy-Bas Loos
I suspect you have some local revisions, Could you run below command and see if you have any local revisions?
../web$ FLASK_APP=pgAdmin4.py flask db history
You can compare it with what we(pgadmin4) have in revision history,
...
...
d85a62333272 -> ef590e979b0d (head), empty message
f195f9a4923d -> d85a62333272, empty message
3c1e4b6eda55 -> f195f9a4923d, Encrypt the existing user password.
09d53fca90c7 -> 3c1e4b6eda55, empty message
fdc58d9bd449 -> 09d53fca90c7, Update DB to version 14
<base> -> fdc58d9bd449, Initial database creation
--
Regards,
On Thu, Nov 2, 2017 at 3:37 PM, Willy-Bas Loos <willybas@gmail.com> wrote:
Just to clarify, this is not a git questionOp 1 nov. 2017 12:19 p.m. schreef "Willy-Bas Loos" <willybas@gmail.com>:Hi,After my stash & pull to upgrade from 2.0rc1 to 2.0, these commands both end in the error below.
- ../web$ FLASK_APP=pgAdmin4.py flask db revision
- ../web$ python pgAdmin4.py
File "/home/wbloos/.virtualenvs/pgadmin4/lib/python3.5/site-packa ges/alembic/script/revision. py", line 270, in get_current_head
"%s@head" % branch_label if branch_label else "head")
alembic.util.exc.CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all headsI use Version: webpack 3.6.0Any tips?Cheers,--Willy-Bas Loos
thanks for the answer.
flask won't give me a history, i get the same error (multiple head revisions).On Thu, Nov 2, 2017 at 12:07 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
I suspect you have some local revisions, Could you run below command and see if you have any local revisions?../web$ FLASK_APP=pgAdmin4.py flask db historyYou can compare it with what we(pgadmin4) have in revision history,......d85a62333272 -> ef590e979b0d (head), empty messagef195f9a4923d -> d85a62333272, empty message3c1e4b6eda55 -> f195f9a4923d, Encrypt the existing user password.09d53fca90c7 -> 3c1e4b6eda55, empty messagefdc58d9bd449 -> 09d53fca90c7, Update DB to version 14<base> -> fdc58d9bd449, Initial database creation--Regards,On Thu, Nov 2, 2017 at 3:37 PM, Willy-Bas Loos <willybas@gmail.com> wrote:Just to clarify, this is not a git questionOp 1 nov. 2017 12:19 p.m. schreef "Willy-Bas Loos" <willybas@gmail.com>:Hi,After my stash & pull to upgrade from 2.0rc1 to 2.0, these commands both end in the error below.
- ../web$ FLASK_APP=pgAdmin4.py flask db revision
- ../web$ python pgAdmin4.py
File "/home/wbloos/.virtualenvs/pgadmin4/lib/python3.5/site-packa ges/alembic/script/revision.py ", line 270, in get_current_head
"%s@head" % branch_label if branch_label else "head")
alembic.util.exc.CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all headsI use Version: webpack 3.6.0Any tips?Cheers,--Willy-Bas Loos
--
Willy-Bas Loos
Can you try following command see if that helps,
../web$ FLASK_APP=pgAdmin4.py flask db merge heads
Given command will try to merge two conflicting heads together automatically.
For more information refer alembic documentation: http://alembic.zzzcomputing.com/en/latest/branches.html
-- Murtuza
On Fri, Nov 3, 2017 at 3:40 PM, Willy-Bas Loos <willybas@gmail.com> wrote:
Willy-BasCheers,I don't mind doing a hard reset or anything. Is there a trick to get this back on track?But that doesn't help, still the same error.I've looked into the flask manual, and tried some things that the message suggests, like FLASK_APP=pgAdmin4.py flask db revision --head master@headthanks for the answer.flask won't give me a history, i get the same error (multiple head revisions).On Thu, Nov 2, 2017 at 12:07 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: I suspect you have some local revisions, Could you run below command and see if you have any local revisions?../web$ FLASK_APP=pgAdmin4.py flask db historyYou can compare it with what we(pgadmin4) have in revision history,......d85a62333272 -> ef590e979b0d (head), empty messagef195f9a4923d -> d85a62333272, empty message3c1e4b6eda55 -> f195f9a4923d, Encrypt the existing user password.09d53fca90c7 -> 3c1e4b6eda55, empty messagefdc58d9bd449 -> 09d53fca90c7, Update DB to version 14<base> -> fdc58d9bd449, Initial database creation--Regards,On Thu, Nov 2, 2017 at 3:37 PM, Willy-Bas Loos <willybas@gmail.com> wrote:Just to clarify, this is not a git questionOp 1 nov. 2017 12:19 p.m. schreef "Willy-Bas Loos" <willybas@gmail.com>:Hi,After my stash & pull to upgrade from 2.0rc1 to 2.0, these commands both end in the error below.
- ../web$ FLASK_APP=pgAdmin4.py flask db revision
- ../web$ python pgAdmin4.py
File "/home/wbloos/.virtualenvs/pgadmin4/lib/python3.5/site-packa ges/alembic/script/revision.py ", line 270, in get_current_head
"%s@head" % branch_label if branch_label else "head")
alembic.util.exc.CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all headsI use Version: webpack 3.6.0Any tips?Cheers,--Willy-Bas Loos
--Willy-Bas Loos
On Fri, Nov 3, 2017 at 1:14 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Can you try following command see if that helps,../web$ FLASK_APP=pgAdmin4.py flask db merge headsGiven command will try to merge two conflicting heads together automatically.For more information refer alembic documentation: http://alembic.zzzcomputing.com/en/latest/ branches.html -- Murtuza
That sounds and looks good and logical but it's not working
Whatever i do, i keep getting the same error.
I've attached a log, maybe it will clarify .
--
Willy-Bas Loos
Attachment
Your pgAdmin4 repo has local alembic revisions and you have to fix it manually by removing its respective files from directory '../pgadmin4/web/migrations/ versions', you can refer below given link how to do it manually OR if you are having difficulties doing it I would suggest you to git clone the pgAdmin4 repo once again.
alembic documents for merging two heads http://alembic.zzzcomputing. com/en/latest/branches.html# merging-branches
-- Murtuza
On Fri, Nov 3, 2017 at 7:06 PM, Willy-Bas Loos <willybas@gmail.com> wrote:
On Fri, Nov 3, 2017 at 1:14 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: Can you try following command see if that helps,../web$ FLASK_APP=pgAdmin4.py flask db merge headsGiven command will try to merge two conflicting heads together automatically.For more information refer alembic documentation: http://alembic.zzzcomputing.com/en/latest/bra nches.html -- MurtuzaThat sounds and looks good and logical but it's not workingWhatever i do, i keep getting the same error.I've attached a log, maybe it will clarify .
--Willy-Bas Loos