changeset 920:270756aa29d5

Add hg outgoing command
author mpm@selenic.com
date Tue, 16 Aug 2005 15:49:26 -0800
parents 1458d20df2a8
children 1a51fa1b3513
files mercurial/commands.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Aug 16 15:30:26 2005 -0800
+++ b/mercurial/commands.py	Tue Aug 16 15:49:26 2005 -0800
@@ -854,6 +854,16 @@
     for f in files:
         ui.write("%40s %3s %s\n" % (hg.hex(m[f]), mf[f] and "755" or "644", f))
 
+def outgoing(ui, repo, dest="default-push"):
+    """show changesets not found in destination"""
+    dest = ui.expandpath(dest)
+    other = hg.repository(ui, dest)
+    o = repo.findoutgoing(other)
+    o = repo.newer(o)
+    o.reverse()
+    for n in o:
+        show_changeset(ui, repo, changenode=n)
+
 def parents(ui, repo, rev=None):
     """show the parents of the working dir or revision"""
     if rev:
@@ -1308,6 +1318,7 @@
           ('p', 'patch', None, 'show patch')],
          'hg log [-r REV1 [-r REV2]] [-p] [FILE]'),
     "manifest": (manifest, [], 'hg manifest [REV]'),
+    "outgoing": (outgoing, [], 'hg outgoing [DEST]'),
     "parents": (parents, [], 'hg parents [REV]'),
     "paths": (paths, [], 'hg paths [name]'),
     "^pull":