Newb question: placing .hg on network
David Spitzley
dspitzle at wash.k12.mi.us
Mon Dec 9 17:47:26 UTC 2013
Ah-ha, I am enlightened. Ok, base repository file in apps, replicate it to H: . Much obliged, that makes a lot of sense, and I suspect will give me some useful context for thinking about Mercurial going forward.
-----Original Message-----
From: Martin Geisler [mailto:martin at geisler.net]
Sent: Monday, December 09, 2013 12:44 PM
To: David Spitzley
Cc: 'mercurial at selenic.com'
Subject: Re: Newb question: placing .hg on network
David Spitzley <dspitzle at wash.k12.mi.us> writes:
> I've looked around online and tried searching the list archives, but
> I'm having trouble parsing an answer to my question if there is one.
> I'm working with Laravel on Windows 7 with IIS (probably immaterial in
> this case), I'm trying to set up my first repository to track my
> application files (C:\inetpub\laravel\app), and would like the .hg
> folder to be stored on my network drive (H:\) so that it gets backed
> up. What do I need to do to either override or work around Mercurial's
> default behavior of placing .hg in the root of the folder I'm
> versioning so that the repository winds up in H:\.hg rather than
> C:\intepub\laravel\app\.hg?
You cannot move the .hg folder outside of where your working files reside. That is by definition: the "working copy" *is* the parent directory of the .hg folder. So if you want to version files in
C:\inetpub\laravel\app
you must have
C:\inetpub\laravel\app\.hg
To get the content onto your H drive for backup purposes, I would suggest that you use the "distributed" part of DVCS. That is, create your repository on your C: drive like described above and then make a
*clone* of this somewhere on the H: drive.
You then push from the repository on the C: drive to the repository on to the H: drive regularly, say daily.
An alternative is to use the share extension shipped with Mercurial.
That basically links two repositories together to that a commit in one is immediatedly visible in the other -- if the other is on your backup drive, then that should work pretty good.
--
Martin Geisler
http://google.com/+MartinGeisler | http://careers.stackoverflow.com/mg
More information about the Mercurial
mailing list