Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !8315

Closed
Created 10 years ago by Administrator@rootOwner
  • Report abuse
Report abuse

cleanup.rake typo fix: this -> these

  • Overview 11
  • Commits 1
  • Changes 1

Created by: bbodenmiller

Minor typo fix in cleanup.rake.

Loading
Loading

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: TeatroIO

    I've prepared a stage. Click to open.

    By Administrator on 2014-11-15T11:17:41 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: bbodenmiller

    @cirosantilli unrelated to this PR but the cleanup.rake code seems to be adding an extra slash like follows. Any ideas? Asking because I saw you making some other file operation changes recently.

    image

    By Administrator on 2014-11-15T11:19:40 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 558d79e6 10 years ago
    lib/tasks/gitlab/cleanup.rake
    39 39 end
    40 40
    41 41 unless remove_flag
    42 puts "To cleanup this directories run this command with REMOVE=true".yellow
    42 puts "To cleanup these directories run this command with REMOVE=true".yellow
    43 43 end
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: cirosantilli

      I'd also DRY this block with the other one.

      By Administrator on 2014-11-15T11:23:16 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 558d79e6 10 years ago
    lib/tasks/gitlab/cleanup.rake
    39 39 end
    40 40
    41 41 unless remove_flag
    42 puts "To cleanup this directories run this command with REMOVE=true".yellow
    42 puts "To cleanup these directories run this command with REMOVE=true".yellow
    43 43 end
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: bbodenmiller

      @cirosantilli Not sure what that means... not that familiar with Ruby.

      By Administrator on 2014-11-15T11:30:24 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: bbodenmiller

    @cirosantilli Also unrelated looks like cleanup:repos is incorrectly matching user namespace john.mangit as a global directory to remove. Does dir =~ /.git$/ need to be changed to dir =~ /\.git$/ or similar?

    By Administrator on 2014-11-15T11:30:52 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: cirosantilli

    Maybe the double slash is at all_dirs = Dir.glob(git_base_path + '/*'). A quick Dir.glob('./' + '/*') on my IRB gives double slash paths, and repos_path does end in /. Whenever I see explicit / and + to join paths it hurts my eyes. + '*' should work (not sure). Better use File or Dir to do this instead of Glob since glob is insane.

    By Administrator on 2014-11-15T11:31:51 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 558d79e6 10 years ago
    lib/tasks/gitlab/cleanup.rake
    39 39 end
    40 40
    41 41 unless remove_flag
    42 puts "To cleanup this directories run this command with REMOVE=true".yellow
    42 puts "To cleanup these directories run this command with REMOVE=true".yellow
    43 43 end
    • Administrator
      Administrator @root · 10 years ago
      Owner

      Created by: cirosantilli

      IIUC, you fixed this bug twice: here and on the other line which are the same.

      Instead of fixing bugs twice, it is better to factor things out first.

      Here I'd do both on the same PR. And this unless block is the same as the other one, so I'd create a new method for it.

      By Administrator on 2014-11-15T11:32:39 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: cirosantilli

    I don't know what that dir =~ /.git$/ is used for. IIUC, repos_path is /repositories, so all_dirs are only the namespaces, which cannot end in .git. Likely what he meant is correct, to allow people to put bare repos at /repositories/repo.git, but I don't know why anyone would do that, and I don't think gitlab does anything special with those. I'd just remove that check and see what jacob says. But if people did to that in the past, it might break them. In that case, there should be a comment on the source explaining it is there for historical reasons.

    By Administrator on 2014-11-15T11:39:30 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: bbodenmiller

    @cirosantilli previously GitLab used to have global projects so these are just cleanup tasks since old GitLab installs didn't necessary delete folders correctly after moving them. The issue I'm having is it appears it actually only looks to see if the folder name ends in git rather than checking if it ends in .git.

    By Administrator on 2014-11-15T12:10:22 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: cirosantilli

    Ah, makes sense. Even better, just use ends_with? like in: https://github.com/gitlabhq/gitlabhq/pull/8096

    By Administrator on 2014-11-15T12:26:35 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: jvanbaarsen

    This merge request has been closed because a request for more information has not been reacted to for more than 2 weeks. If you respond and conform to the merge request guidelines in our contributing guidelines we will reopen this merge request.

    By Administrator on 2015-01-18T18:09:55 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/bbodenmiller/rake-cleanup-typo

    0 pending comments

Menu

Projects Groups Snippets
Help