How to remove a specified version of a file from repository
Martin Geisler
mg at lazybytes.net
Wed Feb 9 08:55:08 UTC 2011
vivek_12315 <vivekchaurasiya at gmail.com> writes:
> Hello all,
>
> I have a file in repo. with version 1, 2, 3 in chronological order.
>
> Just that, while check in of version 2 .... some irregular spaces/
> indentation crept it.
>
> So, I corrected the tabs/indents and re checked in which came to be
> version 3 ....
>
> So, can i remove version 2 from repo. so that i can diff b/w version 1
> and 3 and throw the version 2.
>
> Any suggestions ?
Just leave it be -- it is fine to have both the error and the cleanup
changeset in the repository. The history is generally immutable with
Mercurial, so the way you fix mistakes is the way you did it: by adding
more history.
Instead of trying to avoid mistakes and make things perfect up front, it
is much better to have ways of fixing problems.
The only case where you should consider modifying the history is if you
commit something that would be illegal to share -- credit card numbers
or something like that. In that case you can take a look at
http://mercurial.selenic.com/wiki/EditingHistory
to see what your options are and what the consequences are.
--
Martin Geisler
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20110209/ad9fc15b/attachment.asc>
More information about the Mercurial
mailing list