[PATCH] allow 'hg out' / 'hg in' to show oldest commit first

Michal Kvasnica kvasnica at gmail.com
Fri Sep 30 11:04:08 CDT 2005


>>allow 'hg out' / 'hg in' to show oldest commit first
> Is this against tip? Oldest first is now the default. Or does this
> actually do newest first?

indeed, it should have been "newest first", sorry. this patch is
versus latest tip (0f25830f6bc3):

diff -r 0f25830f6bc3 -r d18c3d4e71a4 mercurial/commands.py
--- a/mercurial/commands.py     Thu Sep 29 15:18:32 2005 -0700
+++ b/mercurial/commands.py     Fri Sep 30 16:59:19 2005 +0100
@@ -1195,6 +1195,8 @@
     if not o:
         return
     o = other.newer(o)
+    if opts['newest_first']:
+        o.reverse()
     for n in o:
         show_changeset(ui, other, changenode=n)
         if opts['patch']:
@@ -1291,6 +1293,8 @@
     other = hg.repository(ui, dest)
     o = repo.findoutgoing(other)
     o = repo.newer(o)
+    if opts['newest_first']:
+        o.reverse()
     for n in o:
         show_changeset(ui, repo, changenode=n)
         if opts['patch']:
@@ -1851,8 +1855,9 @@
           ('b', 'base', "", 'base path')],
          "hg import [-f] [-p NUM] [-b BASE] PATCH..."),
     "incoming|in": (incoming,
-         [('p', 'patch', None, 'show patch')],
-         'hg incoming [-p] [SOURCE]'),
+         [('p', 'patch', None, 'show patch'),
+          ('n', 'newest-first', None, 'show newest record first')],
+         'hg incoming [-p] [-n] [SOURCE]'),
     "^init": (init, [], 'hg init [DEST]'),
     "locate":
         (locate,
@@ -1872,8 +1877,9 @@
          'hg log [-I] [-X] [-r REV]... [-p] [FILE]'),
     "manifest": (manifest, [], 'hg manifest [REV]'),
     "outgoing|out": (outgoing,
-         [('p', 'patch', None, 'show patch')],
-         'hg outgoing [-p] [DEST]'),
+         [('p', 'patch', None, 'show patch'),
+          ('n', 'newest-first', None, 'show newest record first')],
+         'hg outgoing [-p] [-n] [DEST]'),
     "parents": (parents, [], 'hg parents [REV]'),
     "paths": (paths, [], 'hg paths [NAME]'),
     "^pull":




More information about the Mercurial mailing list