comparison hgext/convert/__init__.py @ 18819:05acdf8e1f23

convert: add closesort algorithm to mercurial sources If you actively work with branches, sometimes you need to close old branches which last commited hundreds revisions ago. After close you will see long lines in graph visually spoiling history. This sort only moves closed revisions as close as possible to parents and does not increase storage size as datesort do.
author Constantine Linnick <theaspect@gmail.com>
date Sun, 24 Mar 2013 00:06:52 +0700
parents 2eae2f9e85ef
children 1ce3f56b879f
comparison
equal deleted inserted replaced
18818:a0bff3d4f67b 18819:05acdf8e1f23
58 magnitude larger than the same ones generated by 58 magnitude larger than the same ones generated by
59 --branchsort. 59 --branchsort.
60 60
61 --sourcesort try to preserve source revisions order, only 61 --sourcesort try to preserve source revisions order, only
62 supported by Mercurial sources. 62 supported by Mercurial sources.
63
64 --closesort try to move closed revisions as close as possible
65 to parent branches, only supported by Mercurial
66 sources.
63 67
64 If ``REVMAP`` isn't given, it will be put in a default location 68 If ``REVMAP`` isn't given, it will be put in a default location
65 (``<dest>/.hg/shamap`` by default). The ``REVMAP`` is a simple 69 (``<dest>/.hg/shamap`` by default). The ``REVMAP`` is a simple
66 text file that maps each source commit ID to the destination ID 70 text file that maps each source commit ID to the destination ID
67 for that revision, like so:: 71 for that revision, like so::
316 _('splice synthesized history into place'), _('FILE')), 320 _('splice synthesized history into place'), _('FILE')),
317 ('', 'branchmap', '', 321 ('', 'branchmap', '',
318 _('change branch names while converting'), _('FILE')), 322 _('change branch names while converting'), _('FILE')),
319 ('', 'branchsort', None, _('try to sort changesets by branches')), 323 ('', 'branchsort', None, _('try to sort changesets by branches')),
320 ('', 'datesort', None, _('try to sort changesets by date')), 324 ('', 'datesort', None, _('try to sort changesets by date')),
321 ('', 'sourcesort', None, _('preserve source changesets order'))], 325 ('', 'sourcesort', None, _('preserve source changesets order')),
326 ('', 'closesort', None, _('try to reorder closed revisions'))],
322 _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')), 327 _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')),
323 "debugsvnlog": 328 "debugsvnlog":
324 (debugsvnlog, 329 (debugsvnlog,
325 [], 330 [],
326 'hg debugsvnlog'), 331 'hg debugsvnlog'),