Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial subrepo - changed .hgsub file but it still tries to pull from old server

I have a mercurial repo with a subrepo:

repo
  subrepo
  .hgsub

The .hgsub originally had

subrepo = https://<domain>/user/repo

and domain was set up with my dns to point to bitbucket (I was playing around with their custom domains feature).

I've now changed .hgsub to:

subrepo = https://[email protected]/user/repo

But when I try to pull from the subrepo I get the error:

abort: <domain> certificate error: certificate is for bitbucket.org

Which means it is still trying to pull from my domain rather than from bitbucket.

I've checked my repo/subrepo/.hg/hgrc file and it correctly updated to:

[paths]
default = https://[email protected]/user/repo

Why is it still trying to pull from the old domain?

If I try to push from repo then it pushes correctly to bitbucket.

Edit: Actually, push from the subrepo doesn't work but does work from the parent repo

repo > push - works, pushes to bitbucket

subrepo > pull - doesn't work, tries to pull from my domain

subrepo > push - doesn't work, tries to pull from my domain

like image 254
carpat Avatar asked Jan 25 '26 19:01

carpat


1 Answers

You need to re-clone the nested repository after you have changed .hgsub

like image 73
zerkms Avatar answered Jan 28 '26 07:01

zerkms



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!