I think there's a problem with the way cvs imports are tracked.
Specifically, if more than one import has been made, and a file has
been locally modified, then you don't get some of the newly imported
versions.
The trickiness is that "cvs rlog -b" seems to either track the trunk,
or the vendor branch (I believe it's possible to have more than one
vendor branch, but I've never really understood enough to risk trying
it, so I don't know what happens in that case), but not both. So you
either get 1.1, 1.2, ..., or you get 1.1.1.1, 1.1.1.2, ...
But sometimes you want a combination of the two. And it's worse,
since 1.1 always gets "Initial revision", so with a typical project
you end up with what should be the initial changeset split into many,
some with the useless "Initial revision".
Anyway, here's at least an attempt at a fix (probably assuming only
one vendor branch). It seems to work for me, but (CVS being what it
is) it wouldn't be a shock if it broke something for someone else.
New patches:
[track cvs imports more precisely
[EMAIL PROTECTED]
If the log contains a 1.1.1.1, then we've got a "cvs import". In
that case, revision 1.1 isn't useful, so we should ignore it. As
soon as we get another revision on the trunk (1.2, etc.), then that
takes precedence over further imports. However, until then, imports
(1.1.1.2, etc.) update the notional trunk (what we want if branch ==
None).
So regard 1.2, 1.3, 1.1.1.1, 1.1.1.2, as being on the same branch
(1,). And don't use "-b" in the rlog, so we get both the trunk and
the vendor branch (relying on the other checks to exclude irrelevant
revisions). We record the timestamp of the first trunk revision
(excluding 1.1), and ignore revisions on the vendor branch that come
after that. That way we get 1.1.1.2, etc., if the file hasn't been
locally modified, but as soon as it is, we'll get the correct local
version.
] {
hunk ./vcpx/repository/cvs.py 27
- penultimate zero in a 'magic branch number' if there is one.
- 1.1.1.1 is converted to (1,1). """
+ penultimate zero in a 'magic branch number' if there is one."""
hunk ./vcpx/repository/cvs.py 40
- if r == [1,1,1,1]:
- r = [1,1]
-
hunk ./vcpx/repository/cvs.py 56
+ # Things on vendor branches are also on the trunk
+ if len(rev1) == 4 and rev1[0:3] == (1,1,1):
+ return rev2 == (1,)
+
hunk ./vcpx/repository/cvs.py 361
+ found_import = False
+
hunk ./vcpx/repository/cvs.py 387
+ if not branch and revision == (1,1,1,1):
+ found_import = True
+
hunk ./vcpx/repository/cvs.py 413
+ trunk_timestamp = None
hunk ./vcpx/repository/cvs.py 422
+ if not branch and found_import and normalize_cvs_rev(rev) == (1,1):
+ # If this file has been imported, then skip 1.1 in favour
+ # of the import rev
+ expected_revisions -= 1
+ continue
+
+ if not branch and len(normalize_cvs_rev(rev)) == 2:
+ trunk_timestamp = date
+
+ if not branch and trunk_timestamp and len(normalize_cvs_rev(rev)) == 4 and date > trunk_timestamp:
+ expected_revisions -= 1
+ continue
+
hunk ./vcpx/repository/cvs.py 608
- if not branch:
- cmd.append("-b")
hunk ./vcpx/repository/cvs.py 613
- else:
- cmd.append("-b")
}
Context:
[Removed trailing space from the assert, since we just did a .rstrip()
[EMAIL PROTECTED]
[Remove microseconds from the timestamp, at monotone commit time
[EMAIL PROTECTED]
[bzrlib-pull-result-object
Wouter van Heyst <[EMAIL PROTECTED]>**20070428151313]
[python2.5-unittest-api-fix
Wouter van Heyst <[EMAIL PROTECTED]>**20070428150020]
[bazaar-ng-renaming
Wouter van Heyst <[EMAIL PROTECTED]>**20070428143747
What was formerly know as Bazaar-NG is no longer the next generation, but the current one.
See http://bazaar-vcs.org/Baz1x and http://bazaar-vcs.org/Branding.
]
[Create the pre-revprop-change hook only when svn repository is local
[EMAIL PROTECTED]
[Typo
[EMAIL PROTECTED]
[TAG Version 0.9.28
[EMAIL PROTECTED]
Patch bundle hash:
91d7ef006f9bc1ee69f58682fa903f856ada1c27
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor