Show More
@@ -39,7 +39,7 b' class bundlerevlog(revlog.revlog):' | |||||
39 | for chunk, start in chunkpositer(): |
|
39 | for chunk, start in chunkpositer(): | |
40 | size = len(chunk) |
|
40 | size = len(chunk) | |
41 | if size < 80: |
|
41 | if size < 80: | |
42 | raise util.Abort("invalid changegroup") |
|
42 | raise util.Abort(_("invalid changegroup")) | |
43 | start += 80 |
|
43 | start += 80 | |
44 | size -= 80 |
|
44 | size -= 80 | |
45 | node, p1, p2, cs = struct.unpack("20s20s20s20s", chunk[:80]) |
|
45 | node, p1, p2, cs = struct.unpack("20s20s20s20s", chunk[:80]) |
@@ -936,7 +936,7 b' def finddate(ui, repo, date):' | |||||
936 | results[rev] = d |
|
936 | results[rev] = d | |
937 | elif st == 'iter': |
|
937 | elif st == 'iter': | |
938 | if rev in results: |
|
938 | if rev in results: | |
939 | ui.status("Found revision %s from %s\n" % |
|
939 | ui.status(_("Found revision %s from %s\n") % | |
940 | (rev, util.datestr(results[rev]))) |
|
940 | (rev, util.datestr(results[rev]))) | |
941 | return str(rev) |
|
941 | return str(rev) | |
942 |
|
942 |
@@ -2129,7 +2129,7 b' def push(ui, repo, dest=None, **opts):' | |||||
2129 | cmdutil.setremoteconfig(ui, opts) |
|
2129 | cmdutil.setremoteconfig(ui, opts) | |
2130 |
|
2130 | |||
2131 | other = hg.repository(ui, dest) |
|
2131 | other = hg.repository(ui, dest) | |
2132 | ui.status('pushing to %s\n' % util.hidepassword(dest)) |
|
2132 | ui.status(_('pushing to %s\n') % util.hidepassword(dest)) | |
2133 | if revs: |
|
2133 | if revs: | |
2134 | revs = [repo.lookup(rev) for rev in revs] |
|
2134 | revs = [repo.lookup(rev) for rev in revs] | |
2135 | r = repo.push(other, opts['force'], revs=revs) |
|
2135 | r = repo.push(other, opts['force'], revs=revs) |
@@ -259,7 +259,7 b' def create_server(ui, repo):' | |||||
259 | from OpenSSL import SSL |
|
259 | from OpenSSL import SSL | |
260 | ctx = SSL.Context(SSL.SSLv23_METHOD) |
|
260 | ctx = SSL.Context(SSL.SSLv23_METHOD) | |
261 | except ImportError: |
|
261 | except ImportError: | |
262 | raise util.Abort("SSL support is unavailable") |
|
262 | raise util.Abort(_("SSL support is unavailable")) | |
263 | ctx.use_privatekey_file(ssl_cert) |
|
263 | ctx.use_privatekey_file(ssl_cert) | |
264 | ctx.use_certificate_file(ssl_cert) |
|
264 | ctx.use_certificate_file(ssl_cert) | |
265 | sock = socket.socket(self.address_family, self.socket_type) |
|
265 | sock = socket.socket(self.address_family, self.socket_type) |
@@ -1098,7 +1098,7 b' class localrepository(repo.repository):' | |||||
1098 | wlock = self.wlock() |
|
1098 | wlock = self.wlock() | |
1099 | for f in list: |
|
1099 | for f in list: | |
1100 | if self.dirstate[f] != 'r': |
|
1100 | if self.dirstate[f] != 'r': | |
1101 | self.ui.warn("%s not removed!\n" % f) |
|
1101 | self.ui.warn(_("%s not removed!\n") % f) | |
1102 | else: |
|
1102 | else: | |
1103 | m = f in manifests[0] and manifests[0] or manifests[1] |
|
1103 | m = f in manifests[0] and manifests[0] or manifests[1] | |
1104 | t = self.file(f).read(m[f]) |
|
1104 | t = self.file(f).read(m[f]) | |
@@ -2022,7 +2022,7 b' class localrepository(repo.repository):' | |||||
2022 | except ValueError, TypeError: |
|
2022 | except ValueError, TypeError: | |
2023 | raise util.UnexpectedOutput( |
|
2023 | raise util.UnexpectedOutput( | |
2024 | _('Unexpected response from remote server:'), l) |
|
2024 | _('Unexpected response from remote server:'), l) | |
2025 | self.ui.debug('adding %s (%s)\n' % (name, util.bytecount(size))) |
|
2025 | self.ui.debug(_('adding %s (%s)\n') % (name, util.bytecount(size))) | |
2026 | ofp = self.sopener(name, 'w') |
|
2026 | ofp = self.sopener(name, 'w') | |
2027 | for chunk in util.filechunkiter(fp, limit=size): |
|
2027 | for chunk in util.filechunkiter(fp, limit=size): | |
2028 | ofp.write(chunk) |
|
2028 | ofp.write(chunk) |
@@ -347,7 +347,7 b' def applyupdates(repo, action, wctx, mct' | |||||
347 | updated += 1 |
|
347 | updated += 1 | |
348 | elif m == "dr": # divergent renames |
|
348 | elif m == "dr": # divergent renames | |
349 | fl = a[2] |
|
349 | fl = a[2] | |
350 | repo.ui.warn("warning: detected divergent renames of %s to:\n" % f) |
|
350 | repo.ui.warn(_("warning: detected divergent renames of %s to:\n") % f) | |
351 | for nf in fl: |
|
351 | for nf in fl: | |
352 | repo.ui.warn(" %s\n" % nf) |
|
352 | repo.ui.warn(" %s\n" % nf) | |
353 | elif m == "e": # exec |
|
353 | elif m == "e": # exec |
@@ -229,7 +229,7 b' def patch(patchname, ui, strip=1, cwd=No' | |||||
229 | return internalpatch(patchname, ui, strip, cwd, files) |
|
229 | return internalpatch(patchname, ui, strip, cwd, files) | |
230 | except NoHunks: |
|
230 | except NoHunks: | |
231 | patcher = util.find_exe('gpatch') or util.find_exe('patch') |
|
231 | patcher = util.find_exe('gpatch') or util.find_exe('patch') | |
232 | ui.debug('no valid hunks found; trying with %r instead\n' % |
|
232 | ui.debug(_('no valid hunks found; trying with %r instead\n') % | |
233 | patcher) |
|
233 | patcher) | |
234 | if util.needbinarypatch(): |
|
234 | if util.needbinarypatch(): | |
235 | args.append('--binary') |
|
235 | args.append('--binary') |
@@ -8,6 +8,7 b'' | |||||
8 |
|
8 | |||
9 | import changegroup, os |
|
9 | import changegroup, os | |
10 | from node import nullrev, short |
|
10 | from node import nullrev, short | |
|
11 | from i18n import _ | |||
11 |
|
12 | |||
12 | def _bundle(repo, bases, heads, node, suffix, extranodes=None): |
|
13 | def _bundle(repo, bases, heads, node, suffix, extranodes=None): | |
13 | """create a bundle with the specified revisions as a backup""" |
|
14 | """create a bundle with the specified revisions as a backup""" | |
@@ -16,7 +17,7 b' def _bundle(repo, bases, heads, node, su' | |||||
16 | if not os.path.isdir(backupdir): |
|
17 | if not os.path.isdir(backupdir): | |
17 | os.mkdir(backupdir) |
|
18 | os.mkdir(backupdir) | |
18 | name = os.path.join(backupdir, "%s-%s" % (short(node), suffix)) |
|
19 | name = os.path.join(backupdir, "%s-%s" % (short(node), suffix)) | |
19 | repo.ui.warn("saving bundle to %s\n" % name) |
|
20 | repo.ui.warn(_("saving bundle to %s\n") % name) | |
20 | return changegroup.writebundle(cg, name, "HG10BZ") |
|
21 | return changegroup.writebundle(cg, name, "HG10BZ") | |
21 |
|
22 | |||
22 | def _collectfiles(repo, striprev): |
|
23 | def _collectfiles(repo, striprev): | |
@@ -125,7 +126,7 b' def strip(ui, repo, node, backup="all"):' | |||||
125 | f.strip(striprev) |
|
126 | f.strip(striprev) | |
126 |
|
127 | |||
127 | if saveheads or extranodes: |
|
128 | if saveheads or extranodes: | |
128 | ui.status("adding branch\n") |
|
129 | ui.status(_("adding branch\n")) | |
129 | f = open(chgrpfile, "rb") |
|
130 | f = open(chgrpfile, "rb") | |
130 | gen = changegroup.readbundle(f, chgrpfile) |
|
131 | gen = changegroup.readbundle(f, chgrpfile) | |
131 | repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile, True) |
|
132 | repo.addchangegroup(gen, 'strip', 'bundle:' + chgrpfile, True) |
@@ -42,7 +42,7 b' class sshrepository(repo.repository):' | |||||
42 | cmd = '%s %s "%s init %s"' |
|
42 | cmd = '%s %s "%s init %s"' | |
43 | cmd = cmd % (sshcmd, args, remotecmd, self.path) |
|
43 | cmd = cmd % (sshcmd, args, remotecmd, self.path) | |
44 |
|
44 | |||
45 | ui.note('running %s\n' % cmd) |
|
45 | ui.note(_('running %s\n') % cmd) | |
46 | res = util.system(cmd) |
|
46 | res = util.system(cmd) | |
47 | if res != 0: |
|
47 | if res != 0: | |
48 | self.raise_(repo.RepoError(_("could not create remote repo"))) |
|
48 | self.raise_(repo.RepoError(_("could not create remote repo"))) | |
@@ -60,7 +60,7 b' class sshrepository(repo.repository):' | |||||
60 | cmd = cmd % (sshcmd, args, remotecmd, self.path) |
|
60 | cmd = cmd % (sshcmd, args, remotecmd, self.path) | |
61 |
|
61 | |||
62 | cmd = util.quotecommand(cmd) |
|
62 | cmd = util.quotecommand(cmd) | |
63 | ui.note('running %s\n' % cmd) |
|
63 | ui.note(_('running %s\n') % cmd) | |
64 | self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b') |
|
64 | self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b') | |
65 |
|
65 | |||
66 | # skip any noise generated by remote shell |
|
66 | # skip any noise generated by remote shell |
@@ -6,6 +6,7 b'' | |||||
6 | # of the GNU General Public License, incorporated herein by reference. |
|
6 | # of the GNU General Public License, incorporated herein by reference. | |
7 |
|
7 | |||
8 | import util, lock |
|
8 | import util, lock | |
|
9 | from i18n import _ | |||
9 |
|
10 | |||
10 | class StreamException(Exception): |
|
11 | class StreamException(Exception): | |
11 | def __init__(self, code): |
|
12 | def __init__(self, code): | |
@@ -42,7 +43,7 b' def stream_out(repo, untrusted=False):' | |||||
42 | try: |
|
43 | try: | |
43 | l = None |
|
44 | l = None | |
44 | try: |
|
45 | try: | |
45 | repo.ui.debug('scanning\n') |
|
46 | repo.ui.debug(_('scanning\n')) | |
46 | # get consistent snapshot of repo, lock during scan |
|
47 | # get consistent snapshot of repo, lock during scan | |
47 | l = repo.lock() |
|
48 | l = repo.lock() | |
48 | for name, ename, size in repo.store.walk(): |
|
49 | for name, ename, size in repo.store.walk(): | |
@@ -54,11 +55,11 b' def stream_out(repo, untrusted=False):' | |||||
54 | raise StreamException(2) |
|
55 | raise StreamException(2) | |
55 |
|
56 | |||
56 | yield '0\n' |
|
57 | yield '0\n' | |
57 | repo.ui.debug('%d files, %d bytes to transfer\n' % |
|
58 | repo.ui.debug(_('%d files, %d bytes to transfer\n') % | |
58 | (len(entries), total_bytes)) |
|
59 | (len(entries), total_bytes)) | |
59 | yield '%d %d\n' % (len(entries), total_bytes) |
|
60 | yield '%d %d\n' % (len(entries), total_bytes) | |
60 | for name, size in entries: |
|
61 | for name, size in entries: | |
61 | repo.ui.debug('sending %s (%d bytes)\n' % (name, size)) |
|
62 | repo.ui.debug(_('sending %s (%d bytes)\n') % (name, size)) | |
62 | yield '%s\0%d\n' % (name, size) |
|
63 | yield '%s\0%d\n' % (name, size) | |
63 | for chunk in util.filechunkiter(repo.sopener(name), limit=size): |
|
64 | for chunk in util.filechunkiter(repo.sopener(name), limit=size): | |
64 | yield chunk |
|
65 | yield chunk |
General Comments 0
You need to be logged in to leave comments.
Login now