Mercurial > hgsubversion
comparison wrappers.py @ 267:f000b2392fc2
Push status messages, remove svn flag from opts before passing on
author | Luke Opperman <luke@loppear.com> |
---|---|
date | Tue, 14 Apr 2009 09:32:40 -0500 |
parents | a5f20358f737 |
children | 14914dbd8a4a |
comparison
equal
deleted
inserted
replaced
266:a5f20358f737 | 267:f000b2392fc2 |
---|---|
86 | 86 |
87 | 87 |
88 def push(orig, ui, repo, dest=None, *args, **opts): | 88 def push(orig, ui, repo, dest=None, *args, **opts): |
89 """push revisions starting at a specified head back to Subversion. | 89 """push revisions starting at a specified head back to Subversion. |
90 """ | 90 """ |
91 opts.pop('svn', None) # unused in this case | |
91 svnurl = repo.ui.expandpath(dest or 'default-push', dest or 'default') | 92 svnurl = repo.ui.expandpath(dest or 'default-push', dest or 'default') |
92 if not cmdutil.issvnurl(svnurl): | 93 if not cmdutil.issvnurl(svnurl): |
93 return orig(ui, repo, dest=dest, *args, **opts) | 94 return orig(ui, repo, dest=dest, *args, **opts) |
94 old_encoding = util.swap_out_encoding() | 95 old_encoding = util.swap_out_encoding() |
95 hge = hg_delta_editor.HgChangeReceiver(repo=repo) | 96 hge = hg_delta_editor.HgChangeReceiver(repo=repo) |
103 # 1. Find all outgoing commits from this head | 104 # 1. Find all outgoing commits from this head |
104 if len(repo.parents()) != 1: | 105 if len(repo.parents()) != 1: |
105 ui.status('Cowardly refusing to push branch merge') | 106 ui.status('Cowardly refusing to push branch merge') |
106 return 1 | 107 return 1 |
107 workingrev = repo.parents()[0] | 108 workingrev = repo.parents()[0] |
109 ui.status('searching for changes\n') | |
108 outgoing = util.outgoing_revisions(ui, repo, hge, svn_commit_hashes, workingrev.node()) | 110 outgoing = util.outgoing_revisions(ui, repo, hge, svn_commit_hashes, workingrev.node()) |
109 if not (outgoing and len(outgoing)): | 111 if not (outgoing and len(outgoing)): |
110 ui.status('No revisions to push.') | 112 ui.status('no changes found\n') |
111 return 0 | 113 return 0 |
112 while outgoing: | 114 while outgoing: |
113 oldest = outgoing.pop(-1) | 115 oldest = outgoing.pop(-1) |
114 old_ctx = repo[oldest] | 116 old_ctx = repo[oldest] |
115 if len(old_ctx.parents()) != 1: | 117 if len(old_ctx.parents()) != 1: |