Update not working with multiple paths specified in hgrc

Chandran.external at lantiq.com Chandran.external at lantiq.com
Tue Jan 18 06:00:25 CST 2011


The repo test_orig is a central repository from where each user is supposed to clone and push/pull his changes
Test1 and test2 are clones of this repository in individual developer pc's. The problem is that the developer will create this clone in linux environment.. and whatever modifications are made to this clone, can be accessed on windows using a windows share.

The issue was that i created a clone of test_orig using a physical to the repo. Path in linux environment is greek and latin to windows.. and hence the error.
I have found a workaround to this by hosting the central repository on archiva server. This ways when i create a clone using the http:// or https:// link, the default path will contain the https:// or http:// in it which is perfectly understandable to both unix and linux.
Thanks for the help anyways.

Regards,
Sharat Chandran

From: Jouni Airaksinen [mailto:Jouni.Airaksinen at descom.fi]
Sent: Tuesday, January 18, 2011 3:43 PM
To: Chandran Sharat (LQIN CPE SDC SWNW / External)
Cc: mercurial at selenic.com; mercurial-bounces at selenic.com; sharatchandran_1986 at yahoo.co.in
Subject: Re: Update not working with multiple paths specified in hgrc

I'm sure someone will ask this sooner or later so I might as well be the one. Is there any specific reason you are sharing single repository clone between different users? More specifically, what are you trying to solve with this setup? Why cannot every user have a local clone and push/pull from there? That would be the distributed way.

What is your update doing as it shouldn't do any pull by default? Are you sure you didn't try just plain "hg pull" on linux machine, because that way the error message would make sense when using the "default" path. Other than that I don't see any problems with your setup, besides the obvious caveat which is due shared working directory what version control in general is trying to solve.



From:        <Chandran.external at lantiq.com>
To:        <mercurial at selenic.com>
Cc:        sharatchandran_1986 at yahoo.co.in
Date:        18.01.2011 11.51
Subject:        Update not working with multiple paths specified in hgrc
Sent by:        mercurial-bounces at selenic.com
________________________________



Hi,

In the project i work for, we have developers working both on linux and windows environment.
The repository created on linux is accessible on windows using a harmonized network drive.
I was wondering if there was any way of executing all mercurial commands on this mercurial repository shared between windows and linux platforms.
Here is the scenario:
I have a directory in linux say /home/xyz which is accessible on windows platform on a mapped network drive Z:\
I clone a repository test from /home/xyz/test_orig into /home/xyz. This repository automatically becomes accessible on windows platform as Z:\test
The .hg/hgrc file will contain the path from where i cloned this repository (/home/xyz/test_orig) as an entry

[path]
default = /home/xyz/test_orig

This means that any push/pull i perform from unix environment will push/pull changes to/from the repo specified in the default path.
However, the same command if issued on Windows platform fails stating that /home/xyz/test_orig is not accessible
Now i tweaked the hgrc file a bit to add another entry for windows
My hgrc file for the repository test now looks like the following

[path]
default = Z:\test_orig
default1 = /home/xyz/test_orig

Push/pull and update works seamlessly on windows platform now.

Now there is another repository say test2 at /home/xyz/test2 which is again cloned from /home/xyz/test_orig
The hgrc file for this repository is identical to that of the repository test

[path]
default = Z:\test_orig
default1 = /home/xyz/test_orig

On linux platform, i was able to pull  changes from test_orig by using the command
hg pull default1
However on executing the update command it failed giving the error :

hg update
pulling subrepo abc from /home/xyz/test2/Z:\test_orig/abc
abort: repository /home/xyz/test2/Z:\test_orig/abc not found!

On searching, i found that having multiple paths is supported in mercurial so as to have push and pull to separate repositories.
Is this feature full fledged so that it supports update and other mercurial commands too?

I kind of stuck here and this is a bit critical. It would be great if someone could respond to this mail ASAP and guide me.

Thanks and Regards,
Sharat Chandran
Ph: 0091 9538948469

_______________________________________________
Mercurial mailing list
Mercurial at selenic.com
http://selenic.com/mailman/listinfo/mercurial
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20110118/92c3eba8/attachment.htm>


More information about the Mercurial mailing list