--- a/mercurial/commands.py Fri Jun 24 23:20:30 2005 -0800
+++ b/mercurial/commands.py Fri Jun 24 23:22:46 2005 -0800
@@ -602,6 +602,10 @@
"""remove the specified files on the next commit"""
repo.remove(relpath(repo, (file,) + files))
+def root(ui, repo):
+ """print the root (top) of the current working dir"""
+ ui.write(repo.root + "\n")
+
def serve(ui, repo, **opts):
"""export the repository via HTTP"""
hgweb.server(repo.root, opts["name"], opts["templates"],
@@ -748,6 +752,7 @@
'hg rawcommit [options] [files]'),
"recover": (recover, [], "hg recover"),
"remove|rm": (remove, [], "hg remove [files]"),
+ "root": (root, [], "hg root"),
"serve": (serve, [('p', 'port', 8000, 'listen port'),
('a', 'address', '', 'interface address'),
('n', 'name', os.getcwd(), 'repository name'),