Mercurial > hg
comparison hgext/convert/subversion.py @ 5250:585471802a01
convert: svn: check for branch movement in any log entry, not just the first.
This fixes, for example,
r4151
D /branches
A /project/branches (from /branches:4150)
A /project/tags (from /tags:4150)
A /project/trunk (from /trunk:4150)
D /tags
D /trunk
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 27 Aug 2007 11:56:53 -0700 |
parents | 0751c25ea0c0 |
children | 694eb9ccb54d |
comparison
equal
deleted
inserted
replaced
5249:0d28d4e5fe1f | 5250:585471802a01 |
---|---|
537 if (rev in self.commits or | 537 if (rev in self.commits or |
538 (revnum < self.lastrevs.get(self.module, 0))): | 538 (revnum < self.lastrevs.get(self.module, 0))): |
539 return | 539 return |
540 | 540 |
541 parents = [] | 541 parents = [] |
542 orig_paths = orig_paths.items() | |
543 orig_paths.sort() | |
544 | |
545 # check whether this revision is the start of a branch | 542 # check whether this revision is the start of a branch |
546 path, ent = orig_paths and orig_paths[0] or (None, None) | 543 if self.module in orig_paths: |
547 if ent and path == self.module: | 544 ent = orig_paths[self.module] |
548 if ent.copyfrom_path: | 545 if ent.copyfrom_path: |
549 # ent.copyfrom_rev may not be the actual last revision | 546 # ent.copyfrom_rev may not be the actual last revision |
550 prev = self.latest(ent.copyfrom_path, ent.copyfrom_rev) | 547 prev = self.latest(ent.copyfrom_path, ent.copyfrom_rev) |
551 self.modulemap[prev] = ent.copyfrom_path | 548 self.modulemap[prev] = ent.copyfrom_path |
552 parents = [self.revid(prev, ent.copyfrom_path)] | 549 parents = [self.revid(prev, ent.copyfrom_path)] |
555 else: | 552 else: |
556 self.ui.debug("No copyfrom path, don't know what to do.\n") | 553 self.ui.debug("No copyfrom path, don't know what to do.\n") |
557 | 554 |
558 self.modulemap[revnum] = self.module # track backwards in time | 555 self.modulemap[revnum] = self.module # track backwards in time |
559 | 556 |
557 orig_paths = orig_paths.items() | |
558 orig_paths.sort() | |
560 paths = [] | 559 paths = [] |
561 # filter out unrelated paths | 560 # filter out unrelated paths |
562 for path, ent in orig_paths: | 561 for path, ent in orig_paths: |
563 if not path.startswith(self.module): | 562 if not path.startswith(self.module): |
564 self.ui.debug("boring@%s: %s\n" % (revnum, path)) | 563 self.ui.debug("boring@%s: %s\n" % (revnum, path)) |