Mon Nov 14 23:37:22 PST 2005 Brendan Cully <[EMAIL PROTECTED]>
* Sanitize CVS tag names
CVS tag names are more restrictive than those of other repositories. This
patch
downcodes them where necessary.
New patches:
[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.
] {
hunk ./vcpx/cvsps.py 575
+
+ # Sanitize tagnames for CVS: start with [a-zA-z], only include letters,
+ # numbers, '-' and '_'.
+ # str.isalpha et al are locale-dependent
+ def iscvsalpha(chr):
+ return (chr >= 'a' and chr <= 'z') or (chr >= 'A' and chr <= 'Z')
+ def iscvsdigit(chr):
+ return chr >= '0' and chr <= '9'
+ def iscvschar(chr):
+ return iscvsalpha(chr) or iscvsdigit(chr) or chr == '-' or chr == '_'
+ def cvstagify(chr):
+ if iscvschar(chr):
+ return chr
+ else:
+ return '_'
+
+ tagname = ''.join([cvstagify(chr) for chr in tagname])
+ if not iscvsalpha(tagname[0]):
+ tagname = 'tag-' + tagname
}
Context:
[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:
055d28a2bd205be87e0ab3d2237249f1ff737441
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor