[issue2384] Subrepositories: pull operation is not executed in subrepos

Thiago Araújo <bugs@mercurial.selenic.com> at mercurial.selenic.com Thiago Araújo <bugs@mercurial.selenic.com> at mercurial.selenic.com
Fri Sep 17 17:38:44 CDT 2010


New submission from Thiago Araújo <taraujoz at gmail.com>:

Case:

On "server" machine we have two repositories:
 - server_project
 - server_sub

with the following "server_projet/.hgsub":
  sub = ../server_sub

On "client" or "developer" machine we do clone on "server_project". Name it "project":
~/> hg clone [ssh/http]://......./server_project project

OK, works fine! 


Issues:

1) pull should behave the same as clone. currently it does not, that is:
 ~/project> hg pull

Will not pull from "server_sub" unless there is also a change on ".hgsubstate". There is an asymmetry 
with clone, because doing:
 ~/> hg clone [...]server_project project2

will bring the latest revision of server_sub (not the working dir, of course).


2) clone is writing a wrong url in "project/sub/.hg/hgrc"

Either the url doesn't exist (in case there is no working dir on "server_project"):
 ~/project/sub> hg pull
 abort: repository [...]/server_project/sub not found!

Or it will lead to the use of another copy of the sub repository on the server (with the url above - 
if it exists on server). Therefore we will have two repos for the same thing on server: "server_sub" 
and "server_project/sub".

Suggestion: write a valid URL in "project/sub/.hg/hgrc" which resolves to the same url used in clone, 
pull or push from the parent ("project"):
 ssh://......./server_project/../server_sub

----------
messages: 13645
nosy: taraujoz
priority: bug
status: unread
title: Subrepositories: pull operation is not executed in subrepos

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2384>
____________________________________________________


More information about the Mercurial-devel mailing list