Mercurial > hgsubversion
comparison push_cmd.py @ 99:1da7aafdd323
Refactored outgoing_revisions into util where it really belongs.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Fri, 21 Nov 2008 16:11:24 -0600 |
| parents | 6ecdbd22eb1d |
| children | 58ae90a65f41 |
comparison
equal
deleted
inserted
replaced
| 98:c7ac013cf7fd | 99:1da7aafdd323 |
|---|---|
| 21 ui_=ui) | 21 ui_=ui) |
| 22 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), | 22 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), |
| 23 hge.revmap.iterkeys())) | 23 hge.revmap.iterkeys())) |
| 24 # Strategy: | 24 # Strategy: |
| 25 # 1. Find all outgoing commits from this head | 25 # 1. Find all outgoing commits from this head |
| 26 outgoing = utility_commands.outgoing_revisions(ui, repo, hge, | 26 outgoing = util.outgoing_revisions(ui, repo, hge, svn_commit_hashes) |
| 27 svn_commit_hashes) | |
| 28 if not (outgoing and len(outgoing)): | 27 if not (outgoing and len(outgoing)): |
| 29 ui.status('No revisions to push.') | 28 ui.status('No revisions to push.') |
| 30 return 0 | 29 return 0 |
| 31 if len(repo.parents()) != 1: | 30 if len(repo.parents()) != 1: |
| 32 ui.status('Cowardly refusing to push branch merge') | 31 ui.status('Cowardly refusing to push branch merge') |
| 63 if needs_transplant in outgoing: | 62 if needs_transplant in outgoing: |
| 64 hg.clean(repo, repo['tip'].node()) | 63 hg.clean(repo, repo['tip'].node()) |
| 65 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, ui_=ui) | 64 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, ui_=ui) |
| 66 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), | 65 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), |
| 67 hge.revmap.iterkeys())) | 66 hge.revmap.iterkeys())) |
| 68 outgoing = utility_commands.outgoing_revisions(ui, repo, hge, | 67 outgoing = util.outgoing_revisions(ui, repo, hge, |
| 69 svn_commit_hashes) | 68 svn_commit_hashes) |
| 70 merc_util._encoding = oldencoding | 69 merc_util._encoding = oldencoding |
| 71 return 0 | 70 return 0 |
| 72 | 71 |
| 73 def _getdirchanges(svn, branchpath, parentctx, ctx, changedfiles): | 72 def _getdirchanges(svn, branchpath, parentctx, ctx, changedfiles): |
| 74 """Compute directories to add or delete when moving from parentctx | 73 """Compute directories to add or delete when moving from parentctx |
