comparison silvermirror/hg.py @ 3:8a5d2083fbd1

adding stub for main()
author k0s <k0scist@gmail.com>
date Fri, 02 Oct 2009 19:04:19 -0400
parents 0d9094bb98b0
children 660c74f33ed2
comparison
equal deleted inserted replaced
2:0d9094bb98b0 3:8a5d2083fbd1
2 """ 2 """
3 stub for the hg backend of silvermirror 3 stub for the hg backend of silvermirror
4 """ 4 """
5 5
6 import os 6 import os
7 import sys
7 from mercurial import commands, hg, ui 8 from mercurial import commands, hg, ui
9 from optparse import OptionParser
8 10
9 def update(host, path): 11 def update(host, path):
10 """ 12 """
11 get changes from host on path 13 get changes from host on path
12 """ 14 """
33 repo = hg.repository(ui, d) 35 repo = hg.repository(ui, d)
34 repos.append(os.path.basename(d)) 36 repos.append(os.path.basename(d))
35 except mercurial.repo.RepoError: 37 except mercurial.repo.RepoError:
36 pass 38 pass
37 return repos 39 return repos
40
41 def main(args=sys.argv[1:]):
42 parser = OptionParser()
43 options, args = parser.parse_args(args)
44 if len(args) > 1:
45 raise NotImplementedError
46
47 if __name__ == '__main__':
48 main()