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

Pushes fail with the topic extension in use #140

Closed
ghost opened this issue Jul 10, 2020 · 3 comments
Closed

Pushes fail with the topic extension in use #140

ghost opened this issue Jul 10, 2020 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Jul 10, 2020

When I'm using the topic/evolve Mercurial extensions, pushes from within the vscode extension complain

Branch 'default' has multiple heads. Merge required before pushing.

Pushing from the command line has no such problem.

The topic extension does allow multiple heads in the view of tools unaware of it (including Mercurial where it has not been enabled). However, in this specific instance I don't even have multiple heads: the “topic branch” I'm in is simply ahead of what would be considered the head of “default”. hg heads only shows the head of the topic branch as a head, and Mercurial without the topic extension should also only see that head as a head. So I'm not sure how vscode-hg could be confused.

Alternatively it could be that Changeset Evolution “obsoleting” changesets is confusing vscode-hg, if it somehow tries to internally keep track of the state. But I haven't had this problem on repositories where I use Changeset Evolution and don't have topic branches.

Note that I'm not asking for vscode-hg to support the topic/evolve extensions, but at the same time, if the underlying Mercurial is aware of them, I don't think their use should confuse vscode-hg as currently seems to be the case.

@hdpoliveira
Copy link
Collaborator

This may have been fixed in #37.
@yadayadaydadaa could you please share instructions on how to reproduce the problem?

@ghost
Copy link
Author

ghost commented Jul 14, 2020

$ mkdir test
$ cd test
~/test$ hg init
~/test$ echo 1 > fubar
~/test$ hg add fubar
~/test$ hg commit -m init
~/test$ cat > .hg/hgrc << EOF
> [paths]
> default = ../test2
> EOF
~/test$ hg clone . ../test2
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
~/test$ hg topic test-topic
marked working directory as topic: test-topic
~/test$ code -n fubar 

Now edit the file in VSCode, commit (using vscode-hg). So far no problem. Try to push with vscode-hg: get the complaint.

@hdpoliveira hdpoliveira added the bug label Aug 3, 2020
@hdpoliveira
Copy link
Collaborator

hdpoliveira commented Aug 3, 2020

Just confirmed: this is fixed by #37 :)

The reason this happened is because 'hg log -r head()' (which was using for detecting multiple heads) returns two heads: the topic branch head, and the public head.

We now use 'hg log -r heads(all())' instead of 'hg log -r head()'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant