Show More
@@ -402,6 +402,8 b' def createlog(ui, directory=None, root="' | |||||
402 | branchpoints = set() |
|
402 | branchpoints = set() | |
403 | for branch, revision in branchmap.iteritems(): |
|
403 | for branch, revision in branchmap.iteritems(): | |
404 | revparts = tuple([int(i) for i in revision.split('.')]) |
|
404 | revparts = tuple([int(i) for i in revision.split('.')]) | |
|
405 | if len(revparts) < 2: # bad tags | |||
|
406 | continue | |||
405 | if revparts[-2] == 0 and revparts[-1] % 2 == 0: |
|
407 | if revparts[-2] == 0 and revparts[-1] % 2 == 0: | |
406 | # normal branch |
|
408 | # normal branch | |
407 | if revparts[:-2] == e.revision: |
|
409 | if revparts[:-2] == e.revision: |
@@ -1420,7 +1420,7 b' class queue(object):' | |||||
1420 | if summary: |
|
1420 | if summary: | |
1421 | ph = patchheader(self.join(patchname), self.plainmode) |
|
1421 | ph = patchheader(self.join(patchname), self.plainmode) | |
1422 | msg = ph.message and ph.message[0] or '' |
|
1422 | msg = ph.message and ph.message[0] or '' | |
1423 |
if self.ui. |
|
1423 | if not self.ui.plain(): | |
1424 | width = util.termwidth() - len(pfx) - len(patchname) - 2 |
|
1424 | width = util.termwidth() - len(pfx) - len(patchname) - 2 | |
1425 | if width > 0: |
|
1425 | if width > 0: | |
1426 | msg = util.ellipsis(msg, width) |
|
1426 | msg = util.ellipsis(msg, width) | |
@@ -2737,7 +2737,7 b' cmdtable = {' | |||||
2737 | ('D', 'currentdate', None, _('add "Date: <current date>" to patch')), |
|
2737 | ('D', 'currentdate', None, _('add "Date: <current date>" to patch')), | |
2738 | ('d', 'date', '', _('add "Date: <given date>" to patch')) |
|
2738 | ('d', 'date', '', _('add "Date: <given date>" to patch')) | |
2739 | ] + commands.walkopts + commands.commitopts, |
|
2739 | ] + commands.walkopts + commands.commitopts, | |
2740 |
_('hg qnew [-e] [-m TEXT] [-l FILE] |
|
2740 | _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...')), | |
2741 | "qnext": (next, [] + seriesopts, _('hg qnext [-s]')), |
|
2741 | "qnext": (next, [] + seriesopts, _('hg qnext [-s]')), | |
2742 | "qprev": (prev, [] + seriesopts, _('hg qprev [-s]')), |
|
2742 | "qprev": (prev, [] + seriesopts, _('hg qprev [-s]')), | |
2743 | "^qpop": |
|
2743 | "^qpop": |
@@ -129,9 +129,10 b' def remoteui(src, opts):' | |||||
129 | if r: |
|
129 | if r: | |
130 | dst.setconfig('bundle', 'mainreporoot', r) |
|
130 | dst.setconfig('bundle', 'mainreporoot', r) | |
131 |
|
131 | |||
132 | # copy auth section settings |
|
132 | # copy auth and http_proxy section settings | |
133 | for key, val in src.configitems('auth'): |
|
133 | for sect in ('auth', 'http_proxy'): | |
134 | dst.setconfig('auth', key, val) |
|
134 | for key, val in src.configitems(sect): | |
|
135 | dst.setconfig(sect, key, val) | |||
135 |
|
136 | |||
136 | return dst |
|
137 | return dst | |
137 |
|
138 |
@@ -1178,7 +1178,9 b' def diff(ui, repo, *pats, **opts):' | |||||
1178 | m = cmdutil.match(repo, pats, opts) |
|
1178 | m = cmdutil.match(repo, pats, opts) | |
1179 | if stat: |
|
1179 | if stat: | |
1180 | it = patch.diff(repo, node1, node2, match=m, opts=diffopts) |
|
1180 | it = patch.diff(repo, node1, node2, match=m, opts=diffopts) | |
1181 | width = ui.interactive() and util.termwidth() or 80 |
|
1181 | width = 80 | |
|
1182 | if not ui.plain(): | |||
|
1183 | width = util.termwidth() | |||
1182 | for chunk, label in patch.diffstatui(util.iterlines(it), width=width, |
|
1184 | for chunk, label in patch.diffstatui(util.iterlines(it), width=width, | |
1183 | git=diffopts.git): |
|
1185 | git=diffopts.git): | |
1184 | ui.write(chunk, label=label) |
|
1186 | ui.write(chunk, label=label) |
@@ -33,10 +33,13 b' def _runcatch(ui, args):' | |||||
33 | def catchterm(*args): |
|
33 | def catchterm(*args): | |
34 | raise error.SignalInterrupt |
|
34 | raise error.SignalInterrupt | |
35 |
|
35 | |||
36 | for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': |
|
36 | try: | |
37 | num = getattr(signal, name, None) |
|
37 | for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': | |
38 | if num: |
|
38 | num = getattr(signal, name, None) | |
39 | signal.signal(num, catchterm) |
|
39 | if num: | |
|
40 | signal.signal(num, catchterm) | |||
|
41 | except ValueError: | |||
|
42 | pass # happens if called in a thread | |||
40 |
|
43 | |||
41 | try: |
|
44 | try: | |
42 | try: |
|
45 | try: |
@@ -179,6 +179,8 b' def unbundle(repo, req):' | |||||
179 | raise ErrorResponse(HTTP_OK, inst) |
|
179 | raise ErrorResponse(HTTP_OK, inst) | |
180 | except (OSError, IOError), inst: |
|
180 | except (OSError, IOError), inst: | |
181 | error = getattr(inst, 'strerror', 'Unknown error') |
|
181 | error = getattr(inst, 'strerror', 'Unknown error') | |
|
182 | if not isinstance(error, str): | |||
|
183 | error = 'Error: %s' % str(error) | |||
182 | if inst.errno == errno.ENOENT: |
|
184 | if inst.errno == errno.ENOENT: | |
183 | code = HTTP_NOT_FOUND |
|
185 | code = HTTP_NOT_FOUND | |
184 | else: |
|
186 | else: |
@@ -274,7 +274,8 b' class svnsubrepo(object):' | |||||
274 | self._ui = ctx._repo.ui |
|
274 | self._ui = ctx._repo.ui | |
275 |
|
275 | |||
276 | def _svncommand(self, commands): |
|
276 | def _svncommand(self, commands): | |
277 | cmd = ['svn'] + commands + [self._path] |
|
277 | path = os.path.join(self._ctx._repo.origroot, self._path) | |
|
278 | cmd = ['svn'] + commands + [path] | |||
278 | cmd = [util.shellquote(arg) for arg in cmd] |
|
279 | cmd = [util.shellquote(arg) for arg in cmd] | |
279 | cmd = util.quotecommand(' '.join(cmd)) |
|
280 | cmd = util.quotecommand(' '.join(cmd)) | |
280 | env = dict(os.environ) |
|
281 | env = dict(os.environ) |
@@ -28,6 +28,10 b' diff a diff of one or more file' | |||||
28 | annotate an annotated file |
|
28 | annotate an annotated file | |
29 | entries the entries relevant to the page |
|
29 | entries the entries relevant to the page | |
30 |
|
30 | |||
|
31 | url base url of hgweb interface | |||
|
32 | staticurl base url for static resources | |||
|
33 | ||||
|
34 | ||||
31 | Templates and commands: |
|
35 | Templates and commands: | |
32 | changelog(rev) - a page for browsing changesets |
|
36 | changelog(rev) - a page for browsing changesets | |
33 | naventry - a link for jumping to a changeset number |
|
37 | naventry - a link for jumping to a changeset number |
@@ -16,7 +16,8 b' if [ $? -ne 0 ]; then' | |||||
16 | fi |
|
16 | fi | |
17 | escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"` |
|
17 | escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"` | |
18 | filterpath="s|$escapedwd|/root|" |
|
18 | filterpath="s|$escapedwd|/root|" | |
19 |
filter |
|
19 | filteroutofdate='s/ in transaction.*/ is out of date/;s/Out of date: /File /' | |
|
20 | filterexternal="s|Fetching external item into '.*/s/externals'|Fetching external item into 's/externals'|g" | |||
20 |
|
21 | |||
21 | echo % create subversion repo |
|
22 | echo % create subversion repo | |
22 |
|
23 | |||
@@ -62,7 +63,7 b' echo' | |||||
62 | echo % change file in svn and hg, commit |
|
63 | echo % change file in svn and hg, commit | |
63 | echo a >> a |
|
64 | echo a >> a | |
64 | echo alpha >> s/alpha |
|
65 | echo alpha >> s/alpha | |
65 | hg commit -m 'Message!' |
|
66 | hg commit -m 'Message!' | sed "$filterexternal" | |
66 | hg debugsub | sed "$filterpath" |
|
67 | hg debugsub | sed "$filterpath" | |
67 |
|
68 | |||
68 | echo |
|
69 | echo | |
@@ -81,12 +82,12 b' cd ../../sub/t' | |||||
81 |
|
82 | |||
82 | echo % this commit from hg will fail |
|
83 | echo % this commit from hg will fail | |
83 | echo zzz >> s/alpha |
|
84 | echo zzz >> s/alpha | |
84 |
hg ci -m 'amend alpha from hg' 2>&1 | sed "$filter |
|
85 | hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate" | |
85 | svn revert -q s/alpha |
|
86 | svn revert -q s/alpha | |
86 |
|
87 | |||
87 | echo % this commit fails because of meta changes |
|
88 | echo % this commit fails because of meta changes | |
88 | svn propset svn:mime-type 'text/html' s/alpha |
|
89 | svn propset svn:mime-type 'text/html' s/alpha | |
89 |
hg ci -m 'amend alpha from hg' 2>&1 | sed "$filter |
|
90 | hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate" | |
90 | svn revert -q s/alpha |
|
91 | svn revert -q s/alpha | |
91 |
|
92 | |||
92 | echo % this commit fails because of externals changes |
|
93 | echo % this commit fails because of externals changes | |
@@ -106,3 +107,6 b' hg clone t tc | fix_path' | |||||
106 | cd tc |
|
107 | cd tc | |
107 | echo % debugsub in clone |
|
108 | echo % debugsub in clone | |
108 | hg debugsub | sed "$filterpath" |
|
109 | hg debugsub | sed "$filterpath" | |
|
110 | ||||
|
111 | echo % verify subrepo is contained within the repo directory | |||
|
112 | python -c "import os.path; print os.path.exists('s')" |
@@ -72,11 +72,11 b' abort: cannot commit svn externals' | |||||
72 |
|
72 | |||
73 | % clone |
|
73 | % clone | |
74 | updating to branch default |
|
74 | updating to branch default | |
75 | A s/alpha |
|
75 | A tc/s/alpha | |
76 | U s |
|
76 | U tc/s | |
77 |
|
77 | |||
78 | Fetching external item into 's/externals' |
|
78 | Fetching external item into 'tc/s/externals' | |
79 | A s/externals/other |
|
79 | A tc/s/externals/other | |
80 | Checked out external at revision 1. |
|
80 | Checked out external at revision 1. | |
81 |
|
81 | |||
82 | Checked out revision 3. |
|
82 | Checked out revision 3. | |
@@ -85,3 +85,5 b' 3 files updated, 0 files merged, 0 files' | |||||
85 | path s |
|
85 | path s | |
86 | source file:///root/svn-repo/src |
|
86 | source file:///root/svn-repo/src | |
87 | revision 3 |
|
87 | revision 3 | |
|
88 | % verify subrepo is contained within the repo directory | |||
|
89 | True |
General Comments 0
You need to be logged in to leave comments.
Login now