Help. I've screwed up my repo again, and I have no idea how.
Rob Landley
rob at landley.net
Thu Nov 2 00:04:40 CST 2006
On Wednesday 01 November 2006 11:43 pm, Brendan Cully wrote:
> I really don't know how you got your repository into the state it was
> in (revisions 10 and 11 are not just branches, they are completely
> unrelated to the rest of your repo),
The frightening part is this isn't the first time I've done that. The
previous times, I just backed up to a saved tarball of the entire directory.
> but there is a simpler way to
> fix it:
>
> hg clone toybox tmp
> cd tmp
> hg merge
> hg commit -m'merge'
I understand up to that point. I suspect that right here there's a
missing "cd ../toybox"? Otherwise the ../tmp when we're in tmp is black
magic...
> hg pull ../tmp
> cp ../tmp/.hg/dirstate .hg
> rm -r ../tmp
>
> copying the dirstate is a little grody, but should work.
What's in dirstate, anyway?
One thing I've noticed in another repository I have lying around
is .hg/dirstate is owned by root (none of the other files are). Apparently I
did some hg thing while logged in as root, without noticing. This means that
on the next update as my normal user, it can't write to that file, but maybe
it doesn't notice that it can't?
Did I mention I have a knack for breaking stuff?
Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
More information about the Mercurial
mailing list