remove legacy hg parents REV syntax
authorMatt Mackall <mpm@selenic.com>
Wed, 15 Nov 2006 15:51:58 -0600
changeset 3658 d12c8668b102
parent 3657 4d988b7412f2
child 3659 025f68f22ae2
remove legacy hg parents REV syntax
mercurial/commands.py
--- 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)