[Svnmerge] [PATCH] Bidirectional patch take 2
Raman Gupta
rocketraman at fastmail.fm
Thu Feb 23 20:13:50 PST 2006
Blair Zajac wrote:
> + for line in lines:
> + match = find_revision_re.match(line)
> + if match:
> + rev = match.groups()[0]
> + current_rev = int(rev)
> + revs.append(rev)
> + continue
> +
> + if not current_rev:
> + continue
> +
> + if source_dir_modified_re.match(line):
> + potential_reflected_revs.append(current_rev)
Minor optimization to prevent the regular expression from evaluating for
each line of the log output *after* the revision has already been
identified as a potential (of course this version has to run the
contains operation for each rev, but I still think it will be slightly
faster most of the time):
if current_rev not in potential_reflected_revs \
and source_dir_modified_re.match(line):
Cheers,
Raman
More information about the Svnmerge
mailing list