1972 if (pats or opts.get('include') or opts.get('exclude') |
1972 if (pats or opts.get('include') or opts.get('exclude') |
1973 or opts.get('all')): |
1973 or opts.get('all')): |
1974 match = scmutil.match(old, pats, opts) |
1974 match = scmutil.match(old, pats, opts) |
1975 newid = _commitfiltered(repo, old, match) |
1975 newid = _commitfiltered(repo, old, match) |
1976 if newid is None: |
1976 if newid is None: |
1977 raise util.Abort(_('nothing to uncommit')) |
1977 raise util.Abort(_('nothing to uncommit'), |
|
1978 hint=_("use --all to uncommit all files")) |
1978 # Move local changes on filtered changeset |
1979 # Move local changes on filtered changeset |
1979 createmarkers(repo, [(old, (repo[newid],))]) |
1980 createmarkers(repo, [(old, (repo[newid],))]) |
1980 phases.retractboundary(repo, oldphase, [newid]) |
1981 phases.retractboundary(repo, oldphase, [newid]) |
1981 repo.dirstate.setparents(newid, node.nullid) |
1982 repo.dirstate.setparents(newid, node.nullid) |
1982 _uncommitdirstate(repo, old, match) |
1983 _uncommitdirstate(repo, old, match) |