909 path = ui.paths.getpath(dest, default=(b'default-push', b'default')) |
909 path = ui.paths.getpath(dest, default=(b'default-push', b'default')) |
910 if not path: |
910 if not path: |
911 raise error.Abort((b'default repository not configured!'), |
911 raise error.Abort((b'default repository not configured!'), |
912 hint=(b"see 'hg help config.paths'")) |
912 hint=(b"see 'hg help config.paths'")) |
913 dest = path.pushloc or path.loc |
913 dest = path.pushloc or path.loc |
914 branches = (path.branch, opts.get(b'branch') or []) |
|
915 ui.status((b'analysing phase of %s\n') % util.hidepassword(dest)) |
914 ui.status((b'analysing phase of %s\n') % util.hidepassword(dest)) |
916 revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get(b'rev')) |
|
917 other = hg.peer(repo, opts, dest) |
915 other = hg.peer(repo, opts, dest) |
918 |
916 |
919 # easier to perform discovery through the operation |
917 # easier to perform discovery through the operation |
920 op = exchange.pushoperation(repo, other) |
918 op = exchange.pushoperation(repo, other) |
921 exchange._pushdiscoverychangeset(op) |
919 exchange._pushdiscoverychangeset(op) |