Mercurial > hgsubversion
comparison hg_delta_editor.py @ 131:4d42dbbb5127
hg_delta_editor: fix parent revision detection on branch copy
Project items copyfrom revisions are irrelevant to parent revision detection,
only the project one or those of its ancestors matter. Items copyfrom is
useful when retrieving items content.
Former code resulted in incorrect converted graph for pyglet repository,
especially on the following revision:
------------------------------------------------------------------------
r274 | r1chardj0n3s | 2006-12-21 02:02:14 +0100 (Jeu, 21 Dec 2006) | 2 lines
Changed paths:
A /branches/richard-glx-version (from /trunk:269)
M /branches/richard-glx-version/pyglet/window/xlib/__init__.py
R /branches/richard-glx-version/tests/test.py (from /trunk/tests/test.py:270)
R /branches/richard-glx-version/tools/info.py (from /trunk/tools/info.py:272)
R /branches/richard-glx-version/website/get_involved.php (from /trunk/website/get_involved.php:273)
Branching to horribly mangle GLX
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 10 Dec 2008 11:03:22 -0600 |
parents | 291925677a9f |
children | 2242dd1163c6 |
comparison
equal
deleted
inserted
replaced
130:c2a84d436202 | 131:4d42dbbb5127 |
---|---|
265 paths = revision.paths | 265 paths = revision.paths |
266 added_branches = {} | 266 added_branches = {} |
267 added_tags = {} | 267 added_tags = {} |
268 tags_to_delete = set() | 268 tags_to_delete = set() |
269 branches_to_delete = set() | 269 branches_to_delete = set() |
270 for p in paths: | 270 for p in sorted(paths): |
271 fi, br = self._path_and_branch_for_path(p) | 271 fi, br = self._path_and_branch_for_path(p) |
272 if fi is not None: | 272 if fi is not None: |
273 if fi == '' and br not in self.branches: | 273 if fi == '' and br not in self.branches: |
274 src_p = paths[p].copyfrom_path | 274 src_p = paths[p].copyfrom_path |
275 src_rev = paths[p].copyfrom_rev | 275 src_rev = paths[p].copyfrom_rev |
293 added_branches[br] = src_branch, src_rev, revision.revnum | 293 added_branches[br] = src_branch, src_rev, revision.revnum |
294 elif fi == '' and br in self.branches: | 294 elif fi == '' and br in self.branches: |
295 br2 = br or 'default' | 295 br2 = br or 'default' |
296 if br2 not in self.repo.branchtags() and paths[p].action == 'D': | 296 if br2 not in self.repo.branchtags() and paths[p].action == 'D': |
297 branches_to_delete.add(br) | 297 branches_to_delete.add(br) |
298 elif br in added_branches: | |
299 if paths[p].copyfrom_rev > added_branches[br][1]: | |
300 x,y,z = added_branches[br] | |
301 added_branches[br] = x, paths[p].copyfrom_rev, z | |
302 else: | 298 else: |
303 t_name = self._is_path_tag(p) | 299 t_name = self._is_path_tag(p) |
304 if t_name == False: | 300 if t_name == False: |
305 continue | 301 continue |
306 src_p, src_rev = paths[p].copyfrom_path, paths[p].copyfrom_rev | 302 src_p, src_rev = paths[p].copyfrom_path, paths[p].copyfrom_rev |