Skip to content

Commit

Permalink
CVSFileItems.imported_remove_1_1(): don't remove a non-root commit
Browse files Browse the repository at this point in the history
If the supposed "revision 1.1" has a predecessor, then we're not
talking about the simple scenario described in the docstring for
`adjust_ntdbrs()`, so don't try to delete it. This fixes test 184.

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5468 be7e6eca-30d4-0310-a8e5-ac0d63af7087
  • Loading branch information
mhagger committed Sep 2, 2017
1 parent b962416 commit cbd16c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cvs2svn_lib/cvs_file_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ def imported_remove_1_1(self, vendor_lod_items):
cvs_branch = vendor_lod_items.cvs_branch
rev_1_1 = self[cvs_branch.source_id]
assert isinstance(rev_1_1, CVSRevision)

if rev_1_1.prev_id:
# That's not a revision 1.1 after all, since it has a predecessor.
return

logger.debug('Removing unnecessary revision %s' % (rev_1_1,))

# Delete the 1.1.1 CVSBranch and sever the vendor branch from trunk:
Expand Down
1 change: 0 additions & 1 deletion run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4061,7 +4061,6 @@ def newphrases():
)


@XFail_deco()
@Cvs2SvnTestFunction
def vendor_1_1_not_root():
"supposed vendor 1.1 commit is not a root commit"
Expand Down

0 comments on commit cbd16c6

Please sign in to comment.