equal
deleted
inserted
replaced
211 if not opts['parent']: |
211 if not opts['parent']: |
212 raise util.Abort(_('cannot back out a merge changeset without ' |
212 raise util.Abort(_('cannot back out a merge changeset without ' |
213 '--parent')) |
213 '--parent')) |
214 p = repo.lookup(opts['parent']) |
214 p = repo.lookup(opts['parent']) |
215 if p not in (p1, p2): |
215 if p not in (p1, p2): |
216 raise util.Abort(_('%s is not a parent of %s' % |
216 raise util.Abort(_('%s is not a parent of %s') % |
217 (short(p), short(node)))) |
217 (short(p), short(node))) |
218 parent = p |
218 parent = p |
219 else: |
219 else: |
220 if opts['parent']: |
220 if opts['parent']: |
221 raise util.Abort(_('cannot use --parent on non-merge changeset')) |
221 raise util.Abort(_('cannot use --parent on non-merge changeset')) |
222 parent = p1 |
222 parent = p1 |
1967 if mfentry: |
1967 if mfentry: |
1968 handle(hitlist, backuphit) |
1968 handle(hitlist, backuphit) |
1969 elif misslist is not None: |
1969 elif misslist is not None: |
1970 handle(misslist, backupmiss) |
1970 handle(misslist, backupmiss) |
1971 else: |
1971 else: |
1972 if exact: ui.warn(_('file not managed: %s\n' % rel)) |
1972 if exact: ui.warn(_('file not managed: %s\n') % rel) |
1973 break |
1973 break |
1974 else: |
1974 else: |
1975 # file has not changed in dirstate |
1975 # file has not changed in dirstate |
1976 if node == parent: |
1976 if node == parent: |
1977 if exact: ui.warn(_('no changes needed to %s\n' % rel)) |
1977 if exact: ui.warn(_('no changes needed to %s\n') % rel) |
1978 continue |
1978 continue |
1979 if pmf is None: |
1979 if pmf is None: |
1980 # only need parent manifest in this unlikely case, |
1980 # only need parent manifest in this unlikely case, |
1981 # so do not read by default |
1981 # so do not read by default |
1982 pmf = repo.manifest.read(repo.changelog.read(parent)[0]) |
1982 pmf = repo.manifest.read(repo.changelog.read(parent)[0]) |