Show More
@@ -355,6 +355,14 b' def convert(ui, src, dest=None, revmapfi' | |||||
355 |
|
355 | |||
356 | :convert.hg.usebranchnames: preserve branch names. The default is |
|
356 | :convert.hg.usebranchnames: preserve branch names. The default is | |
357 | True. |
|
357 | True. | |
|
358 | ||||
|
359 | All Destinations | |||
|
360 | ################ | |||
|
361 | ||||
|
362 | All destination types accept the following options: | |||
|
363 | ||||
|
364 | :convert.skiptags: does not convert tags from the source repo to the target | |||
|
365 | repo. The default is False. | |||
358 | """ |
|
366 | """ | |
359 | return convcmd.convert(ui, src, dest, revmapfile, **opts) |
|
367 | return convcmd.convert(ui, src, dest, revmapfile, **opts) | |
360 |
|
368 |
@@ -460,22 +460,23 b' class converter(object):' | |||||
460 | self.copy(c) |
|
460 | self.copy(c) | |
461 | self.ui.progress(_('converting'), None) |
|
461 | self.ui.progress(_('converting'), None) | |
462 |
|
462 | |||
463 | tags = self.source.gettags() |
|
463 | if not self.ui.configbool('convert', 'skiptags'): | |
464 | ctags = {} |
|
464 | tags = self.source.gettags() | |
465 |
|
|
465 | ctags = {} | |
466 |
|
|
466 | for k in tags: | |
467 | if self.map.get(v, SKIPREV) != SKIPREV: |
|
467 | v = tags[k] | |
468 | ctags[k] = self.map[v] |
|
468 | if self.map.get(v, SKIPREV) != SKIPREV: | |
|
469 | ctags[k] = self.map[v] | |||
469 |
|
470 | |||
470 | if c and ctags: |
|
471 | if c and ctags: | |
471 | nrev, tagsparent = self.dest.puttags(ctags) |
|
472 | nrev, tagsparent = self.dest.puttags(ctags) | |
472 | if nrev and tagsparent: |
|
473 | if nrev and tagsparent: | |
473 |
# write another hash correspondence to override the |
|
474 | # write another hash correspondence to override the | |
474 | # one so we don't end up with extra tag heads |
|
475 | # previous one so we don't end up with extra tag heads | |
475 | tagsparents = [e for e in self.map.iteritems() |
|
476 | tagsparents = [e for e in self.map.iteritems() | |
476 | if e[1] == tagsparent] |
|
477 | if e[1] == tagsparent] | |
477 | if tagsparents: |
|
478 | if tagsparents: | |
478 | self.map[tagsparents[0][0]] = nrev |
|
479 | self.map[tagsparents[0][0]] = nrev | |
479 |
|
480 | |||
480 | bookmarks = self.source.getbookmarks() |
|
481 | bookmarks = self.source.getbookmarks() | |
481 | cbookmarks = {} |
|
482 | cbookmarks = {} |
@@ -45,6 +45,19 b' Build a GIT repo with at least 1 tag' | |||||
45 | $ action tag -m "tag1" tag1 |
|
45 | $ action tag -m "tag1" tag1 | |
46 | $ cd .. |
|
46 | $ cd .. | |
47 |
|
47 | |||
|
48 | Convert without tags | |||
|
49 | ||||
|
50 | $ hg convert git-repo hg-repo --config convert.skiptags=True | |||
|
51 | initializing destination hg-repo repository | |||
|
52 | scanning source... | |||
|
53 | sorting... | |||
|
54 | converting... | |||
|
55 | 0 rev1 | |||
|
56 | updating bookmarks | |||
|
57 | $ hg -R hg-repo tags | |||
|
58 | tip 0:d98c8ad3a4cf | |||
|
59 | $ rm -rf hg-repo | |||
|
60 | ||||
48 | Do a first conversion |
|
61 | Do a first conversion | |
49 |
|
62 | |||
50 | $ convertrepo |
|
63 | $ convertrepo |
@@ -295,6 +295,15 b'' | |||||
295 | convert.hg.usebranchnames |
|
295 | convert.hg.usebranchnames | |
296 | preserve branch names. The default is True. |
|
296 | preserve branch names. The default is True. | |
297 |
|
297 | |||
|
298 | All Destinations | |||
|
299 | ################ | |||
|
300 | ||||
|
301 | All destination types accept the following options: | |||
|
302 | ||||
|
303 | convert.skiptags | |||
|
304 | does not convert tags from the source repo to the target | |||
|
305 | repo. The default is False. | |||
|
306 | ||||
298 | options: |
|
307 | options: | |
299 |
|
308 | |||
300 | -s --source-type TYPE source repository type |
|
309 | -s --source-type TYPE source repository type |
General Comments 0
You need to be logged in to leave comments.
Login now