Show More
@@ -4513,7 +4513,7 b' def phase(ui, repo, *revs, **opts):' | |||||
4513 | rejected = [n for n in nodes |
|
4513 | rejected = [n for n in nodes | |
4514 | if newdata[cl.rev(n)] < targetphase] |
|
4514 | if newdata[cl.rev(n)] < targetphase] | |
4515 | if rejected: |
|
4515 | if rejected: | |
4516 |
ui.warn(_('cannot move %i changesets to a |
|
4516 | ui.warn(_('cannot move %i changesets to a higher ' | |
4517 | 'phase, use --force\n') % len(rejected)) |
|
4517 | 'phase, use --force\n') % len(rejected)) | |
4518 | ret = 1 |
|
4518 | ret = 1 | |
4519 | if changes: |
|
4519 | if changes: |
@@ -63,7 +63,8 b' def bisect(changelog, state):' | |||||
63 | badrev, ancestors = buildancestors(state['good'], state['bad']) |
|
63 | badrev, ancestors = buildancestors(state['good'], state['bad']) | |
64 | bad = changelog.node(badrev) |
|
64 | bad = changelog.node(badrev) | |
65 | if not ancestors: # now we're confused |
|
65 | if not ancestors: # now we're confused | |
66 |
if len(state['bad']) == 1 and len(state['good']) == 1 |
|
66 | if (len(state['bad']) == 1 and len(state['good']) == 1 and | |
|
67 | state['bad'] != state['good']): | |||
67 | raise util.Abort(_("starting revisions are not directly related")) |
|
68 | raise util.Abort(_("starting revisions are not directly related")) | |
68 | raise util.Abort(_("inconsistent state, %s:%s is good and bad") |
|
69 | raise util.Abort(_("inconsistent state, %s:%s is good and bad") | |
69 | % (badrev, short(bad))) |
|
70 | % (badrev, short(bad))) |
@@ -228,9 +228,12 b' def _search(web, req, tmpl):' | |||||
228 | query = req.form['rev'][0] |
|
228 | query = req.form['rev'][0] | |
229 | revcount = web.maxchanges |
|
229 | revcount = web.maxchanges | |
230 | if 'revcount' in req.form: |
|
230 | if 'revcount' in req.form: | |
231 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
231 | try: | |
232 |
revcount = |
|
232 | revcount = int(req.form.get('revcount', [revcount])[0]) | |
233 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
233 | revcount = max(revcount, 1) | |
|
234 | tmpl.defaults['sessionvars']['revcount'] = revcount | |||
|
235 | except ValueError: | |||
|
236 | pass | |||
234 |
|
237 | |||
235 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
238 | lessvars = copy.copy(tmpl.defaults['sessionvars']) | |
236 | lessvars['revcount'] = max(revcount / 2, 1) |
|
239 | lessvars['revcount'] = max(revcount / 2, 1) | |
@@ -307,9 +310,12 b' def changelog(web, req, tmpl, shortlog=F' | |||||
307 |
|
310 | |||
308 | revcount = shortlog and web.maxshortchanges or web.maxchanges |
|
311 | revcount = shortlog and web.maxshortchanges or web.maxchanges | |
309 | if 'revcount' in req.form: |
|
312 | if 'revcount' in req.form: | |
310 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
313 | try: | |
311 |
revcount = |
|
314 | revcount = int(req.form.get('revcount', [revcount])[0]) | |
312 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
315 | revcount = max(revcount, 1) | |
|
316 | tmpl.defaults['sessionvars']['revcount'] = revcount | |||
|
317 | except ValueError: | |||
|
318 | pass | |||
313 |
|
319 | |||
314 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
320 | lessvars = copy.copy(tmpl.defaults['sessionvars']) | |
315 | lessvars['revcount'] = max(revcount / 2, 1) |
|
321 | lessvars['revcount'] = max(revcount / 2, 1) | |
@@ -822,9 +828,12 b' def filelog(web, req, tmpl):' | |||||
822 |
|
828 | |||
823 | revcount = web.maxshortchanges |
|
829 | revcount = web.maxshortchanges | |
824 | if 'revcount' in req.form: |
|
830 | if 'revcount' in req.form: | |
825 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
831 | try: | |
826 |
revcount = |
|
832 | revcount = int(req.form.get('revcount', [revcount])[0]) | |
827 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
833 | revcount = max(revcount, 1) | |
|
834 | tmpl.defaults['sessionvars']['revcount'] = revcount | |||
|
835 | except ValueError: | |||
|
836 | pass | |||
828 |
|
837 | |||
829 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
838 | lessvars = copy.copy(tmpl.defaults['sessionvars']) | |
830 | lessvars['revcount'] = max(revcount / 2, 1) |
|
839 | lessvars['revcount'] = max(revcount / 2, 1) | |
@@ -944,9 +953,12 b' def graph(web, req, tmpl):' | |||||
944 | bg_height = 39 |
|
953 | bg_height = 39 | |
945 | revcount = web.maxshortchanges |
|
954 | revcount = web.maxshortchanges | |
946 | if 'revcount' in req.form: |
|
955 | if 'revcount' in req.form: | |
947 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
956 | try: | |
948 |
revcount = |
|
957 | revcount = int(req.form.get('revcount', [revcount])[0]) | |
949 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
958 | revcount = max(revcount, 1) | |
|
959 | tmpl.defaults['sessionvars']['revcount'] = revcount | |||
|
960 | except ValueError: | |||
|
961 | pass | |||
950 |
|
962 | |||
951 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
963 | lessvars = copy.copy(tmpl.defaults['sessionvars']) | |
952 | lessvars['revcount'] = max(revcount / 2, 1) |
|
964 | lessvars['revcount'] = max(revcount / 2, 1) |
@@ -280,7 +280,7 b' skip' | |||||
280 | $ hg bisect -r |
|
280 | $ hg bisect -r | |
281 | $ hg bisect -g tip |
|
281 | $ hg bisect -g tip | |
282 | $ hg bisect -b tip |
|
282 | $ hg bisect -b tip | |
283 | abort: starting revisions are not directly related |
|
283 | abort: inconsistent state, 31:58c80a7c8a40 is good and bad | |
284 | [255] |
|
284 | [255] | |
285 |
|
285 | |||
286 | $ hg bisect -r |
|
286 | $ hg bisect -r |
@@ -482,7 +482,7 b' test partial failure' | |||||
482 |
|
482 | |||
483 | $ hg phase --public 7 |
|
483 | $ hg phase --public 7 | |
484 | $ hg phase --draft '5 or 7' |
|
484 | $ hg phase --draft '5 or 7' | |
485 |
cannot move 1 changesets to a |
|
485 | cannot move 1 changesets to a higher phase, use --force | |
486 | phase changed for 1 changesets |
|
486 | phase changed for 1 changesets | |
487 | [1] |
|
487 | [1] | |
488 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
488 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
@@ -506,7 +506,7 b' test partial failure' | |||||
506 | test complete failure |
|
506 | test complete failure | |
507 |
|
507 | |||
508 | $ hg phase --draft 7 |
|
508 | $ hg phase --draft 7 | |
509 |
cannot move 1 changesets to a |
|
509 | cannot move 1 changesets to a higher phase, use --force | |
510 | no phases changed |
|
510 | no phases changed | |
511 | [1] |
|
511 | [1] | |
512 |
|
512 |
General Comments 0
You need to be logged in to leave comments.
Login now