Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | hgext/histedit.py (4 lines) | |||
M | mercurial/hg.py (6 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz |
def findoutgoing(ui, repo, remote=None, force=False, opts=None): | def findoutgoing(ui, repo, remote=None, force=False, opts=None): | ||||
"""utility function to find the first outgoing changeset | """utility function to find the first outgoing changeset | ||||
Used by initialization code""" | Used by initialization code""" | ||||
if opts is None: | if opts is None: | ||||
opts = {} | opts = {} | ||||
dest = ui.expandpath(remote or 'default-push', remote or 'default') | dest = ui.expandpath(remote or 'default-push', remote or 'default') | ||||
dest, revs = hg.parseurl(dest, None)[:2] | dest, branches = hg.parseurl(dest, None)[:2] | ||||
ui.status(_('comparing with %s\n') % util.hidepassword(dest)) | ui.status(_('comparing with %s\n') % util.hidepassword(dest)) | ||||
revs, checkout = hg.addbranchrevs(repo, repo, revs, None) | revs, checkout = hg.addbranchrevs(repo, repo, branches, None) | ||||
other = hg.peer(repo, opts, dest) | other = hg.peer(repo, opts, dest) | ||||
if revs: | if revs: | ||||
revs = [repo.lookup(rev) for rev in revs] | revs = [repo.lookup(rev) for rev in revs] | ||||
outgoing = discovery.findcommonoutgoing(repo, other, revs, force=force) | outgoing = discovery.findcommonoutgoing(repo, other, revs, force=force) | ||||
if not outgoing.missing: | if not outgoing.missing: | ||||
raise error.Abort(_('no outgoing ancestors')) | raise error.Abort(_('no outgoing ancestors')) |
"mode" key determines how to construct the directory name of the shared | "mode" key determines how to construct the directory name of the shared | ||||
repository. "identity" means the name is derived from the node of the first | repository. "identity" means the name is derived from the node of the first | ||||
changeset in the repository. "remote" means the name is derived from the | changeset in the repository. "remote" means the name is derived from the | ||||
remote's path/URL. Defaults to "identity." | remote's path/URL. Defaults to "identity." | ||||
""" | """ | ||||
if isinstance(source, bytes): | if isinstance(source, bytes): | ||||
origsource = ui.expandpath(source) | origsource = ui.expandpath(source) | ||||
source, branch = parseurl(origsource, branch) | source, branches = parseurl(origsource, branch) | ||||
srcpeer = peer(ui, peeropts, source) | srcpeer = peer(ui, peeropts, source) | ||||
else: | else: | ||||
srcpeer = source.peer() # in case we were called with a localrepo | srcpeer = source.peer() # in case we were called with a localrepo | ||||
branch = (None, branch or []) | branches = (None, branch or []) | ||||
origsource = source = srcpeer.url() | origsource = source = srcpeer.url() | ||||
rev, checkout = addbranchrevs(srcpeer, srcpeer, branch, rev) | rev, checkout = addbranchrevs(srcpeer, srcpeer, branches, rev) | ||||
if dest is None: | if dest is None: | ||||
dest = defaultdest(source) | dest = defaultdest(source) | ||||
if dest: | if dest: | ||||
ui.status(_("destination directory: %s\n") % dest) | ui.status(_("destination directory: %s\n") % dest) | ||||
else: | else: | ||||
dest = ui.expandpath(dest) | dest = ui.expandpath(dest) | ||||