3
votes

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

1
So in your last actual revision your .hgsub has correct path?zerkms
Yes, the .hgsub has the correct path, I have both committed and pushed it to the remote repo. push works fine but pull and incoming throw the same error.carpat
Edited question, push works from the parent repo but not from the subrepo.carpat
have you re-cloned the nested repository after changed .hgsub?zerkms
Just did, and that fixed it. I guess it is cached somewhere. If you add an answer I'll accept it.carpat

1 Answers

2
votes

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