Update email adress and git respository adress.
[hgct.git] / hct.py
blobcfa0a2e816ed2f04e9d06d863c6f54f8fd850b5b
1 #!/usr/bin/env python
3 # hct - hg extension for invoking the (h)gct commit tool
5 # This is currently very simple but allows the (h)gct commit tool to
6 # integrate with the hg commandline interface. By default, the hgct
7 # command should be in the user's path. Edit the HGCT_PATH variable
8 # to manually specify a different path.
10 # To enable this extension, add a line like the following to the
11 # extensions section in your .hgrc file:
13 # [extensions]
14 # ...
15 # hct = /path/to/hct.py
17 # If you have installed hct.py in the standard Python module directory
18 # (typically something like /usr/lib/python2.4/site-packages) you can
19 # leave the path empty. That is, add the following line to .hgrc
20 # instead:
22 # [extensions]
23 # ...
24 # hct =
26 # Invoke the commit tool with the "hg ct" command. It will appear in
27 # hg help as normal.
30 HGCT_PATH = "hgct"
32 import os
34 def invoke_hgct(ui, repo):
35 """Run hgct commit tool"""
37 os.chdir(repo.root)
38 status = os.system(HGCT_PATH + " --one-shot")
40 if status is not 0:
41 print "Error invoking hgct commit tool"
43 cmdtable = { 'ct' : (invoke_hgct, [], 'hg ct') }
45 def reposetup(ui, repo):
46 pass