tortoisehg - How to reduce the size of Mercurial hg store. Hg store size is above 5GB and server gets timeout before cloning -
accidently checked-in 5gb around of files mercurial. our build server started failing during cloning of repo. reverted checked- in files using remove command. .hg/store/data still containing files. , it's size on 5gb. have searched on internet , found few methods, like: hg convert. hg convert creating new repo not desired in our case. cannot extend timeout period of our build server.
how remove bad check-in without making store in .hg/store/data? or how reduce size of .hg/store/data?
here's need do: need strip changesets.
since repository hosted on bitbucket, not have direct access files need use website provides.
in repository project, under settings, there section stripping out changesets.
note remove changesets committed on top of bad changeset. deal this.
i stress this:
- make
- sure
- you
- have
- backups!
here steps
important: if developer on team has pending locally, changesets not yet having been pushed bitbucket, have cloned bad changeset bitbucket, need more grafting, sure understand everything needs done before attempting this.
- make sure have backup and local clone of repository, this paramount (or stack overflow) not responsible if end losing changesets want keep in process. pay head warning above not-pushed-changesets other developers might have.
in local clone, first graft , changesets committed on top of bad changeset onto changeset directly preceeding it.
ie. if history looks this:
1---2---3---bad---5---6---7
you want graft 5-7 on top of 3 afterwards have history:
1---2---3---bad---5---6---7 \ +--5---6---7
then strip bad changeset (and follows it) using command:
hg strip bad `bad` here number or hash of bad changeset
- verify looks locally, head on bitbucket.org
- find repository, go settings , find strip changesets section
- input hash of bad changeset , ask bitbucket strip out
- afterwards, push local clone bring changesets grafted bitbucket
- important: need has cloned bitbucket , gotten bad changeset need scrap local clone , reclone. bring down fresh copy of repository, without bad changeset.
Comments
Post a Comment