3

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://user@bitbucket.org/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://user@bitbucket.org/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

carpat
  • 861
  • 10
  • 25
  • So in your last actual revision your `.hgsub` has correct path? – zerkms Jun 12 '12 at 21:10
  • 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 Jun 12 '12 at 21:15
  • Edited question, `push` works from the parent repo but not from the subrepo. – carpat Jun 12 '12 at 21:21
  • have you re-cloned the nested repository after changed `.hgsub`? – zerkms Jun 12 '12 at 21:26
  • Just did, and that fixed it. I guess it is cached somewhere. If you add an answer I'll accept it. – carpat Jun 12 '12 at 21:45

1 Answers1

2

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

zerkms
  • 249,484
  • 69
  • 436
  • 539