equal
deleted
inserted
replaced
852 if not outgoing.missing: |
852 if not outgoing.missing: |
853 raise error.Abort(_('no outgoing ancestors')) |
853 raise error.Abort(_('no outgoing ancestors')) |
854 roots = list(repo.revs("roots(%ln)", outgoing.missing)) |
854 roots = list(repo.revs("roots(%ln)", outgoing.missing)) |
855 if 1 < len(roots): |
855 if 1 < len(roots): |
856 msg = _('there are ambiguous outgoing revisions') |
856 msg = _('there are ambiguous outgoing revisions') |
857 hint = _('see "hg help histedit" for more detail') |
857 hint = _("see 'hg help histedit' for more detail") |
858 raise error.Abort(msg, hint=hint) |
858 raise error.Abort(msg, hint=hint) |
859 return repo.lookup(roots[0]) |
859 return repo.lookup(roots[0]) |
860 |
860 |
861 |
861 |
862 @command('histedit', |
862 @command('histedit', |
1288 if repo.revs('(%ld) and merge()', ctxs): |
1288 if repo.revs('(%ld) and merge()', ctxs): |
1289 raise error.Abort(_('cannot edit history that contains merges')) |
1289 raise error.Abort(_('cannot edit history that contains merges')) |
1290 root = ctxs[0] # list is already sorted by repo.set |
1290 root = ctxs[0] # list is already sorted by repo.set |
1291 if not root.mutable(): |
1291 if not root.mutable(): |
1292 raise error.Abort(_('cannot edit public changeset: %s') % root, |
1292 raise error.Abort(_('cannot edit public changeset: %s') % root, |
1293 hint=_('see "hg help phases" for details')) |
1293 hint=_("see 'hg help phases' for details")) |
1294 return [c.node() for c in ctxs] |
1294 return [c.node() for c in ctxs] |
1295 |
1295 |
1296 def ruleeditor(repo, ui, actions, editcomment=""): |
1296 def ruleeditor(repo, ui, actions, editcomment=""): |
1297 """open an editor to edit rules |
1297 """open an editor to edit rules |
1298 |
1298 |
1400 actions[:0] = drops |
1400 actions[:0] = drops |
1401 elif missing: |
1401 elif missing: |
1402 raise error.ParseError(_('missing rules for changeset %s') % |
1402 raise error.ParseError(_('missing rules for changeset %s') % |
1403 node.short(missing[0]), |
1403 node.short(missing[0]), |
1404 hint=_('use "drop %s" to discard, see also: ' |
1404 hint=_('use "drop %s" to discard, see also: ' |
1405 '"hg help -e histedit.config"') |
1405 "'hg help -e histedit.config'") |
1406 % node.short(missing[0])) |
1406 % node.short(missing[0])) |
1407 |
1407 |
1408 def adjustreplacementsfrommarkers(repo, oldreplacements): |
1408 def adjustreplacementsfrommarkers(repo, oldreplacements): |
1409 """Adjust replacements from obsolescense markers |
1409 """Adjust replacements from obsolescense markers |
1410 |
1410 |