equal
deleted
inserted
replaced
1991 which the file was last changed (before the working directory |
1991 which the file was last changed (before the working directory |
1992 revision or the argument to --rev if given) is printed. |
1992 revision or the argument to --rev if given) is printed. |
1993 """ |
1993 """ |
1994 rev = opts.get('rev') |
1994 rev = opts.get('rev') |
1995 if file_: |
1995 if file_: |
1996 ctx = repo.filectx(file_, changeid=rev) |
1996 files, match, anypats = cmdutil.matchpats(repo, (file_,), opts) |
|
1997 if anypats or len(files) != 1: |
|
1998 raise util.Abort(_('can only specify an explicit file name')) |
|
1999 ctx = repo.filectx(files[0], changeid=rev) |
1997 elif rev: |
2000 elif rev: |
1998 ctx = repo.changectx(rev) |
2001 ctx = repo.changectx(rev) |
1999 else: |
2002 else: |
2000 ctx = repo.workingctx() |
2003 ctx = repo.workingctx() |
2001 p = [cp.node() for cp in ctx.parents()] |
2004 p = [cp.node() for cp in ctx.parents()] |