Mercurial > hgsubversion
comparison svncommand.py @ 181:e37f9d3fd5e7
remove decorators (compat with python2.3)
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 13 Jan 2009 13:59:50 +0100 |
parents | ba801f44d240 |
children | 57355b0e7bd1 |
comparison
equal
deleted
inserted
replaced
180:3f1e8a5ec9dd | 181:e37f9d3fd5e7 |
---|---|
52 ui.status('Unknown subcommand %s\n' % subcommand) | 52 ui.status('Unknown subcommand %s\n' % subcommand) |
53 else: | 53 else: |
54 raise | 54 raise |
55 | 55 |
56 | 56 |
57 @register_subcommand('help') | |
58 def help_command(ui, args=None, **opts): | 57 def help_command(ui, args=None, **opts): |
59 """Get help on the subsubcommands. | 58 """Get help on the subsubcommands. |
60 """ | 59 """ |
61 if args: | 60 if args: |
62 subcommand = args[0] | 61 subcommand = args[0] |
75 if doc is None: | 74 if doc is None: |
76 doc = "No documentation available for %s." % subcommand | 75 doc = "No documentation available for %s." % subcommand |
77 ui.status(doc.strip(), '\n') | 76 ui.status(doc.strip(), '\n') |
78 return | 77 return |
79 ui.status(generate_help()) | 78 ui.status(generate_help()) |
79 help_command = register_subcommand('help')(help_command) | |
80 | 80 |
81 @register_subcommand('up') | |
82 def update(ui, args, repo, clean=False, **opts): | 81 def update(ui, args, repo, clean=False, **opts): |
83 """Update to a specified Subversion revision number. | 82 """Update to a specified Subversion revision number. |
84 """ | 83 """ |
85 assert len(args) == 1 | 84 assert len(args) == 1 |
86 rev = int(args[0]) | 85 rev = int(args[0]) |
99 else: | 98 else: |
100 ui.status('Ambiguous revision!\n') | 99 ui.status('Ambiguous revision!\n') |
101 ui.status('\n'.join(['%s on %s' % (node.hex(a[0]), a[1]) for a in | 100 ui.status('\n'.join(['%s on %s' % (node.hex(a[0]), a[1]) for a in |
102 answers]+[''])) | 101 answers]+[''])) |
103 return 1 | 102 return 1 |
103 update = register_subcommand('up')(update) | |
104 | 104 |
105 | 105 |
106 @register_subcommand('verify_revision') | |
107 def verify_revision(ui, args, repo, force=False, **opts): | 106 def verify_revision(ui, args, repo, force=False, **opts): |
108 """Verify a single converted revision. | 107 """Verify a single converted revision. |
109 Note: This wipes your working copy and then exports the corresponding | 108 Note: This wipes your working copy and then exports the corresponding |
110 Subversion into your working copy to verify. Use with caution. | 109 Subversion into your working copy to verify. Use with caution. |
111 """ | 110 """ |
137 return 2 | 136 return 2 |
138 else: | 137 else: |
139 ui.status('OK.\n') | 138 ui.status('OK.\n') |
140 return 0 | 139 return 0 |
141 return 1 | 140 return 1 |
141 verify_revision = register_subcommand('verify_revision')(verify_revision) | |
142 | 142 |
143 @register_subcommand('verify_all_revisions') | |
144 def verify_all_revisions(ui, args, repo, **opts): | 143 def verify_all_revisions(ui, args, repo, **opts): |
145 """Verify all the converted revisions | 144 """Verify all the converted revisions |
146 optionally starting at a revision. | 145 optionally starting at a revision. |
147 | 146 |
148 Note: This is *extremely* abusive of the Subversion server. It exports every | 147 Note: This is *extremely* abusive of the Subversion server. It exports every |
166 print revnum, 'skipped' | 165 print revnum, 'skipped' |
167 else: | 166 else: |
168 print revnum, 'failed' | 167 print revnum, 'failed' |
169 return 1 | 168 return 1 |
170 return 0 | 169 return 0 |
170 verify_all_revisions = register_subcommand('verify_all_revisions')(verify_all_revisions) |