Detecting junk "file ... was added on ..." revisions

Greg Ward <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.devel
Message-ID <[email protected]>
I'm investigating why my converted Mercurial repo has a number of
changesets that look like

  changeset:   15014:b5e07bb410b8
  branch:      PACS-3-7-2
  parent:      14998:d99ab19444c4
  user:        xxxxxxxxx
  date:        Fri Aug 14 10:01:02 2009 -0400
  summary:     file Age.java was added on branch PACS-3-7-2 on
2009-08-14 14:02:21 +0000

Obviously, these are junk revisions that should not be converted.
I've found the code in CVSFileItems that tries to exclude them and I
can see *part* of what's going wrong.  Specifically,
_initial_branch_delete_unneeded() is receiving a lod_items object that
does not appear to be in the correct state yet:

  (Pdb) import pprint; pprint.pprint(vars(lod_items))
  {'cvs_branch': None,
   'cvs_branches': [],
   'cvs_revisions': [CVSRevisionNoop(Age.java:1.1.4.1<f>),
                     CVSRevisionAdd(Age.java:1.1.4.2<10>),
                     CVSRevisionChange(Age.java:1.1.4.3<11>)],
   'cvs_tags': [],
   'lod': PACS-3-7-2<5>}

Good:
  * lod_items.lod is set to the right value
  * lod_items.cvs_revisions includes all the CVS revisions of Age.java
on PACS-3-7-2, including the junk revision 1.1.4.1

Bad (I think):
  * lod_items.lod is a Symbol, not a Branch (even though PACS-3-7-2 is
unquestionably a CVS branch)
  * lod_items.cvs_branch is unset (presumably related to the former point)

Because lod_items.cvs_branch is unset,
_initial_branch_delete_unneeded() quickly bails and we lose the
opportunity to drop this junk revision.  ;-(

Any clue what's going on?  When is that 'lod' object supposed to
change from a Symbol to a Branch?

Greg

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2390455

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.