# HG changeset patch # User Chris Cannam # Date 1300981716 0 # Node ID defe55be97b9d9fb210123aa781221dd144a6e7e # Parent 4d4acbad872832728769c1c7e2a23b8a939430c5 Do not show external checkbox/field until the repo has been automatically populated Pull external Hg as well as git and svn repos Some textual changes diff -r 4d4acbad8728 -r defe55be97b9 app/views/projects/settings/_repository.rhtml --- a/app/views/projects/settings/_repository.rhtml Wed Mar 23 17:36:21 2011 +0000 +++ b/app/views/projects/settings/_repository.rhtml Thu Mar 24 15:48:36 2011 +0000 @@ -14,13 +14,10 @@ <% if @repository %> <%= l(:text_settings_repo_explanation) %> <% if @repository.is_external %> -

<%= l(:text_settings_repo_is_external) %> +

<%= l(:text_settings_repo_is_external) %> <% else %> -

<%= l(:text_settings_repo_is_internal) %> -<% end %> - <% else %> - <%= l(:text_settings_repo_creation) %> -<% end %> +

<%= l(:text_settings_repo_is_internal) %> + <% end %>

@@ -36,7 +33,7 @@

<%= label_tag('repository_external_url', l(:label_repository_external_url)) %> - <%= text_field :repository, :external_url, :disabled => !@repository.is_external %> + <%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %>
<%= l(:setting_external_repository_url) %>

@@ -51,4 +48,9 @@ <%= submit_tag(l(:button_save), :onclick => remote_function(:url => { :controller => 'repositories', :action => 'edit', :id => @project }, :method => :get, :with => "Form.serialize(this.form)")) %> + +<% else %> + <%= l(:text_settings_repo_creation) %> <% end %> + +<% end %> diff -r 4d4acbad8728 -r defe55be97b9 config/locales/en.yml --- a/config/locales/en.yml Wed Mar 23 17:36:21 2011 +0000 +++ b/config/locales/en.yml Thu Mar 24 15:48:36 2011 +0000 @@ -307,7 +307,7 @@ field_visible: Visible setting_external_repository: "Select this if the project's main repository is hosted somewhere else" - setting_external_repository_url: "The URL of the existing external repository" + setting_external_repository_url: "The URL of the existing external repository. Must be publicly accessible without a password" label_repository_external_url: "External repository URL" setting_tipoftheday_text: Tip of the Day setting_notifications_text: Notifications @@ -929,11 +929,11 @@ text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?" text_zoom_in: Zoom in text_zoom_out: Zoom out - text_settings_repo_creation: The repository for a project should be set up automatically within a few minutes of the project being created.

You should not have to adjust any settings here, unless you wish to use this repository only to track a repository hosted elsewhere.

Please check again in ten minutes, and contact us if there is any problem. - text_settings_repo_explanation: Normally your project's primary repository will be the Mercurial repository hosted at this site.

However, if you already have your project hosted somewhere else, you can specify here your existing external repository's URL – then this site will track that repository in a read-only “mirror” copy. External Mercurial, git and Subversion repositories can be tracked. Note that you cannot switch to an external repository if you have already made any commits to the repository hosted here. + text_settings_repo_creation: Creating repository...

The source code repository for a project will be set up automatically within a few minutes of the project being created.

Please check again in five minutes, and contact us if there is any problem.

If you wish to use this project to track a repository that is already hosted somewhere else, please wait until the repository has been created here and then return to this settings page to configure it.

If you don't want a repository at all, go to the Modules tab and switch it off there. + text_settings_repo_explanation: External repositories

Normally your project's primary repository will be the Mercurial repository hosted at this site.

However, if you already have your project hosted somewhere else, you can specify your existing external repository's URL here – then this site will track that repository in a read-only “mirror” copy. External Mercurial, git and Subversion repositories can be tracked. Note that you cannot switch to an external repository if you have already made any commits to the repository hosted here. text_settings_repo_is_internal: Currently the repository hosted at this site is the primary repository for this project. text_settings_repo_is_external: Currently the repository hosted at this site is a read-only copy of an external repository. - text_settings_repo_need_help: Please contact us if you need help deciding how best to set this up.
We can also import complete revision history from other systems into a new primary repository for you if you wish. + text_settings_repo_need_help: Please contact us if you need help deciding how best to set this up.
We can also import complete revision history from other systems into a new primary repository for you if you wish. diff -r 4d4acbad8728 -r defe55be97b9 extra/soundsoftware/update-external-repo.sh --- a/extra/soundsoftware/update-external-repo.sh Wed Mar 23 17:36:21 2011 +0000 +++ b/extra/soundsoftware/update-external-repo.sh Thu Mar 24 15:48:36 2011 +0000 @@ -85,7 +85,8 @@ ;; *) hg --config extensions.convert= convert --datesort "$remote_repo" "$project_repo_mirror" || - git clone "$remote_repo" "$project_repo_mirror" + git clone "$remote_repo" "$project_repo_mirror" || + hg clone "$remote_repo" "$project_repo_mirror" ;; esac && success=true