Tue Nov 15 02:04:27 PST 2005 Brendan Cully <[EMAIL PROTECTED]>
* Don't version .hgtags when pulling from mercurial
It's only useful to mercurial repositories, but if by chance we happen to be
making a round trip back to mercurial, the file will be wrong anyway because
the changesets are all new.
Wed Nov 16 19:54:25 PST 2005 Brendan Cully <[EMAIL PROTECTED]>
* Handle old-style darcs date format
Older darcs patches appear to keep the date in the form
Sun Oct 20 20:10:04 EDT 2002 rather than the current
20021020201004. This patch tries to parse the date as the old format
if it fails to read it as the new. NOTE: This older patch format also
calculates the hash from the date in the recorder's time zone, but
darcs pull uses the puller's time zone, so it may not calculate the
correct hash of the patch. Perhaps it's safer to just throw an
exception if the date isn't in the current format?
Wed Nov 16 19:57:53 PST 2005 Brendan Cully <[EMAIL PROTECTED]>
* Don't crash on empty darcs changesets
The old guard code "if changeset" would never fail because the
expression being tested is a generator, which always exists even if it
never yields anything. Guard on the StopIteration exception instead.
New patches:
[Don't version .hgtags when pulling from mercurial
Brendan Cully <[EMAIL PROTECTED]>**20051115100427
It's only useful to mercurial repositories, but if by chance we happen to be
making a round trip back to mercurial, the file will be wrong anyway because
the changesets are all new.
] {
hunk ./vcpx/hglib.py 96
- # Since this is a tag, the parent manifest contains everything.
- # The only question is whether or not .hgtags existed before
- if pms.has_key('.hgtags'):
- pms = {'.hgtags': pms['.hgtags']}
- else:
- pms = {}
+
+ # Don't include the file itself in the changeset. It's only useful
+ # to mercurial, and if we do end up making a tailor round trip
+ # the nodes will be wrong anyway.
+ if '.hgtags' in files:
+ files.remove('.hgtags')
+ if pms.has_key('.hgtags'):
+ del pms['.hgtags']
}
[Handle old-style darcs date format
Brendan Cully <[EMAIL PROTECTED]>**20051117035425
Older darcs patches appear to keep the date in the form
Sun Oct 20 20:10:04 EDT 2002 rather than the current
20021020201004. This patch tries to parse the date as the old format
if it fails to read it as the new. NOTE: This older patch format also
calculates the hash from the date in the recorder's time zone, but
darcs pull uses the puller's time zone, so it may not calculate the
correct hash of the patch. Perhaps it's safer to just throw an
exception if the date isn't in the current format?
] {
hunk ./vcpx/darcs.py 78
- # 20040619130027
- y = int(date[:4])
- m = int(date[4:6])
- d = int(date[6:8])
- hh = int(date[8:10])
- mm = int(date[10:12])
- ss = int(date[12:14])
- timestamp = datetime(y, m, d, hh, mm, ss)
+ from time import strptime
+ try:
+ # 20040619130027
+ timestamp = datetime(*strptime(date, '%Y%m%d%H%M%S')[:6])
+ except ValueError:
+ # Old darcs patches use the form Sun Oct 20 20:01:05 EDT 2002
+ timestamp = datetime(*strptime(date[:19] + date[-5:], '%a %b %d %H:%M:%S %Y')[:6])
}
[Don't crash on empty darcs changesets
Brendan Cully <[EMAIL PROTECTED]>**20051117035753
The old guard code "if changeset" would never fail because the
expression being tested is a generator, which always exists even if it
never yields anything. Guard on the StopIteration exception instead.
] {
hunk ./vcpx/darcs.py 305
- if last:
+ try:
hunk ./vcpx/darcs.py 307
+ except StopIteration:
+ pass
}
Context:
[Use UTC0 not UTC to force a neutral timezone
[EMAIL PROTECTED]
[Add tailor-created files to Monotone's list of ignored files
"Neil Conway <[EMAIL PROTECTED]>"**20051116194227
This could be done by installing a new ignore_file Lua hook, or adding
entries to the .mt-ignore file (which is read by the default ignore_file
hook). I chose the latter, as it is simpler. It breaks if you install
a custom ignore_file hook that doesn't read .mt-ignore, but if you do
that then presumably you know what you're doing...
]
[give -b flag for cvs trunk
[EMAIL PROTECTED]
[Create the info dir that contains the ignore file if it does not exist
[EMAIL PROTECTED]
[Don't apply duplicate tags to mercurial targets
Brendan Cully <[EMAIL PROTECTED]>**20051116052626
I just noticed that a CVS source will replay all of the tags that apply
to HEAD on every run. This teaches mercurial to filter out equivalent tags
(by checking whether they already exist in the commit history up to the last
non-tag commit).
]
[Add tag support to mercurial target
Brendan Cully <[EMAIL PROTECTED]>**20051115100534]
[Add tag support to git target
Brendan Cully <[EMAIL PROTECTED]>**20051115075709]
[Sanitize CVS tag names
Brendan Cully <[EMAIL PROTECTED]>**20051115073722
CVS tag names are more restrictive than those of other repositories. This patch
downcodes them where necessary.
]
[Fix mercurial source deletion detection
Brendan Cully <[EMAIL PROTECTED]>**20051115070747
The original mercurial delete logic would find any unchanged file in a
changeset to be deleted. This horrible bug was mitigated by the fact that
I had forgotten to actually add DELETED changeset entries to the changeset.
]
[Pick up tags from mercurial sources
Brendan Cully <[EMAIL PROTECTED]>**20051115054848
Tailor appears to only be able to tag the current revision, so this patch
silently drops any retroactive tags. It might be worth expanding the tag
object with the notion of author, tag date and files tagged (the first two
are readily available but not passed on in _tag()).
]
[Fix bzr incremental update
Brendan Cully <[EMAIL PROTECTED]>**20051114060007
Incremental update in bzr isn't working: when tailor restarts it has no
handle on the bzr branch object, and when it does a merge it doesn't
make sure that it already has the changesets it needs. This patch
introduces a getRepo method that gets a branch handle if there isn't one,
and calls bzrlib.fetch.greedy_fetch to pull in all changesets before
attempting to merge them.
]
[Fix a last-second BPB converting revision names.
Brendan Cully <[EMAIL PROTECTED]>**20051114030337]
[Mercurial source support via hglib
Brendan Cully <[EMAIL PROTECTED]>**20051114022602]
[git commit fixes (date, # at end of commit message)
Brendan Cully <[EMAIL PROTECTED]>**20051114022122
As of at least git 0.99.9e, git refuses to parse timestamps with
microseconds such as str(datetime) may emit. This patch uses strftime
to force the format to something simpler.
It also manually duplicates GIT_AUTHOR_* to GIT_COMMITTER_* so that
cg-log produces output most similar to the source log.
git-commit expects the commit message to end with a newline, so this
patch adds one if it isn't already there.
]
[Ensure str() doesn't get handed a unicode changeset
Brendan Cully <[EMAIL PROTECTED]>**20051114021851
I don't do a lot of python, so I may be misdiagnosing this bug, but I
get a UnicodeEncodeError at Tailorizer.applyable on the debug line
when tailorizing a source with non-ascii log messages on a UTF-8
terminal. It appears that str() expects a __str__ function it calls to
return a plain (not unicode) string. Could possibly be an OS X issue.
The particular test was tailorizing the bzr repository from bzr to git
or hglib, with changeset messages apparently in macroman, on a UTF-8
terminal. This problem is made more annoying by the fact that bzr no
longer seems to be able to resume (_b undefined in the upgrade path).
]
[Ignore the backup copy of the state file
[EMAIL PROTECTED]
[Fix cut&paste error
[EMAIL PROTECTED]
[TAG Version 0.9.19 (retag)
[EMAIL PROTECTED]
Patch bundle hash:
26d9b236f2ca2b65d75b211d9334b997e522dd1b
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor