Show More
@@ -351,7 +351,7 b' class journalstorage(object):' | |||||
351 | # Read just enough bytes to get a version number (up to 2 |
|
351 | # Read just enough bytes to get a version number (up to 2 | |
352 | # digits plus separator) |
|
352 | # digits plus separator) | |
353 | version = f.read(3).partition('\0')[0] |
|
353 | version = f.read(3).partition('\0')[0] | |
354 |
if version and version != |
|
354 | if version and version != "%d" % storageversion: | |
355 | # different version of the storage. Exit early (and not |
|
355 | # different version of the storage. Exit early (and not | |
356 | # write anything) if this is not a version we can handle or |
|
356 | # write anything) if this is not a version we can handle or | |
357 | # the file is corrupt. In future, perhaps rotate the file |
|
357 | # the file is corrupt. In future, perhaps rotate the file | |
@@ -361,7 +361,7 b' class journalstorage(object):' | |||||
361 | return |
|
361 | return | |
362 | if not version: |
|
362 | if not version: | |
363 | # empty file, write version first |
|
363 | # empty file, write version first | |
364 |
f.write( |
|
364 | f.write(("%d" % storageversion) + '\0') | |
365 | f.seek(0, os.SEEK_END) |
|
365 | f.seek(0, os.SEEK_END) | |
366 | f.write(bytes(entry) + '\0') |
|
366 | f.write(bytes(entry) + '\0') | |
367 |
|
367 | |||
@@ -413,7 +413,7 b' class journalstorage(object):' | |||||
413 |
|
413 | |||
414 | lines = raw.split('\0') |
|
414 | lines = raw.split('\0') | |
415 | version = lines and lines[0] |
|
415 | version = lines and lines[0] | |
416 |
if version != |
|
416 | if version != "%d" % storageversion: | |
417 | version = version or _('not available') |
|
417 | version = version or _('not available') | |
418 | raise error.Abort(_("unknown journal file version '%s'") % version) |
|
418 | raise error.Abort(_("unknown journal file version '%s'") % version) | |
419 |
|
419 |
@@ -1932,7 +1932,7 b' class queue(object):' | |||||
1932 | length = len(self.series) - start |
|
1932 | length = len(self.series) - start | |
1933 | if not missing: |
|
1933 | if not missing: | |
1934 | if self.ui.verbose: |
|
1934 | if self.ui.verbose: | |
1935 |
idxwidth = len( |
|
1935 | idxwidth = len("%d" % (start + length - 1)) | |
1936 | for i in xrange(start, start + length): |
|
1936 | for i in xrange(start, start + length): | |
1937 | patch = self.series[i] |
|
1937 | patch = self.series[i] | |
1938 | if patch in applied: |
|
1938 | if patch in applied: | |
@@ -2098,7 +2098,7 b' class queue(object):' | |||||
2098 | if not self.ui.verbose: |
|
2098 | if not self.ui.verbose: | |
2099 | p = pname |
|
2099 | p = pname | |
2100 | else: |
|
2100 | else: | |
2101 |
p = |
|
2101 | p = ("%d" % self.series.index(pname)) + " " + pname | |
2102 | return p |
|
2102 | return p | |
2103 |
|
2103 | |||
2104 | def qimport(self, repo, files, patchname=None, rev=None, existing=None, |
|
2104 | def qimport(self, repo, files, patchname=None, rev=None, existing=None, |
@@ -212,7 +212,7 b' def _formatprefix(ui, repo, rev, flags, ' | |||||
212 | if not numbered: |
|
212 | if not numbered: | |
213 | return '[PATCH%s]' % flag |
|
213 | return '[PATCH%s]' % flag | |
214 | else: |
|
214 | else: | |
215 |
tlen = len( |
|
215 | tlen = len("%d" % total) | |
216 | return '[PATCH %0*d of %d%s]' % (tlen, idx, total, flag) |
|
216 | return '[PATCH %0*d of %d%s]' % (tlen, idx, total, flag) | |
217 |
|
217 | |||
218 | def makepatch(ui, repo, rev, patchlines, opts, _charsets, idx, total, numbered, |
|
218 | def makepatch(ui, repo, rev, patchlines, opts, _charsets, idx, total, numbered, | |
@@ -630,7 +630,7 b' def email(ui, repo, *revs, **opts):' | |||||
630 | if outgoing: |
|
630 | if outgoing: | |
631 | revs = _getoutgoing(repo, dest, revs) |
|
631 | revs = _getoutgoing(repo, dest, revs) | |
632 | if bundle: |
|
632 | if bundle: | |
633 |
opts['revs'] = [ |
|
633 | opts['revs'] = ["%d" % r for r in revs] | |
634 |
|
634 | |||
635 | # check if revision exist on the public destination |
|
635 | # check if revision exist on the public destination | |
636 | publicurl = repo.ui.config('patchbomb', 'publicurl') |
|
636 | publicurl = repo.ui.config('patchbomb', 'publicurl') |
@@ -94,7 +94,7 b' class ShortRepository(object):' | |||||
94 | parts = parts[:-1] |
|
94 | parts = parts[:-1] | |
95 | else: |
|
95 | else: | |
96 | tail = '' |
|
96 | tail = '' | |
97 |
context = dict(( |
|
97 | context = dict(('%d' % (i + 1), v) for i, v in enumerate(parts)) | |
98 | return ''.join(self.templater.process(self.url, context)) + tail |
|
98 | return ''.join(self.templater.process(self.url, context)) + tail | |
99 |
|
99 | |||
100 | def hasdriveletter(orig, path): |
|
100 | def hasdriveletter(orig, path): |
General Comments 0
You need to be logged in to leave comments.
Login now