comparison mercurial/commands.py @ 1457:518da3c3b6ce

This implements the nodesbetween method, and it removes the newer method and replaces it with calls to nodesbetween. nodesbetween calculates all the changesets needed to have a complete revision graph between a given set of base nodes and a given set of head nodes.
author Eric Hopper <hopper@omnifarious.org>
date Fri, 07 Oct 2005 10:48:27 -0700
parents c29c36745c6e
children 02099220ad49
comparison
equal deleted inserted replaced
1389:9b3ef6f3cef5 1457:518da3c3b6ce
1191 if not other.local(): 1191 if not other.local():
1192 raise util.Abort("incoming doesn't work for remote repositories yet") 1192 raise util.Abort("incoming doesn't work for remote repositories yet")
1193 o = repo.findincoming(other) 1193 o = repo.findincoming(other)
1194 if not o: 1194 if not o:
1195 return 1195 return
1196 o = other.newer(o) 1196 o = other.changelog.nodesbetween(o)[0]
1197 for n in o: 1197 for n in o:
1198 show_changeset(ui, other, changenode=n) 1198 show_changeset(ui, other, changenode=n)
1199 if opts['patch']: 1199 if opts['patch']:
1200 prev = other.changelog.parents(n)[0] 1200 prev = other.changelog.parents(n)[0]
1201 dodiff(ui, ui, other, prev, n) 1201 dodiff(ui, ui, other, prev, n)
1303 def outgoing(ui, repo, dest="default-push", **opts): 1303 def outgoing(ui, repo, dest="default-push", **opts):
1304 """show changesets not found in destination""" 1304 """show changesets not found in destination"""
1305 dest = ui.expandpath(dest) 1305 dest = ui.expandpath(dest)
1306 other = hg.repository(ui, dest) 1306 other = hg.repository(ui, dest)
1307 o = repo.findoutgoing(other) 1307 o = repo.findoutgoing(other)
1308 o = repo.newer(o) 1308 o = repo.changelog.nodesbetween(o)[0]
1309 for n in o: 1309 for n in o:
1310 show_changeset(ui, repo, changenode=n) 1310 show_changeset(ui, repo, changenode=n)
1311 if opts['patch']: 1311 if opts['patch']:
1312 prev = repo.changelog.parents(n)[0] 1312 prev = repo.changelog.parents(n)[0]
1313 dodiff(ui, ui, repo, prev, n) 1313 dodiff(ui, ui, repo, prev, n)