equal
deleted
inserted
replaced
1976 which the file was last changed (before the working directory |
1976 which the file was last changed (before the working directory |
1977 revision or the argument to --rev if given) is printed. |
1977 revision or the argument to --rev if given) is printed. |
1978 """ |
1978 """ |
1979 rev = opts.get('rev') |
1979 rev = opts.get('rev') |
1980 if file_: |
1980 if file_: |
1981 ctx = repo.filectx(file_, changeid=rev) |
1981 files, match, anypats = cmdutil.matchpats(repo, (file_,), opts) |
|
1982 if anypats or len(files) != 1: |
|
1983 raise util.Abort(_('can only specify an explicit file name')) |
|
1984 ctx = repo.filectx(files[0], changeid=rev) |
1982 elif rev: |
1985 elif rev: |
1983 ctx = repo.changectx(rev) |
1986 ctx = repo.changectx(rev) |
1984 else: |
1987 else: |
1985 ctx = repo.workingctx() |
1988 ctx = repo.workingctx() |
1986 p = [cp.node() for cp in ctx.parents()] |
1989 p = [cp.node() for cp in ctx.parents()] |