Mercurial > public > mercurial-scm > hg
diff hgext/convert/subversion.py @ 6956:12472a240398
i18n: mark strings for translation in convert extension
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Sun, 31 Aug 2008 16:12:02 +0200 |
parents | 11229144aa01 |
children | 6db6f6db026a |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Sun Aug 31 16:12:02 2008 +0200 +++ b/hgext/convert/subversion.py Sun Aug 31 16:12:02 2008 +0200 @@ -189,7 +189,7 @@ try: latest = int(rev) except ValueError: - raise util.Abort('svn: revision %s is not an integer' % rev) + raise util.Abort(_('svn: revision %s is not an integer') % rev) self.startrev = self.ui.config('convert', 'svn.startrev', default=0) try: @@ -290,7 +290,7 @@ self.ui.note(_('ignoring empty branch %s\n') % branch.encode(self.encoding)) continue - self.ui.note('found branch %s at %d\n' % + self.ui.note(_('found branch %s at %d\n') % (branch, self.revnum(brevid))) self.heads.append(brevid) @@ -420,7 +420,7 @@ tagspath = srctagspath except SubversionException, (inst, num): - self.ui.note('no tags found at revision %d\n' % start) + self.ui.note(_('no tags found at revision %d\n') % start) return tags def converted(self, rev, destrev): @@ -473,7 +473,7 @@ except SubversionException: dirent = None if not dirent: - raise util.Abort('%s not found up to revision %d' % (path, stop)) + raise util.Abort(_('%s not found up to revision %d') % (path, stop)) # stat() gives us the previous revision on this line of development, but # it might be in *another module*. Fetch the log and detect renames down @@ -489,7 +489,7 @@ if not path.startswith(p) or not paths[p].copyfrom_path: continue newpath = paths[p].copyfrom_path + path[len(p):] - self.ui.debug("branch renamed from %s to %s at %d\n" % + self.ui.debug(_("branch renamed from %s to %s at %d\n") % (path, newpath, revnum)) path = newpath break @@ -528,7 +528,7 @@ prevmodule = self.prevmodule if prevmodule is None: prevmodule = '' - self.ui.debug("reparent to %s\n" % svn_url) + self.ui.debug(_("reparent to %s\n") % svn_url) svn.ra.reparent(self.ra, svn_url) self.prevmodule = module return prevmodule @@ -560,11 +560,11 @@ copyfrom_path = self.getrelpath(ent.copyfrom_path, pmodule) if not copyfrom_path: continue - self.ui.debug("copied to %s from %s@%s\n" % + self.ui.debug(_("copied to %s from %s@%s\n") % (entrypath, copyfrom_path, ent.copyfrom_rev)) copies[self.recode(entry)] = self.recode(copyfrom_path) elif kind == 0: # gone, but had better be a deleted *file* - self.ui.debug("gone from %s\n" % ent.copyfrom_rev) + self.ui.debug(_("gone from %s\n") % ent.copyfrom_rev) # if a branch is created but entries are removed in the same # changeset, get the right fromrev @@ -582,22 +582,22 @@ part = "/".join(parts[:i]) info = part, copyfrom.get(part, None) if info[1] is not None: - self.ui.debug("Found parent directory %s\n" % info[1]) + self.ui.debug(_("Found parent directory %s\n") % info[1]) rc = info return rc - self.ui.debug("base, entry %s %s\n" % (basepath, entrypath)) + self.ui.debug(_("base, entry %s %s\n") % (basepath, entrypath)) frompath, froment = lookup_parts(entrypath) or (None, revnum - 1) # need to remove fragment from lookup_parts and replace with copyfrom_path if frompath is not None: - self.ui.debug("munge-o-matic\n") + self.ui.debug(_("munge-o-matic\n")) self.ui.debug(entrypath + '\n') self.ui.debug(entrypath[len(frompath):] + '\n') entrypath = froment.copyfrom_path + entrypath[len(frompath):] fromrev = froment.copyfrom_rev - self.ui.debug("Info: %s %s %s %s\n" % (frompath, froment, ent, entrypath)) + self.ui.debug(_("Info: %s %s %s %s\n") % (frompath, froment, ent, entrypath)) # We can avoid the reparent calls if the module has not changed # but it probably does not worth the pain. @@ -638,7 +638,7 @@ else: entries.append(entry) else: - self.ui.debug('unknown path in revision %d: %s\n' % \ + self.ui.debug(_('unknown path in revision %d: %s\n') % \ (revnum, path)) elif kind == svn.core.svn_node_dir: # Should probably synthesize normal file entries @@ -684,7 +684,7 @@ if not copyfrompath: continue copyfrom[path] = ent - self.ui.debug("mark %s came from %s:%d\n" + self.ui.debug(_("mark %s came from %s:%d\n") % (path, copyfrompath, ent.copyfrom_rev)) children = self._find_children(ent.copyfrom_path, ent.copyfrom_rev) children.sort() @@ -715,7 +715,7 @@ """Return the parsed commit object or None, and True if the revision is a branch root. """ - self.ui.debug("parsing revision %d (%d changes)\n" % + self.ui.debug(_("parsing revision %d (%d changes)\n") % (revnum, len(orig_paths))) branched = False @@ -752,10 +752,10 @@ prevmodule, prevnum = self.revsplit(previd)[1:] if prevnum >= self.startrev: parents = [previd] - self.ui.note('found parent of branch %s at %d: %s\n' % + self.ui.note(_('found parent of branch %s at %d: %s\n') % (self.module, prevnum, prevmodule)) else: - self.ui.debug("No copyfrom path, don't know what to do.\n") + self.ui.debug(_("No copyfrom path, don't know what to do.\n")) paths = [] # filter out unrelated paths @@ -794,7 +794,7 @@ self.child_cset = cset return cset, branched - self.ui.note('fetching revision log for "%s" from %d to %d\n' % + self.ui.note(_('fetching revision log for "%s" from %d to %d\n') % (self.module, from_revnum, to_revnum)) try: @@ -808,11 +808,11 @@ lastonbranch = True break if self.is_blacklisted(revnum): - self.ui.note('skipping blacklisted revision %d\n' + self.ui.note(_('skipping blacklisted revision %d\n') % revnum) continue if paths is None: - self.ui.debug('revision %d has no entries\n' % revnum) + self.ui.debug(_('revision %d has no entries\n') % revnum) continue cset, lastonbranch = parselogentry(paths, revnum, author, date, message) @@ -837,7 +837,7 @@ pass except SubversionException, (inst, num): if num == svn.core.SVN_ERR_FS_NO_SUCH_REVISION: - raise util.Abort('svn: branch has no revision %s' % to_revnum) + raise util.Abort(_('svn: branch has no revision %s') % to_revnum) raise def _getfile(self, file, rev): @@ -890,7 +890,7 @@ return relative # The path is outside our tracked tree... - self.ui.debug('%r is not under %r, ignoring\n' % (path, module)) + self.ui.debug(_('%r is not under %r, ignoring\n') % (path, module)) return None def _checkpath(self, path, revnum):