[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Feature enhancement for cvs2svn

From: Brian W. Fitzpatrick <fitz_at_red-bean.com>
Date: 2004-08-09 23:48:40 CEST

[[Ugh. Prematurely fired off the last mail... I really need a different
mailer]]

Anyway, picking up where I left off

On Mon, 2004-08-09 at 16:04, Eric S. Raymond wrote:

>@@ -1110,6 +1113,12 @@
> header, for example: '1.7', '1.7.0.2', or '1.1.1' or '1.1.1.1'.
> This function will determine what kind of symbolic name it is by
> inspection, and record it in the right places."""
> + for (pattern, replacement) in tag_transforms:
> + newname = re.sub(pattern, replacement, name)
> + sys.stderr.write("%s: in '%s':\n"
> + " tag '%s' transformed to '%s'\n"
> + % (warning_prefix, self.fname, name, newname))

I'd like to see this use the Log facility like this:

      Log().write(LOG_WARN, "%s: in '%s':\n"
                            " tag '%s' transformed to '%s'\n"
                            % (warning_prefix, self.fname, name, newname))

> + name = newname
> if not symbolic_name_re.match(name):
> sys.stderr.write("%s: in '%s':\n"
> " '%s' is not a valid tag or branch name, ignoring\n"
> @@ -4202,6 +4211,7 @@
>
> def main():
> # Convenience var, so we don't have to keep instantiating this Borg.
> + global tag_transforms

As mentioned above, tag_transforms should be in Ctx

> ctx = Ctx()
>
> profiling = None
> @@ -4219,7 +4229,8 @@
> "trunk-only", "no-prune", "dry-run",
> "dump-only", "dumpfile=", "tmpdir=",
> "svnadmin=", "skip-cleanup", "cvs-revnums",
> - "bdb-txn-nosync", "version", "profile", "keywords-off"])
> + "bdb-txn-nosync", "version", "profile",
> + "keywords-off", "tag-transform="])
> except getopt.GetoptError, e:
> sys.stderr.write(error_prefix + ': ' + str(e) + '\n\n')
> usage()
> @@ -4319,6 +4330,8 @@
> 'default,\nand passing the option is deprecated.\n')
> elif opt == '--profile':
> profiling = 1
> + elif opt == '--tag-transform':
> + tag_transforms.append(value.split(":"))
>
> if ctx.print_help:
> usage()

Also, please update the doc in www/cvs2svn.html

Aside from that, it looks good to me.

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 9 23:49:59 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.