Show More
@@ -1,207 +1,207 b'' | |||||
1 | # sshrepo.py - ssh repository proxy class for mercurial |
|
1 | # sshrepo.py - ssh repository proxy class for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms |
|
5 | # This software may be used and distributed according to the terms | |
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 | from node import * |
|
8 | from node import * | |
9 | from remoterepo import * |
|
9 | from remoterepo import * | |
10 | from i18n import gettext as _ |
|
10 | from i18n import gettext as _ | |
11 | from demandload import * |
|
11 | from demandload import * | |
12 | demandload(globals(), "hg os re stat util") |
|
12 | demandload(globals(), "hg os re stat util") | |
13 |
|
13 | |||
14 | class sshrepository(remoterepository): |
|
14 | class sshrepository(remoterepository): | |
15 | def __init__(self, ui, path, create=0): |
|
15 | def __init__(self, ui, path, create=0): | |
16 | self._url = path |
|
16 | self._url = path | |
17 | self.ui = ui |
|
17 | self.ui = ui | |
18 |
|
18 | |||
19 | m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path) |
|
19 | m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path) | |
20 | if not m: |
|
20 | if not m: | |
21 | raise hg.RepoError(_("couldn't parse location %s") % path) |
|
21 | raise hg.RepoError(_("couldn't parse location %s") % path) | |
22 |
|
22 | |||
23 | self.user = m.group(2) |
|
23 | self.user = m.group(2) | |
24 | self.host = m.group(3) |
|
24 | self.host = m.group(3) | |
25 | self.port = m.group(5) |
|
25 | self.port = m.group(5) | |
26 | self.path = m.group(7) or "." |
|
26 | self.path = m.group(7) or "." | |
27 |
|
27 | |||
28 | args = self.user and ("%s@%s" % (self.user, self.host)) or self.host |
|
28 | args = self.user and ("%s@%s" % (self.user, self.host)) or self.host | |
29 | args = self.port and ("%s -p %s") % (args, self.port) or args |
|
29 | args = self.port and ("%s -p %s") % (args, self.port) or args | |
30 |
|
30 | |||
31 | sshcmd = self.ui.config("ui", "ssh", "ssh") |
|
31 | sshcmd = self.ui.config("ui", "ssh", "ssh") | |
32 | remotecmd = self.ui.config("ui", "remotecmd", "hg") |
|
32 | remotecmd = self.ui.config("ui", "remotecmd", "hg") | |
33 |
|
33 | |||
34 | if create: |
|
34 | if create: | |
35 | cmd = '%s %s "%s init %s"' |
|
35 | cmd = '%s %s "%s init %s"' | |
36 | cmd = cmd % (sshcmd, args, remotecmd, self.path) |
|
36 | cmd = cmd % (sshcmd, args, remotecmd, self.path) | |
37 |
|
37 | |||
38 | ui.note('running %s\n' % cmd) |
|
38 | ui.note('running %s\n' % cmd) | |
39 | res = os.system(cmd) |
|
39 | res = os.system(cmd) | |
40 | if res != 0: |
|
40 | if res != 0: | |
41 | raise hg.RepoError(_("could not create remote repo")) |
|
41 | raise hg.RepoError(_("could not create remote repo")) | |
42 |
|
42 | |||
43 | self.validate_repo(ui, sshcmd, args, remotecmd) |
|
43 | self.validate_repo(ui, sshcmd, args, remotecmd) | |
44 |
|
44 | |||
45 | def url(self): |
|
45 | def url(self): | |
46 | return self._url |
|
46 | return self._url | |
47 |
|
47 | |||
48 | def validate_repo(self, ui, sshcmd, args, remotecmd): |
|
48 | def validate_repo(self, ui, sshcmd, args, remotecmd): | |
49 | # cleanup up previous run |
|
49 | # cleanup up previous run | |
50 | self.cleanup() |
|
50 | self.cleanup() | |
51 |
|
51 | |||
52 | cmd = '%s %s "%s -R %s serve --stdio"' |
|
52 | cmd = '%s %s "%s -R %s serve --stdio"' | |
53 | cmd = cmd % (sshcmd, args, remotecmd, self.path) |
|
53 | cmd = cmd % (sshcmd, args, remotecmd, self.path) | |
54 |
|
54 | |||
55 | ui.note('running %s\n' % cmd) |
|
55 | ui.note('running %s\n' % cmd) | |
56 | self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b') |
|
56 | self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b') | |
57 |
|
57 | |||
58 | # skip any noise generated by remote shell |
|
58 | # skip any noise generated by remote shell | |
59 | self.do_cmd("hello") |
|
59 | self.do_cmd("hello") | |
60 | r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40))) |
|
60 | r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40))) | |
61 | lines = ["", "dummy"] |
|
61 | lines = ["", "dummy"] | |
62 | max_noise = 500 |
|
62 | max_noise = 500 | |
63 | while lines[-1] and max_noise: |
|
63 | while lines[-1] and max_noise: | |
64 | l = r.readline() |
|
64 | l = r.readline() | |
65 | self.readerr() |
|
65 | self.readerr() | |
66 | if lines[-1] == "1\n" and l == "\n": |
|
66 | if lines[-1] == "1\n" and l == "\n": | |
67 | break |
|
67 | break | |
68 | if l: |
|
68 | if l: | |
69 | ui.debug(_("remote: "), l) |
|
69 | ui.debug(_("remote: "), l) | |
70 | lines.append(l) |
|
70 | lines.append(l) | |
71 | max_noise -= 1 |
|
71 | max_noise -= 1 | |
72 | else: |
|
72 | else: | |
73 | raise hg.RepoError(_("no response from remote hg")) |
|
73 | raise hg.RepoError(_("no suitable response from remote hg")) | |
74 |
|
74 | |||
75 | self.capabilities = () |
|
75 | self.capabilities = () | |
76 | lines.reverse() |
|
76 | lines.reverse() | |
77 | for l in lines: |
|
77 | for l in lines: | |
78 | if l.startswith("capabilities:"): |
|
78 | if l.startswith("capabilities:"): | |
79 | self.capabilities = l[:-1].split(":")[1].split() |
|
79 | self.capabilities = l[:-1].split(":")[1].split() | |
80 | break |
|
80 | break | |
81 |
|
81 | |||
82 | def readerr(self): |
|
82 | def readerr(self): | |
83 | while 1: |
|
83 | while 1: | |
84 | size = util.fstat(self.pipee).st_size |
|
84 | size = util.fstat(self.pipee).st_size | |
85 | if size == 0: break |
|
85 | if size == 0: break | |
86 | l = self.pipee.readline() |
|
86 | l = self.pipee.readline() | |
87 | if not l: break |
|
87 | if not l: break | |
88 | self.ui.status(_("remote: "), l) |
|
88 | self.ui.status(_("remote: "), l) | |
89 |
|
89 | |||
90 | def cleanup(self): |
|
90 | def cleanup(self): | |
91 | try: |
|
91 | try: | |
92 | self.pipeo.close() |
|
92 | self.pipeo.close() | |
93 | self.pipei.close() |
|
93 | self.pipei.close() | |
94 | # read the error descriptor until EOF |
|
94 | # read the error descriptor until EOF | |
95 | for l in self.pipee: |
|
95 | for l in self.pipee: | |
96 | self.ui.status(_("remote: "), l) |
|
96 | self.ui.status(_("remote: "), l) | |
97 | self.pipee.close() |
|
97 | self.pipee.close() | |
98 | except: |
|
98 | except: | |
99 | pass |
|
99 | pass | |
100 |
|
100 | |||
101 | __del__ = cleanup |
|
101 | __del__ = cleanup | |
102 |
|
102 | |||
103 | def do_cmd(self, cmd, **args): |
|
103 | def do_cmd(self, cmd, **args): | |
104 | self.ui.debug(_("sending %s command\n") % cmd) |
|
104 | self.ui.debug(_("sending %s command\n") % cmd) | |
105 | self.pipeo.write("%s\n" % cmd) |
|
105 | self.pipeo.write("%s\n" % cmd) | |
106 | for k, v in args.items(): |
|
106 | for k, v in args.items(): | |
107 | self.pipeo.write("%s %d\n" % (k, len(v))) |
|
107 | self.pipeo.write("%s %d\n" % (k, len(v))) | |
108 | self.pipeo.write(v) |
|
108 | self.pipeo.write(v) | |
109 | self.pipeo.flush() |
|
109 | self.pipeo.flush() | |
110 |
|
110 | |||
111 | return self.pipei |
|
111 | return self.pipei | |
112 |
|
112 | |||
113 | def call(self, cmd, **args): |
|
113 | def call(self, cmd, **args): | |
114 | r = self.do_cmd(cmd, **args) |
|
114 | r = self.do_cmd(cmd, **args) | |
115 | l = r.readline() |
|
115 | l = r.readline() | |
116 | self.readerr() |
|
116 | self.readerr() | |
117 | try: |
|
117 | try: | |
118 | l = int(l) |
|
118 | l = int(l) | |
119 | except: |
|
119 | except: | |
120 | raise hg.RepoError(_("unexpected response '%s'") % l) |
|
120 | raise hg.RepoError(_("unexpected response '%s'") % l) | |
121 | return r.read(l) |
|
121 | return r.read(l) | |
122 |
|
122 | |||
123 | def lock(self): |
|
123 | def lock(self): | |
124 | self.call("lock") |
|
124 | self.call("lock") | |
125 | return remotelock(self) |
|
125 | return remotelock(self) | |
126 |
|
126 | |||
127 | def unlock(self): |
|
127 | def unlock(self): | |
128 | self.call("unlock") |
|
128 | self.call("unlock") | |
129 |
|
129 | |||
130 | def heads(self): |
|
130 | def heads(self): | |
131 | d = self.call("heads") |
|
131 | d = self.call("heads") | |
132 | try: |
|
132 | try: | |
133 | return map(bin, d[:-1].split(" ")) |
|
133 | return map(bin, d[:-1].split(" ")) | |
134 | except: |
|
134 | except: | |
135 | raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) |
|
135 | raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) | |
136 |
|
136 | |||
137 | def branches(self, nodes): |
|
137 | def branches(self, nodes): | |
138 | n = " ".join(map(hex, nodes)) |
|
138 | n = " ".join(map(hex, nodes)) | |
139 | d = self.call("branches", nodes=n) |
|
139 | d = self.call("branches", nodes=n) | |
140 | try: |
|
140 | try: | |
141 | br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ] |
|
141 | br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ] | |
142 | return br |
|
142 | return br | |
143 | except: |
|
143 | except: | |
144 | raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) |
|
144 | raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) | |
145 |
|
145 | |||
146 | def between(self, pairs): |
|
146 | def between(self, pairs): | |
147 | n = "\n".join(["-".join(map(hex, p)) for p in pairs]) |
|
147 | n = "\n".join(["-".join(map(hex, p)) for p in pairs]) | |
148 | d = self.call("between", pairs=n) |
|
148 | d = self.call("between", pairs=n) | |
149 | try: |
|
149 | try: | |
150 | p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ] |
|
150 | p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ] | |
151 | return p |
|
151 | return p | |
152 | except: |
|
152 | except: | |
153 | raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) |
|
153 | raise hg.RepoError(_("unexpected response '%s'") % (d[:400] + "...")) | |
154 |
|
154 | |||
155 | def changegroup(self, nodes, kind): |
|
155 | def changegroup(self, nodes, kind): | |
156 | n = " ".join(map(hex, nodes)) |
|
156 | n = " ".join(map(hex, nodes)) | |
157 | return self.do_cmd("changegroup", roots=n) |
|
157 | return self.do_cmd("changegroup", roots=n) | |
158 |
|
158 | |||
159 | def unbundle(self, cg, heads, source): |
|
159 | def unbundle(self, cg, heads, source): | |
160 | d = self.call("unbundle", heads=' '.join(map(hex, heads))) |
|
160 | d = self.call("unbundle", heads=' '.join(map(hex, heads))) | |
161 | if d: |
|
161 | if d: | |
162 | raise hg.RepoError(_("push refused: %s") % d) |
|
162 | raise hg.RepoError(_("push refused: %s") % d) | |
163 |
|
163 | |||
164 | while 1: |
|
164 | while 1: | |
165 | d = cg.read(4096) |
|
165 | d = cg.read(4096) | |
166 | if not d: break |
|
166 | if not d: break | |
167 | self.pipeo.write(str(len(d)) + '\n') |
|
167 | self.pipeo.write(str(len(d)) + '\n') | |
168 | self.pipeo.write(d) |
|
168 | self.pipeo.write(d) | |
169 | self.readerr() |
|
169 | self.readerr() | |
170 |
|
170 | |||
171 | self.pipeo.write('0\n') |
|
171 | self.pipeo.write('0\n') | |
172 | self.pipeo.flush() |
|
172 | self.pipeo.flush() | |
173 |
|
173 | |||
174 | self.readerr() |
|
174 | self.readerr() | |
175 | d = self.pipei.readline() |
|
175 | d = self.pipei.readline() | |
176 | if d != '\n': |
|
176 | if d != '\n': | |
177 | return 1 |
|
177 | return 1 | |
178 |
|
178 | |||
179 | l = int(self.pipei.readline()) |
|
179 | l = int(self.pipei.readline()) | |
180 | r = self.pipei.read(l) |
|
180 | r = self.pipei.read(l) | |
181 | if not r: |
|
181 | if not r: | |
182 | return 1 |
|
182 | return 1 | |
183 | return int(r) |
|
183 | return int(r) | |
184 |
|
184 | |||
185 | def addchangegroup(self, cg, source, url): |
|
185 | def addchangegroup(self, cg, source, url): | |
186 | d = self.call("addchangegroup") |
|
186 | d = self.call("addchangegroup") | |
187 | if d: |
|
187 | if d: | |
188 | raise hg.RepoError(_("push refused: %s") % d) |
|
188 | raise hg.RepoError(_("push refused: %s") % d) | |
189 | while 1: |
|
189 | while 1: | |
190 | d = cg.read(4096) |
|
190 | d = cg.read(4096) | |
191 | if not d: break |
|
191 | if not d: break | |
192 | self.pipeo.write(d) |
|
192 | self.pipeo.write(d) | |
193 | self.readerr() |
|
193 | self.readerr() | |
194 |
|
194 | |||
195 | self.pipeo.flush() |
|
195 | self.pipeo.flush() | |
196 |
|
196 | |||
197 | self.readerr() |
|
197 | self.readerr() | |
198 | l = int(self.pipei.readline()) |
|
198 | l = int(self.pipei.readline()) | |
199 | r = self.pipei.read(l) |
|
199 | r = self.pipei.read(l) | |
200 | if not r: |
|
200 | if not r: | |
201 | return 1 |
|
201 | return 1 | |
202 | return int(r) |
|
202 | return int(r) | |
203 |
|
203 | |||
204 | def stream_out(self): |
|
204 | def stream_out(self): | |
205 | return self.do_cmd('stream_out') |
|
205 | return self.do_cmd('stream_out') | |
206 |
|
206 | |||
207 | instance = sshrepository |
|
207 | instance = sshrepository |
@@ -1,99 +1,102 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | # This test tries to exercise the ssh functionality with a dummy script |
|
3 | # This test tries to exercise the ssh functionality with a dummy script | |
4 |
|
4 | |||
5 | cat <<'EOF' > dummyssh |
|
5 | cat <<'EOF' > dummyssh | |
6 | #!/bin/sh |
|
6 | #!/bin/sh | |
7 | # this attempts to deal with relative pathnames |
|
7 | # this attempts to deal with relative pathnames | |
8 | cd `dirname $0` |
|
8 | cd `dirname $0` | |
9 |
|
9 | |||
10 | # check for proper args |
|
10 | # check for proper args | |
11 | if [ $1 != "user@dummy" ] ; then |
|
11 | if [ $1 != "user@dummy" ] ; then | |
12 | exit -1 |
|
12 | exit -1 | |
13 | fi |
|
13 | fi | |
14 |
|
14 | |||
15 | # check that we're in the right directory |
|
15 | # check that we're in the right directory | |
16 | if [ ! -x dummyssh ] ; then |
|
16 | if [ ! -x dummyssh ] ; then | |
17 | exit -1 |
|
17 | exit -1 | |
18 | fi |
|
18 | fi | |
19 |
|
19 | |||
20 | SSH_CLIENT='127.0.0.1 1 2' |
|
20 | SSH_CLIENT='127.0.0.1 1 2' | |
21 | export SSH_CLIENT |
|
21 | export SSH_CLIENT | |
22 | echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog |
|
22 | echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog | |
23 | $2 |
|
23 | $2 | |
24 | EOF |
|
24 | EOF | |
25 | chmod +x dummyssh |
|
25 | chmod +x dummyssh | |
26 |
|
26 | |||
27 | echo "# creating 'remote'" |
|
27 | echo "# creating 'remote'" | |
28 | hg init remote |
|
28 | hg init remote | |
29 | cd remote |
|
29 | cd remote | |
30 | echo this > foo |
|
30 | echo this > foo | |
31 | hg ci -A -m "init" -d "1000000 0" foo |
|
31 | hg ci -A -m "init" -d "1000000 0" foo | |
32 | echo '[server]' > .hg/hgrc |
|
32 | echo '[server]' > .hg/hgrc | |
33 | echo 'uncompressed = True' >> .hg/hgrc |
|
33 | echo 'uncompressed = True' >> .hg/hgrc | |
34 | echo '[hooks]' >> .hg/hgrc |
|
34 | echo '[hooks]' >> .hg/hgrc | |
35 | echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc |
|
35 | echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc | |
36 |
|
36 | |||
37 | cd .. |
|
37 | cd .. | |
38 |
|
38 | |||
|
39 | echo "# repo not found error" | |||
|
40 | hg clone -e ./dummyssh ssh://user@dummy/nonexistent local | |||
|
41 | ||||
39 | echo "# clone remote via stream" |
|
42 | echo "# clone remote via stream" | |
40 | hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \ |
|
43 | hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \ | |
41 | sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' |
|
44 | sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' | |
42 | cd local-stream |
|
45 | cd local-stream | |
43 | hg verify |
|
46 | hg verify | |
44 | cd .. |
|
47 | cd .. | |
45 |
|
48 | |||
46 | echo "# clone remote via pull" |
|
49 | echo "# clone remote via pull" | |
47 | hg clone -e ./dummyssh ssh://user@dummy/remote local |
|
50 | hg clone -e ./dummyssh ssh://user@dummy/remote local | |
48 |
|
51 | |||
49 | echo "# verify" |
|
52 | echo "# verify" | |
50 | cd local |
|
53 | cd local | |
51 | hg verify |
|
54 | hg verify | |
52 |
|
55 | |||
53 | echo '[hooks]' >> .hg/hgrc |
|
56 | echo '[hooks]' >> .hg/hgrc | |
54 | echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc |
|
57 | echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc | |
55 |
|
58 | |||
56 | echo "# empty default pull" |
|
59 | echo "# empty default pull" | |
57 | hg paths |
|
60 | hg paths | |
58 | hg pull -e ../dummyssh |
|
61 | hg pull -e ../dummyssh | |
59 |
|
62 | |||
60 | echo "# local change" |
|
63 | echo "# local change" | |
61 | echo bleah > foo |
|
64 | echo bleah > foo | |
62 | hg ci -m "add" -d "1000000 0" |
|
65 | hg ci -m "add" -d "1000000 0" | |
63 |
|
66 | |||
64 | echo "# updating rc" |
|
67 | echo "# updating rc" | |
65 | echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
68 | echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
66 | echo "[ui]" >> .hg/hgrc |
|
69 | echo "[ui]" >> .hg/hgrc | |
67 | echo "ssh = ../dummyssh" >> .hg/hgrc |
|
70 | echo "ssh = ../dummyssh" >> .hg/hgrc | |
68 |
|
71 | |||
69 | echo "# find outgoing" |
|
72 | echo "# find outgoing" | |
70 | hg out ssh://user@dummy/remote |
|
73 | hg out ssh://user@dummy/remote | |
71 |
|
74 | |||
72 | echo "# find incoming on the remote side" |
|
75 | echo "# find incoming on the remote side" | |
73 | hg incoming -R ../remote -e ../dummyssh ssh://user@dummy/local |
|
76 | hg incoming -R ../remote -e ../dummyssh ssh://user@dummy/local | |
74 |
|
77 | |||
75 | echo "# push" |
|
78 | echo "# push" | |
76 | hg push |
|
79 | hg push | |
77 |
|
80 | |||
78 | cd ../remote |
|
81 | cd ../remote | |
79 |
|
82 | |||
80 | echo "# check remote tip" |
|
83 | echo "# check remote tip" | |
81 | hg tip |
|
84 | hg tip | |
82 | hg verify |
|
85 | hg verify | |
83 | hg cat -r tip foo |
|
86 | hg cat -r tip foo | |
84 |
|
87 | |||
85 | echo z > z |
|
88 | echo z > z | |
86 | hg ci -A -m z -d '1000001 0' z |
|
89 | hg ci -A -m z -d '1000001 0' z | |
87 |
|
90 | |||
88 | cd ../local |
|
91 | cd ../local | |
89 | echo r > r |
|
92 | echo r > r | |
90 | hg ci -A -m z -d '1000002 0' r |
|
93 | hg ci -A -m z -d '1000002 0' r | |
91 |
|
94 | |||
92 | echo "# push should fail" |
|
95 | echo "# push should fail" | |
93 | hg push |
|
96 | hg push | |
94 |
|
97 | |||
95 | echo "# push should succeed" |
|
98 | echo "# push should succeed" | |
96 | hg push -f |
|
99 | hg push -f | |
97 |
|
100 | |||
98 | cd .. |
|
101 | cd .. | |
99 | cat dummylog |
|
102 | cat dummylog |
@@ -1,89 +1,93 b'' | |||||
1 | # creating 'remote' |
|
1 | # creating 'remote' | |
|
2 | # repo not found error | |||
|
3 | abort: no suitable response from remote hg! | |||
|
4 | remote: abort: repository nonexistent not found! | |||
2 | # clone remote via stream |
|
5 | # clone remote via stream | |
3 | streaming all changes |
|
6 | streaming all changes | |
4 | XXX files to transfer, XXX bytes of data |
|
7 | XXX files to transfer, XXX bytes of data | |
5 | transferred XXX bytes in XXX seconds (XXX XB/sec) |
|
8 | transferred XXX bytes in XXX seconds (XXX XB/sec) | |
6 | XXX files updated, XXX files merged, XXX files removed, XXX files unresolved |
|
9 | XXX files updated, XXX files merged, XXX files removed, XXX files unresolved | |
7 | checking changesets |
|
10 | checking changesets | |
8 | checking manifests |
|
11 | checking manifests | |
9 | crosschecking files in changesets and manifests |
|
12 | crosschecking files in changesets and manifests | |
10 | checking files |
|
13 | checking files | |
11 | 1 files, 1 changesets, 1 total revisions |
|
14 | 1 files, 1 changesets, 1 total revisions | |
12 | # clone remote via pull |
|
15 | # clone remote via pull | |
13 | requesting all changes |
|
16 | requesting all changes | |
14 | adding changesets |
|
17 | adding changesets | |
15 | adding manifests |
|
18 | adding manifests | |
16 | adding file changes |
|
19 | adding file changes | |
17 | added 1 changesets with 1 changes to 1 files |
|
20 | added 1 changesets with 1 changes to 1 files | |
18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 | # verify |
|
22 | # verify | |
20 | checking changesets |
|
23 | checking changesets | |
21 | checking manifests |
|
24 | checking manifests | |
22 | crosschecking files in changesets and manifests |
|
25 | crosschecking files in changesets and manifests | |
23 | checking files |
|
26 | checking files | |
24 | 1 files, 1 changesets, 1 total revisions |
|
27 | 1 files, 1 changesets, 1 total revisions | |
25 | # empty default pull |
|
28 | # empty default pull | |
26 | default = ssh://user@dummy/remote |
|
29 | default = ssh://user@dummy/remote | |
27 | pulling from ssh://user@dummy/remote |
|
30 | pulling from ssh://user@dummy/remote | |
28 | searching for changes |
|
31 | searching for changes | |
29 | no changes found |
|
32 | no changes found | |
30 | # local change |
|
33 | # local change | |
31 | # updating rc |
|
34 | # updating rc | |
32 | # find outgoing |
|
35 | # find outgoing | |
33 | searching for changes |
|
36 | searching for changes | |
34 | changeset: 1:c54836a570be |
|
37 | changeset: 1:c54836a570be | |
35 | tag: tip |
|
38 | tag: tip | |
36 | user: test |
|
39 | user: test | |
37 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
40 | date: Mon Jan 12 13:46:40 1970 +0000 | |
38 | summary: add |
|
41 | summary: add | |
39 |
|
42 | |||
40 | # find incoming on the remote side |
|
43 | # find incoming on the remote side | |
41 | searching for changes |
|
44 | searching for changes | |
42 | changeset: 1:c54836a570be |
|
45 | changeset: 1:c54836a570be | |
43 | tag: tip |
|
46 | tag: tip | |
44 | user: test |
|
47 | user: test | |
45 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
48 | date: Mon Jan 12 13:46:40 1970 +0000 | |
46 | summary: add |
|
49 | summary: add | |
47 |
|
50 | |||
48 | # push |
|
51 | # push | |
49 | pushing to ssh://user@dummy/remote |
|
52 | pushing to ssh://user@dummy/remote | |
50 | searching for changes |
|
53 | searching for changes | |
51 | remote: adding changesets |
|
54 | remote: adding changesets | |
52 | remote: adding manifests |
|
55 | remote: adding manifests | |
53 | remote: adding file changes |
|
56 | remote: adding file changes | |
54 | remote: added 1 changesets with 1 changes to 1 files |
|
57 | remote: added 1 changesets with 1 changes to 1 files | |
55 | # check remote tip |
|
58 | # check remote tip | |
56 | changeset: 1:c54836a570be |
|
59 | changeset: 1:c54836a570be | |
57 | tag: tip |
|
60 | tag: tip | |
58 | user: test |
|
61 | user: test | |
59 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
62 | date: Mon Jan 12 13:46:40 1970 +0000 | |
60 | summary: add |
|
63 | summary: add | |
61 |
|
64 | |||
62 | checking changesets |
|
65 | checking changesets | |
63 | checking manifests |
|
66 | checking manifests | |
64 | crosschecking files in changesets and manifests |
|
67 | crosschecking files in changesets and manifests | |
65 | checking files |
|
68 | checking files | |
66 | 1 files, 2 changesets, 2 total revisions |
|
69 | 1 files, 2 changesets, 2 total revisions | |
67 | bleah |
|
70 | bleah | |
68 | # push should fail |
|
71 | # push should fail | |
69 | pushing to ssh://user@dummy/remote |
|
72 | pushing to ssh://user@dummy/remote | |
70 | searching for changes |
|
73 | searching for changes | |
71 | abort: unsynced remote changes! |
|
74 | abort: unsynced remote changes! | |
72 | (did you forget to sync? use push -f to force) |
|
75 | (did you forget to sync? use push -f to force) | |
73 | # push should succeed |
|
76 | # push should succeed | |
74 | pushing to ssh://user@dummy/remote |
|
77 | pushing to ssh://user@dummy/remote | |
75 | searching for changes |
|
78 | searching for changes | |
76 | remote: adding changesets |
|
79 | remote: adding changesets | |
77 | remote: adding manifests |
|
80 | remote: adding manifests | |
78 | remote: adding file changes |
|
81 | remote: adding file changes | |
79 | remote: added 1 changesets with 1 changes to 1 files |
|
82 | remote: added 1 changesets with 1 changes to 1 files | |
|
83 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio 3: 4: 5: | |||
80 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
84 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
81 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
85 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
82 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
86 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
83 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
87 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
84 | Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5: |
|
88 | Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5: | |
85 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
89 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
86 | changegroup in remote: u=remote:ssh:127.0.0.1 |
|
90 | changegroup in remote: u=remote:ssh:127.0.0.1 | |
87 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
91 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
88 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
92 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
89 | changegroup in remote: u=remote:ssh:127.0.0.1 |
|
93 | changegroup in remote: u=remote:ssh:127.0.0.1 |
General Comments 0
You need to be logged in to leave comments.
Login now