Any way to relate repos w/o cloning?

Ted Pavlic ted at tedpavlic.com
Thu Nov 13 10:25:55 CST 2008


>     You still should be able to "pull -f", this will create another head
>     in your repository, and then, once merge, you should be able to push
>     to your colleague ...
> 
> Aha!  I guess I should have tried "hg help pull" first :).  So, I did 
> this, and the pull worked (did not have errors).  But one question now.  
> I know that there are changes in the files in the repo I pulled from, 
> but when I do "hg st" in the recipient directory, no changes are 
> reported.  Since the repo pulled from that changed repo, shouldn't "hg 
> st" report those differences in my current repo?

First: By itself, pulling doesn't change the working directory. That is, 
you need to "hg update" after the pull in order to get the working 
directory in sync with the new tip (note: an "hg merge" might be 
required here; after the merge, you'll have to check in the resulting 
working directory as a new changeset).

Second: "hg status" detects whether the working directory has changed 
with respect to the repo. Doing an "hg pull" followed by an "hg update" 
will not cause "hg status" to report any change because the working 
directory will be in sync with an existing changeset. However, if a 
MERGE operation is required, then the working directory will have NOVEL 
changes, and those novel changes will be reported by "hg status" (and 
you'll have to check them in with "hg commit").

--Ted


-- 
Ted Pavlic <ted at tedpavlic.com>


More information about the Mercurial mailing list