Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

634 fork and unmirror repository #1030

Merged
merged 21 commits into from
Feb 1, 2015
Merged

Conversation

eugenk
Copy link
Member

@eugenk eugenk commented Sep 4, 2014

Shall fix both issues of #634 (and #351): Allowing to fork a repository and converting a mirror to a local repository.

This also improves the javascript in the new repository view as it now updates everytime the source address is changed (key press, click, cut, paste) and not only when its input field loses focus.

end

# executes a pull/clone job
def remote_send(method)
def remote_send(method, remote_type=nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/MethodLength: Method has too many lines. [17/10]
Style/SpaceAroundEqualsInParameterDefault: Surrounding space missing in default value assignment.

@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch from 9d5f197 to 8a41c94 Compare September 4, 2014 14:20
@eugenk eugenk added in review and removed in review labels Sep 4, 2014

before_validation ->{ detect_source_type }
after_create ->{ async_remote :clone }, if: :mirror?
before_validation ->{ detect_source_type if new_record? }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/SpaceBeforeBlockBraces: Space missing to the left of {.

@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch from d01d2c2 to 583aae2 Compare September 4, 2014 15:12

before_validation ->{ detect_source_type }
after_create ->{ async_remote :clone }, if: :mirror?
before_validation ->() do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Lambda: Use the lambda method for multi-line lambdas.

@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch 3 times, most recently from 2fcf7ca to 2324b05 Compare October 30, 2014 17:07
@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch from 2324b05 to 4dc9d14 Compare November 29, 2014 11:36
@@ -12,7 +12,8 @@ def create
end

def update
params[:repository].except!(:source_address, :source_type, :name)
resource.convert_to_local! if params[:un_mirror]
params[:repository].except!(:source_address, :source_type, :remote_type, :name)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [83/80]

@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch from 54a4b3d to 7ca499c Compare December 4, 2014 11:01
let(:repository) { create :repository,
source_address: 'http://some_source_address.example.com',
source_type: 'git',
remote_type: 'mirror' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the factory

@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch from 30dcf0f to b046e9a Compare December 6, 2014 18:06
@SGraef
Copy link
Member

SGraef commented Dec 10, 2014

👍

@SGraef
Copy link
Member

SGraef commented Dec 10, 2014

Please rebase Staging in it to make it mergeable before closing this pull request

@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch from bf6bd9a to 5db1056 Compare December 15, 2014 14:37
@eugenk
Copy link
Member Author

eugenk commented Dec 15, 2014

Done, but there were merge conflicts in the spec/lib/repository/import/{git,svn}_spec.rb and the en.yml. Please take a quick look at the latter again.

@eugenk eugenk force-pushed the 634-fork_and_unmirror_repository branch from 5db1056 to b3d49d7 Compare January 28, 2015 13:53
@ebolloff
Copy link
Member

ebolloff commented Feb 1, 2015

👍

eugenk added a commit that referenced this pull request Feb 1, 2015
@eugenk eugenk merged commit 2178869 into staging Feb 1, 2015
@eugenk eugenk deleted the 634-fork_and_unmirror_repository branch February 1, 2015 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants