comparison mercurial/commands.py @ 468:157675add351

[PATCH] add "root" command -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] add "root" command From: Bryan O'Sullivan <bos@serpentine.com> Add "root" command Useful for scripting. manifest hash: a2df76139130ac034e53872f24f21f31b083bc42 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCvQZGywK+sNU5EO8RAtYSAKCKRyuxzcDOTV9q+GY5WZDJ/VZgzwCfXhut VvGtiSnIqoBeQ/PtPsokMb0= =gUsq -----END PGP SIGNATURE-----
author mpm@selenic.com
date Fri, 24 Jun 2005 23:22:46 -0800
parents 9d5447a366a7
children 0ab093b473c5
comparison
equal deleted inserted replaced
467:9d5447a366a7 468:157675add351
599 repo.recover() 599 repo.recover()
600 600
601 def remove(ui, repo, file, *files): 601 def remove(ui, repo, file, *files):
602 """remove the specified files on the next commit""" 602 """remove the specified files on the next commit"""
603 repo.remove(relpath(repo, (file,) + files)) 603 repo.remove(relpath(repo, (file,) + files))
604
605 def root(ui, repo):
606 """print the root (top) of the current working dir"""
607 ui.write(repo.root + "\n")
604 608
605 def serve(ui, repo, **opts): 609 def serve(ui, repo, **opts):
606 """export the repository via HTTP""" 610 """export the repository via HTTP"""
607 hgweb.server(repo.root, opts["name"], opts["templates"], 611 hgweb.server(repo.root, opts["name"], opts["templates"],
608 opts["address"], opts["port"]) 612 opts["address"], opts["port"])
746 ('t', 'text', "", 'commit text'), 750 ('t', 'text', "", 'commit text'),
747 ('l', 'logfile', "", 'commit text file')], 751 ('l', 'logfile', "", 'commit text file')],
748 'hg rawcommit [options] [files]'), 752 'hg rawcommit [options] [files]'),
749 "recover": (recover, [], "hg recover"), 753 "recover": (recover, [], "hg recover"),
750 "remove|rm": (remove, [], "hg remove [files]"), 754 "remove|rm": (remove, [], "hg remove [files]"),
755 "root": (root, [], "hg root"),
751 "serve": (serve, [('p', 'port', 8000, 'listen port'), 756 "serve": (serve, [('p', 'port', 8000, 'listen port'),
752 ('a', 'address', '', 'interface address'), 757 ('a', 'address', '', 'interface address'),
753 ('n', 'name', os.getcwd(), 'repository name'), 758 ('n', 'name', os.getcwd(), 'repository name'),
754 ('t', 'templates', "", 'template map')], 759 ('t', 'templates', "", 'template map')],
755 "hg serve [options]"), 760 "hg serve [options]"),