Working with Eclipse and installed MercurialEclipse faced with error "unknown format 114". My repository contained committed, inactive and not pushed revision in bookmark. Problem occurred in the middle of revision history, don't know how.
Here we have broken revision #2660. Total number of revisions is 3098.
According to Mercurial Repository Corruption wiki found out how to solve it.
Save repository backup before modifying it.
Here we have broken revision #2660. Total number of revisions is 3098.
According to Mercurial Repository Corruption wiki found out how to solve it.
Save repository backup before modifying it.
- Clone current (broken) repository up to untouched revision #2659 to a new one (fixed):
C:\U\DL\workspace> hg clone -r 2659 broken fixed adding changesets adding manifests adding file changes added 2660 changesets with 16958 changes to 5163 files updating to branch default 3910 files updated, 0 files merged, 0 files removed, 0 files unresolved
- Pull other changes from remote repository:
C:\U\DL\workspace\> cd fixed C:\U\DL\workspace\fixed> hg pull http://hg.host.example/project/ pulling from http://hg.host.example/project/ searching for changes adding changesets adding manifests adding file changes added 439 changesets with 2335 changes to 1062 files (run 'hg update' to get a working copy)
- Now we have working copy from remote repository with local bookmarks. Next step pull from broken local repository unpushed commit. In my case it was revision #3096:
C:\U\DL\workspace\fixed> hg pull http://hg.host.example/project/
pulling from C:\Users\DanilLopatin\workspace\broken searching for changes adding changesets adding manifests adding file changes added 1 changesets with 17 changes to 17 files (+1 heads) adding remote bookmark TAReport (run 'hg heads' to see heads, 'hg merge' to merge)
- Check repository status and heads to ensure everything has been moved.
C:\U\DL\workspace\fixed> hg head changeset: 3099:4a2c6e365e37 bookmark: TAReport tag: tip parent: 3095:eb47f5a393fb user: Danil Lopatin date: Mon Mar 09 13:45:35 2015 summary: Task (Maintenance) #13148: 2015 Questionnaire changes - Methodology up changeset: 3098:239ca417382b user: Your Teammate date: Tue Mar 10 18:58:46 2015 summary: Bug (Maintenance) #13243: Drag and drop not working in IE 9 C:\U\DL\workspace\fixed> hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files 5599 files, 3100 changesets, 19310 total revisions
- Two options to restore eclipse project:
- Use merge tools (Meld, KDiff3) and move files from broken repository to a new one.
- Copy hg folder to broken and restore files from hg:
- Open fixed repository ./fixed/.hg and copy all files except hgrc file to ./broken/.hg
- Run hg revert -a on broken repository to revert all files to active revision. Note, if there are some uncommitted files, copy them before!
- Update to required revision: hg update -r 3098. Check all files was updated and there are no uncommitted.
No comments :
Post a Comment