Rolling back
Jorge Vargas
jorge.vargas at gmail.com
Tue Sep 2 16:12:10 CDT 2008
On Tue, Sep 2, 2008 at 2:33 AM, Paul R <paul.r.ml at gmail.com> wrote:
>
> Calvin> There was a tip in the main repo, and I had a clone. I made
> Calvin> some changes to the local, committed, and I pulled the tip
> Calvin> from the server. I merged it with local, updated, committed
> Calvin> again and pushed to the main repo. However, later on I found
> Calvin> out that I accidentally removed some important files when
> Calvin> "merging, updating" period. I tried to use "hg revert", "hg
> Calvin> rollback" but nothing worked (I reckon I used incorrectly) my
> Calvin> local repo is messed up - have some missing files.
> Calvin>
> Calvin> Is there any way to rollback to a moment before
> Calvin> merging/updating process?
>
> Jorge> so both your local and remote repo are missing the files? then
> Jorge> you only option is to eliminate those revs. here is an
> Jorge> explanation on how to clone/export to eliminate the offending
> Jorge> changesets.
>
> If calvin only wants his files back, that's a pretty bad solution IMO.
I think he wants his files back and wants to keep the relevant
changes, so the optimal solution will be to eliminate the offending
checkins. But your right he could just get the files and do a new
checkin readding them.
> Calvin, Jorge, when you say "repo", don't you mean "checkout copy" ?
I don't think so because he is talking about push and merge which
imply he files got "lost" on the server too.
> Calvin, if you checked in your "missing files" at some point, they are
> still in the repository, although they are missing in your checkout
> copy of the tip (if you 'hg remove'ed them later). To get them back,
> just update to a revision when they still existed in the working copy,
> and they will reappear.
>
As I said above, that also possible but at least to me I'll prefer a
non-broken history.
> hg help update
>
>
> --
> Paul
>
More information about the Mercurial
mailing list