Mercurial > hg
comparison hgext/patchbomb.py @ 11301:3d0591a66118
move discovery methods from localrepo into new discovery module
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 07 Jun 2010 18:35:54 +0200 |
parents | d1908cb95a82 |
children | 40c06bbf58be |
comparison
equal
deleted
inserted
replaced
11300:24eeca1f2791 | 11301:3d0591a66118 |
---|---|
74 ''' | 74 ''' |
75 | 75 |
76 import os, errno, socket, tempfile, cStringIO, time | 76 import os, errno, socket, tempfile, cStringIO, time |
77 import email.MIMEMultipart, email.MIMEBase | 77 import email.MIMEMultipart, email.MIMEBase |
78 import email.Utils, email.Encoders, email.Generator | 78 import email.Utils, email.Encoders, email.Generator |
79 from mercurial import cmdutil, commands, hg, mail, patch, util | 79 from mercurial import cmdutil, commands, hg, mail, patch, util, discovery |
80 from mercurial.i18n import _ | 80 from mercurial.i18n import _ |
81 from mercurial.node import bin | 81 from mercurial.node import bin |
82 | 82 |
83 def prompt(ui, prompt, default=None, rest=':'): | 83 def prompt(ui, prompt, default=None, rest=':'): |
84 if not ui.interactive(): | 84 if not ui.interactive(): |
242 revs, checkout = hg.addbranchrevs(repo, repo, branches, revs) | 242 revs, checkout = hg.addbranchrevs(repo, repo, branches, revs) |
243 if revs: | 243 if revs: |
244 revs = [repo.lookup(rev) for rev in revs] | 244 revs = [repo.lookup(rev) for rev in revs] |
245 other = hg.repository(hg.remoteui(repo, opts), dest) | 245 other = hg.repository(hg.remoteui(repo, opts), dest) |
246 ui.status(_('comparing with %s\n') % dest) | 246 ui.status(_('comparing with %s\n') % dest) |
247 o = repo.findoutgoing(other) | 247 o = discovery.findoutgoing(repo, other) |
248 if not o: | 248 if not o: |
249 ui.status(_("no changes found\n")) | 249 ui.status(_("no changes found\n")) |
250 return [] | 250 return [] |
251 o = repo.changelog.nodesbetween(o, revs)[0] | 251 o = repo.changelog.nodesbetween(o, revs)[0] |
252 return [str(repo.changelog.rev(r)) for r in o] | 252 return [str(repo.changelog.rev(r)) for r in o] |