New User Question: Can the work directory and repository reside in different locations?

View: New views
4 Messages — Rating Filter:   Alert me  

New User Question: Can the work directory and repository reside in different locations?

by David Knoll :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello all,

 

I'm a new Mercurial user and I have a basic question.  Can a Mercurial repository be located in a different directory/drive than its working directory?  I'd like for my working directory to reside on my local hard drive and the repository to reside on a mapped network drive that is backed up nightly.

 

Using TortoiseHg I can create repositories anywhere but I find I can only add files to a repository that resides within my working directory.  I don't see anywhere in the documentation any examples that indicate that the repository can reside elsewhere.  Is this possible with Mercurial?  I used to be able to do this with PVCS.

 

Thanks in advance for any clarifications or suggestions.

 

David Knoll

 

P.S. BTW, I'm running on Windows Vista 64-bit.

 

 


_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: New User Question: Can the work directory and repository reside in different locations?

by Steve Losh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Take a look at the Share Extension -- you can create a repo on the network drive and then 'hg share' it to your local drive.  When you commit in the local working directory, the data will actually go to the repo on the network drive.

http://mercurial.selenic.com/wiki/ShareExtension

--
Steve Losh
http://stevelosh.com/



On Oct 29, 2009, at 8:04 PM, David Knoll wrote:

Hello all,
 
I'm a new Mercurial user and I have a basic question.  Can a Mercurial repository be located in a different directory/drive than its working directory?  I'd like for my working directory to reside on my local hard drive and the repository to reside on a mapped network drive that is backed up nightly.
 
Using TortoiseHg I can create repositories anywhere but I find I can only add files to a repository that resides within my working directory.  I don't see anywhere in the documentation any examples that indicate that the repository can reside elsewhere.  Is this possible with Mercurial?  I used to be able to do this with PVCS.
 
Thanks in advance for any clarifications or suggestions.
 
David Knoll
 
P.S. BTW, I'm running on Windows Vista 64-bit.
 
 
_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial


_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: New User Question: Can the work directory and repository reside in different locations?

by Ted Pavlic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David --

> I'm a new Mercurial user and I have a basic question. Can a Mercurial
> repository be located in a different directory/drive than its working
> directory? I'd like for my working directory to reside on my local hard
> drive and the repository to reside on a mapped network drive that is
> backed up nightly.

        See:

man hg

In particular, check out the options:

        -R, --repository
                repository root directory or name of overlay bundle file

        --cwd  change working directory

If Mercurial works like git, then you should be able to use these to put
your repository and working directories in different places. You can
create aliases that automatically setup -R and --cwd like you want.

        Alternatively, you could load your repository on one drive and clone
the repository to the other where you do your work. Just remember to
push your changes back to the original drive.

        Best --
        Ted


--
Ted Pavlic <ted@...>

   Please visit my 2009 d'Feet ALS walk page:
         http://web.alsa.org/goto/tedp
   My family appreciates your support in the fight to defeat ALS.
_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: New User Question: Can the work directory and repository reside in different locations?

by Martin Geisler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ted Pavlic <ted@...> writes:

> David --
>
>> I'm a new Mercurial user and I have a basic question. Can a Mercurial
>> repository be located in a different directory/drive than its working
>> directory? I'd like for my working directory to reside on my local
>> hard drive and the repository to reside on a mapped network drive
>> that is backed up nightly.
>
> See:
>
> man hg
>
> In particular, check out the options:
>
> -R, --repository
> repository root directory or name of overlay bundle file
>
>         --cwd  change working directory
>
> If Mercurial works like git,

Have you tried using the above options? They are not really related to
the question at hand.

--
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial