Pushing to github (forked repo) topics seem not to work

5 views
Skip to first unread message

Uwe Brauer

unread,
Oct 10, 2024, 3:40:02 AM10/10/24
to via hg-git, Uwe Brauer

Hi Purpose, I fork a github repository, want to add one change set, on a new branch, and then open a pull request. I could do this with either bookmarks or the new hg-git-mode = branches feature.

However for one changeset creating a named branch seems to much, so I thought of using topics.

It did not work out as expected.

Steps:

  1. I fork the github repo https://github.com/melpa/melpa (but just their main branch, the master branch).
  2. I just clone this repository but with
[hggit]
usephases = yes
[git]
defaultbranch = master
use_namespaces = True 
[experimental]
enforce-topic = True
hg-git-mode = branches

If I use hg-git-mode = branches, then hg-git imports all commits to the default branch, so if I push then it creates a new branch default, which will confuse.

Now I add a new change set, with the topic matlab

[hggit]
usephases = yes
[git]
defaultbranch = master
use_namespaces = True 
[experimental]
enforce-topic = True
hg-git-mode = topic
graph-group-branches = True
graph-group-branches.firstbranch = .

hg branches shows me

hg branches
master//matlab             13613:79838b8ddafd
master                     13612:b87ade8fbcdd (inactive)
matlab-recipe              10600:4e1e0662a036 (inactive)

And github refuses this push

hg push
pushing to git+ssh://g...@github.com:ouboub/melpa-matlab.git
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
searching for changes
 recipes/matlab-mode |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
adding objects
remote: found 0 deltas to reuse
remote: refusing to create funny ref 'refs/heads/master//matlab' remotely
remote:
remote: Create a pull request for 'matlab-recipe' on GitHub by visiting:
remote:      https://github.com/ouboub/melpa-matlab/pull/new/matlab-recipe
remote:
added 1 commits with 2 trees and 1 blobs
warning: failed to update refs/heads/master//matlab; funny refname
adding reference refs/heads/matlab-recipe
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.

Conclusion, for this use case, topics do not work (but it is anyhow experimental)

Any comments?

Uwe Brauer

Reply all
Reply to author
Forward
0 new messages