comparison svncommand.py @ 100:91ce18fa0375

Add a diff command that behaves kind of like svn diff.
author Augie Fackler <durin42@gmail.com>
date Fri, 21 Nov 2008 16:15:23 -0600
parents b5651f53e7ae
children ed42f6e5705a
comparison
equal deleted inserted replaced
99:1da7aafdd323 100:91ce18fa0375
14 from util import register_subcommand, svn_subcommands 14 from util import register_subcommand, svn_subcommands
15 # dirty trick to force demandimport to run my decorator anyway. 15 # dirty trick to force demandimport to run my decorator anyway.
16 from utility_commands import print_wc_url 16 from utility_commands import print_wc_url
17 from fetch_command import fetch_revisions 17 from fetch_command import fetch_revisions
18 from push_cmd import commit_from_rev 18 from push_cmd import commit_from_rev
19 from diff_cmd import diff_command
19 # shut up, pyflakes, we must import those 20 # shut up, pyflakes, we must import those
20 __x = [print_wc_url, fetch_revisions, commit_from_rev, ] 21 __x = [print_wc_url, fetch_revisions, commit_from_rev, diff_command]
21 22
22 mode755 = (stat.S_IXUSR | stat.S_IXGRP| stat.S_IXOTH | stat.S_IRUSR | 23 mode755 = (stat.S_IXUSR | stat.S_IXGRP| stat.S_IXOTH | stat.S_IRUSR |
23 stat.S_IRGRP| stat.S_IROTH | stat.S_IWUSR) 24 stat.S_IRGRP| stat.S_IROTH | stat.S_IWUSR)
24 mode644 = (stat.S_IRUSR | stat.S_IRGRP| stat.S_IROTH | stat.S_IWUSR) 25 mode644 = (stat.S_IRUSR | stat.S_IRGRP| stat.S_IROTH | stat.S_IWUSR)
25 26
72 doc = svn_subcommands[subcommand].__doc__ 73 doc = svn_subcommands[subcommand].__doc__
73 if doc is None: 74 if doc is None:
74 doc = "No documentation available for %s." % subcommand 75 doc = "No documentation available for %s." % subcommand
75 ui.status(doc.strip(), '\n') 76 ui.status(doc.strip(), '\n')
76 return 77 return
77 ui.status('Valid commands: ', ' '.join(sorted(svn_subcommands.keys())), 78 ui.status('Valid commands: ', ' '.join(sorted(svn_subcommands.keys())),
78 '\n') 79 '\n')
79 80
80 @register_subcommand('gentags') 81 @register_subcommand('gentags')
81 def generate_hg_tags(ui, hg_repo_path, **opts): 82 def generate_hg_tags(ui, hg_repo_path, **opts):
82 """Save tags to .hg/localtags 83 """Save tags to .hg/localtags