Confused repository.
Matt Mackall
mpm at selenic.com
Tue Dec 2 20:39:03 UTC 2014
On Tue, 2014-12-02 at 12:36 -0600, Rob Landley wrote:
> On 12/02/14 06:29, Simon King wrote:
> > On Tue, Dec 2, 2014 at 9:02 AM, Rob Landley <rob at landley.net> wrote:
> >> I accidentally commited a change on top of another change I thought I'd
> >> rolled back, and since rollback won't go more than one back that means
> >> my working repository is toast,
> >
> > Before I answer your other questions, I should point out that the
> > recommended way to fix this would be to "hg update" to the parent of
> > the change that you didn't want, and if necessary use "hg graft" to
> > transfer the commit that you *did* want into the right place.
> > Unfortunately, this will leave a dangling pair of changes in your
> > repository, which will cause errors when you "hg push" unless you
> > specify which revision you want to push.
> >
> > The safest way to remove the dangling changes is to clone your local
> > repository using the "-r" switch to specify the revision that you want
> > to keep.
>
> Unfortunately dreamhost has a history of leaving old (security pached
> but not version updated) software on the server, and I've hit a problem
> several times where I cloned locally and then rsynced up a .hg that the
> webserver couldn't read because I forgot to init it with
> --no-spinning-rims or whatever the new feature was the old thing didn't
> understand. And then I always have an hour of tracking down what it was
> and fixing it.
This is because you're using rsync, rather than Mercurial's own
synchronization methods. Mercurial itself is compatible across versions
from 3.2.2 (yesterday) all the way back to 0.5 or so (2005) over the
wire. You can always convert between versions by creating a repo with
one version and pushing/pulling to it.
But if you want to ensure on-disk format compatibility with some old
version for newly-created repos, you can put this in your ~/.hgrc:
[format]
# hg < 1.7 (2010)
dotencode=False
# hg < 1.1 (2008)
usefncache=False
# hg < 0.9.4 (2007)
usestore=False
http://mercurial.selenic.com/wiki/UpgradingMercurial
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list