changeset 984:6315bdd1546e

wrappers: Implement --newest-first option in incoming command
author Mitsuhiro Koga <shiena.jp@gmail.com>
date Thu, 22 Nov 2012 12:54:34 +0900
parents 0ba09ecf5df2
children b303b60be11e
files hgsubversion/wrappers.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -98,7 +98,10 @@ def incoming(orig, ui, repo, origsource=
     meta = repo.svnmeta(svn.uuid, svn.subdir)
 
     ui.status('incoming changes from %s\n' % other.svnurl)
-    for r in svn.revisions(start=meta.revmap.youngest):
+    svnrevisions = list(svn.revisions(start=meta.revmap.youngest))
+    if opts.get('newest_first'):
+        svnrevisions.reverse()
+    for r in svnrevisions:
         ui.status('\n')
         for label, attr in revmeta:
             l1 = label + ':'