problems converting cvs to hg
Sam Steingold
sds at gnu.org
Thu Feb 24 23:30:41 UTC 2011
> * Sam Steingold <fqf at tah.bet> [2011-02-24 13:38:53 -0500]:
>
> now I have what appears to be a reasonable hg repo.
> however, I see far too many branches:
>
> $ hg branches
> default 15245:840f66c02892
> release-2000-Feb 15244:ab5d154e12e3
> threads 14770:d34dea69afaf
> thread2 13478:be0e4d855b2a
> threads1 13473:d8649f9d5bb7
> jitc 13020:3b4a5a4d3f95
> clisp_2_33-patched 9137:5592dccd8d5e
> clisp_2_29-2002-07-25 3786:fc93e8309d81
> unlabeled-1.259.2.1.2.1.4 3785:f2c59513c1ac
> unlabeled-1.1367.2.1.2.3.2 3782:de2ea9f1d6fb
> unlabeled-1.17.2.1.2 3768:49449facdd2b
> unlabeled-1.174.2.1.2 3760:02298953ef23
> unlabeled-1.20.2 3759:71214e16ea13
> unlabeled-1.18.2 3758:bd21b68091f1
> unlabeled-1.25.2 3757:c723fc7e7522
> unlabeled-1.22.2 3747:a31f025db2f0
> unlabeled-1.177.2 3746:a3940b664cd2
> unlabeled-1.241.2 3745:69f9d56047ab
> unlabeled-1.70.2.2.2 3744:7f69b0ad0f77
> unlabeled-1.16.2 3743:e017c4556964
> unlabeled-1.54.2.1.2 3742:26ed9f3e1590
> unlabeled-1.10.2 3741:eb3ac1ae7905
> unlabeled-1.33.2 3736:11be0a3186a3
> unlabeled-1.71.2 3732:09823aea3767
> unlabeled-1.55.2 3731:9f3235cf6f7c
> unlabeled-1.259.2.1.2 3780:7b239e89b189 (inactive)
> unlabeled-1.1367.2.1.2 3776:4fdb6e6f8aab (inactive)
> unlabeled-1.17.2 3765:b99b7c3e4fd3 (inactive)
> unlabeled-1.1367.2 3761:6415909b24ef (inactive)
> unlabeled-1.174.2 3754:34ca70be2310 (inactive)
> unlabeled-1.259.2 3739:96fc429e1dd8 (inactive)
> unlabeled-1.70.2 3737:ef39adcfb6ef (inactive)
> unlabeled-1.54.2 3733:e9393b8c209c (inactive)
> $
>
> All of them are obsolete. How do I get rid of them?
> I tried switching to each of them one by one and closing them:
>
> for b in `hg branches | cut -f 1 -d ' ' | grep -v default`; do
> hg up $b;
> hg ci -m 'close an obsolete branch' --close-branch;
> done
it appears that I came up with the solution suggested by
http://mercurial.selenic.com/wiki/PruningDeadBranches
myself!
> however, when I tried to push the results, I was told that this creates
> new remote heads.
... only when I try to close inactive branches!
now I have successfully closed all the branches except for the last 9.
how do I deal with them?
apparently, inactive branches do not have "topological" heads
(and, indeed, "hg heads -t" now shows only 1 head!)
so "hg ci -m 'close an obsolete branch' --close-branch" creates a new
head (why?) and that is reported by
abort: push creates new remote heads!
so, how do I chop off non-topological heads?
or, better yet, how do I remove the named from the "named branch"?
how do I remove the unlabeled-* inactive branches below?
$ hg branches
default 15245:840f66c02892
unlabeled-1.1367.2.1.2 3776:4fdb6e6f8aab (inactive)
unlabeled-1.17.2 3765:b99b7c3e4fd3 (inactive)
unlabeled-1.1367.2 3761:6415909b24ef (inactive)
unlabeled-1.174.2 3754:34ca70be2310 (inactive)
unlabeled-1.259.2 3739:96fc429e1dd8 (inactive)
unlabeled-1.70.2 3737:ef39adcfb6ef (inactive)
unlabeled-1.54.2 3733:e9393b8c209c (inactive)
--
Sam Steingold (http://sds.podval.org/) on CentOS release 5.3 (Final) X
http://mideasttruth.com http://memri.org http://truepeace.org
http://jihadwatch.org http://iris.org.il http://www.memritv.org http://ffii.org
Murphy's Law was probably named after the wrong guy.
More information about the Mercurial
mailing list