Revert, then commit, then revert again
Samuel Sumner
ssumneraum at gmail.com
Tue Jan 8 15:49:13 UTC 2013
On Mon, Jan 7, 2013 at 2:24 PM, Kevin Bullock <
kbullock+mercurial at ringworld.org> wrote:
> On Jan 7, 2013, at 12:37 PM, Samuel Sumner wrote:
>
> > So I was working on a project in C++ that we had source controlled in
> Mercurial. I eventually had made so many mistakes on the last revision,
> that I wasn't getting anywhere
>
> And did you commit any of these changes?
>
> Yes, I committed to my local repository (but did not push to the central
repository, as changes were not stable).
> > so I reverted:
> >
> > hg update -r 23
> >
> > Then I made some successful changes, and committed normally.
> >
> > hg commit -u .....
> >
> > I still have a few minor mistakes, and in trying to solve them I realize
> I had written some code in the first tip (before the revert). Is there any
> way to see the files from that revision? Or have the changes been
> overwritten by the subsequent commit?
>
>
> If you had committed before the update -r23, those changes are still in
> the repository. You can:
>
> - see the heads of both lines of development with `hg heads`
>
'hg heads' shows only two heads: rev 24 (the most recent changes, resulting
from a commit after the update -r 23) and rev. 23 itself.
> - see the graph of branches with `hg log --graph`
> - update to the other head with `hg update REV`, where REV is the local
> revision number or changeset ID you found with `hg heads`,
> - merge the two branches together with `hg merge REV`
>
> Etc. See one or more of:
>
> http://mercurial.selenic.com/wiki/Tutorial
> http://mercurial.selenic.com/wiki/QuickStart
> http://hgbook.red-bean.com
> http://hginit.com
pacem in terris / мир / शान्ति / سَلاَم / 平和
> Kevin R. Bullock
>
>
It appears that that particular revision is not there, or it is possible
that I forgot to commit, although I could have sworn I did. If there is no
other way to look up any revisions that are not showing, then I must have
overwritten the changes without committing. Thanks for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130108/8450ba23/attachment-0002.html>
More information about the Mercurial
mailing list