Mercurial > hg > soundsoftware-site
diff lib/redmine/scm/adapters/mercurial/redminehelper.py @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 051f544170fe |
children | cbb26bc654de |
line wrap: on
line diff
--- a/lib/redmine/scm/adapters/mercurial/redminehelper.py Thu Mar 03 11:42:28 2011 +0000 +++ b/lib/redmine/scm/adapters/mercurial/redminehelper.py Mon Jun 06 14:24:13 2011 +0100 @@ -120,9 +120,13 @@ ui.write('</manifest>\n') def rhannotate(ui, repo, *pats, **opts): + rev = urllib.unquote_plus(opts.pop('rev', None)) + opts['rev'] = rev return commands.annotate(ui, repo, *map(urllib.unquote_plus, pats), **opts) def rhcat(ui, repo, file1, *pats, **opts): + rev = urllib.unquote_plus(opts.pop('rev', None)) + opts['rev'] = rev return commands.cat(ui, repo, urllib.unquote_plus(file1), *map(urllib.unquote_plus, pats), **opts) def rhdiff(ui, repo, *pats, **opts): @@ -134,6 +138,18 @@ opts['nodates'] = True return commands.diff(ui, repo, *map(urllib.unquote_plus, pats), **opts) +def rhlog(ui, repo, *pats, **opts): + rev = opts.pop('rev') + bra0 = opts.pop('branch') + from_rev = urllib.unquote_plus(opts.pop('from', None)) + to_rev = urllib.unquote_plus(opts.pop('to' , None)) + bra = urllib.unquote_plus(opts.pop('rhbranch', None)) + from_rev = from_rev.replace('"', '\\"') + to_rev = to_rev.replace('"', '\\"') + opts['rev'] = ['"%s":"%s"' % (from_rev, to_rev)] + opts['branch'] = [bra] + return commands.log(ui, repo, *map(urllib.unquote_plus, pats), **opts) + def rhmanifest(ui, repo, path='', **opts): """output the sub-manifest of the specified directory""" ui.write('<?xml version="1.0"?>\n') @@ -176,6 +192,26 @@ [('r', 'rev', [], 'revision'), ('c', 'change', '', 'change made by revision')], 'hg rhdiff ([-c REV] | [-r REV] ...) [FILE]...'), + 'rhlog': (rhlog, + [ + ('r', 'rev', [], 'show the specified revision'), + ('b', 'branch', [], + 'show changesets within the given named branch', 'BRANCH'), + ('l', 'limit', '', + 'limit number of changes displayed', 'NUM'), + ('d', 'date', '', + 'show revisions matching date spec', 'DATE'), + ('u', 'user', [], + 'revisions committed by user', 'USER'), + ('', 'from', '', + '', ''), + ('', 'to', '', + '', ''), + ('', 'rhbranch', '', + '', ''), + ('', 'template', '', + 'display with template', 'TEMPLATE')], + 'hg rhlog [OPTION]... [FILE]'), 'rhmanifest': (rhmanifest, [('r', 'rev', '', 'show the specified revision')], 'hg rhmanifest [-r REV] [PATH]'),