I'm having a problem where I am unable to run git subrepo pull name without getting:
The last sync point (where upstream and the subrepo were equal) is not an ancestor.
This happens every time if there are any changes to the upstream repository. It doesn't matter if I merge-commit a pull request, push a change via git subrepo push or just make a plain commit to the upstream repository. Any other repository that tries to pull down the changes has to first edit the .gitrepo file replacing the subrpo parent with the the one suggested in the error message, commit that, then the subrepo pull works fine.
Just to be clear, assume I have an upstream repository called bar and I use git subrepo to add it to a foo_a and foo_b repository, both in a bar/ subdirectory. In foo_a I make a change in the local bar/ directory and commit it. I call git subrepo push bar which works fine (I verified that the commit showed up in the bar repository). I then go to the foo_b repository and call git subrepo pull bar and get the above failure message.
So am I doing something wrong? It's rather annoying that I have to hand-edit and commit the .gitrepo file any time there was an upstream change. It works, but since subrepo apparently does know the correct parent (since it suggests it in the error text) is there a way to get subrepo to switch to the correct parent instead of requiring that I hand-edit the .gitrepo file every time I want to pick up changes?
I'm having a problem where I am unable to run
git subrepo pull name
without getting:This happens every time if there are any changes to the upstream repository. It doesn't matter if I merge-commit a pull request, push a change via
git subrepo push
or just make a plain commit to the upstream repository. Any other repository that tries to pull down the changes has to first edit the .gitrepo file replacing the subrpo parent with the the one suggested in the error message, commit that, then the subrepo pull works fine.Just to be clear, assume I have an upstream repository called
bar
and I use git subrepo to add it to afoo_a
andfoo_b
repository, both in abar/
subdirectory. Infoo_a
I make a change in the local bar/ directory and commit it. I callgit subrepo push bar
which works fine (I verified that the commit showed up in the bar repository). I then go to thefoo_b
repository and callgit subrepo pull bar
and get the above failure message.So am I doing something wrong? It's rather annoying that I have to hand-edit and commit the .gitrepo file any time there was an upstream change. It works, but since subrepo apparently does know the correct parent (since it suggests it in the error text) is there a way to get subrepo to switch to the correct parent instead of requiring that I hand-edit the .gitrepo file every time I want to pick up changes?