comparison mercurial/commands.py @ 4896:ee04732fe61d

merge with crew-stable
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 17 Jul 2007 09:28:01 -0300
parents 2d545b98a7bc be5dc5e3ab2d
children 6fd953d5faea 8535c1770dd3
comparison
equal deleted inserted replaced
4893:44b0031514c1 4896:ee04732fe61d
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()]