changeset 3658:d12c8668b102

remove legacy hg parents REV syntax
author Matt Mackall <mpm@selenic.com>
date Wed, 15 Nov 2006 15:51:58 -0600
parents 4d988b7412f2
children 025f68f22ae2
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Nov 15 15:51:58 2006 -0600
+++ b/mercurial/commands.py	Wed Nov 15 15:51:58 2006 -0600
@@ -1614,22 +1614,12 @@
             continue
         displayer.show(changenode=n)
 
-def parents(ui, repo, file_=None, rev=None, **opts):
+def parents(ui, repo, file_=None, **opts):
     """show the parents of the working dir or revision
 
     Print the working directory's parent revisions.
     """
-    # legacy
-    if file_ and not rev:
-        try:
-            rev = repo.lookup(file_)
-            file_ = None
-        except hg.RepoError:
-            pass
-        else:
-            ui.warn(_("'hg parent REV' is deprecated, "
-                      "please use 'hg parents -r REV instead\n"))
-
+    rev = opts.get('rev')
     if rev:
         if file_:
             ctx = repo.filectx(file_, changeid=rev)