Rolling back
calvin
calvin at genesisweb.co.nz
Tue Sep 2 18:00:59 CDT 2008
Hi,
Thanks for reply Jorge and Paul.
I followed Jorge's instruction. Made a clean clone from the main repo
(server) and did "hg rollback". I also wanted remove the last commit
(which was merging with other guys copy), so I did "hg push" to the
server, but it returned "no changes found".
Is there a way to remove the last commit on the server repo (main) too?
Thanks in advance
Calvin
Jorge Vargas wrote:
> 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
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20080903/5b1429fd/attachment.htm
More information about the Mercurial
mailing list