#2886 Forking should have a useful label.

v1.0.0
closed
nobody
SCM
Cory Johns
2015-08-20
2011-09-28
No

Right now the new fork tool always has the label "Code". Preserving the original label might help, but in a lot of cases it'll be "Code" anyway and that won't make sense if forking into a user project. We probably should put a text box for the label on the fork form, and default to including to "$Project - Code" or something like that

Related

Tickets: #2926

Discussion

  • Dave Brondsema

    Dave Brondsema - 2011-09-28
    • summary: Forking should preserve the tool's label --> Forking should have a useful label.
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,1 +1,1 @@
    -Right now the new fork tool always has the label "Code"
    +Right now the new fork tool always has the label "Code".  Preserving the original label might help, but in a lot of cases it'll be "Code" anyway and that won't make sense if forking into a user project.  We probably should put a text box for the label on the fork form, and default to including to "$Project - Code" or something like that
    
     
  • Dave Brondsema

    Dave Brondsema - 2012-04-26
    • labels: --> 42cc
     
  • Anonymous - 2012-04-27

    Originally by: *anonymous

    Created #42: [2886] Add an ability to enter custom label for the new fork tool (1cp), in which we're going to:
    1. Add a text-box on the form
    2. Show "$Project - Code" in the text box by default
    3. Use this label as a mount label

     
  • Yaroslav Luzin - 2012-04-27

    Mount name should not be changed, I guess it's "code" by default. It's only about mount label, right?

     
  • Dave Brondsema

    Dave Brondsema - 2012-04-27

    If you fork multiple projects into your user-project, then "code" isn't a very useful mount name. I think the original project name would work well for most cases.

     
  • Anonymous - 2012-05-03

    Originally by: *anonymous

    Hi Dave!

    I'm Stilgar from 42cc (registration is offline currently, I'll register later). I have a little question regarding this thread in comments, can you please clarify it for me?

    Preface: now fork page has a new field "Mount label" with default value "$project_name - Code" and it's value is used to set mount label of cloned repository, used then in project menu and as header on repository page.

    And here's my question: "mount name", mentioned in previous posts, is a different thing then "mount label", but I'm not sure what "mount name" is. Is it the same as "mount point"?

    If yes:

    Now mount point is being set to value of "Repository Name" field from fork page, should it be changed? To the same value as mount label, with proper conversion (whitespace, etc.) or to exactly original project name?

    If no:

    What is "mount name"?

    Thank you in advance!

     
  • Anonymous - 2012-05-03

    Originally by: stilgar-dev

    Hi Dave!

    I work in 42cc on Allura. I have a little question regarding this thread in comments, can you please clarify it for me?

    Preface: now fork page has a new field "Mount label" with default value "$project_name - Code" and it's value is used to set mount label of cloned repository, used then in project menu and as header on repository page.

    And here's my question: "mount name", mentioned in previous posts, is a different thing then "mount label", but I'm not sure what "mount name" is. Is it the same as "mount point"?

    If yes:

    Now mount point is being set to value of "Repository Name" field from fork page, should it be changed? To the same value as mount label, with proper conversion (whitespace, etc.) or to exactly original project name?

    If no:

    What is "mount name"?

    Thank you in advance!

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-03

    Yes, I should have said "mount point". That's what I meant by mount name. I think the mount point should be the original project's short name. For example, if I made my own fork of Allura, it would have a mount point of "allura" and the URL of the fork would be /u/brondsem/allura

     
  • Yaroslav Luzin - 2012-05-10

    Closed #42, all changes are in 42cc_2886

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-14
    • status: open --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-15
    • qa: Cory Johns
     
  • Cory Johns - 2012-05-16

    Some minor touch-ups, and merged.

     
  • Cory Johns - 2012-05-16
    • status: code-review --> closed
    • size: --> 0.5
    • milestone: forge-backlog --> forge-may-18
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-21
    • labels: --> 42cc
    • status: closed --> open
    • milestone: forge-may-18 --> forge-backlog
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-21

    I would like the label to be used in the default fork name. For example, https://sourceforge.net/p/turbogears2/tg2docs/fork/ should show "TurboGears 2 - Code" instead of "TurboGears 2 - Git"

     
  • Yaroslav Luzin - 2012-05-22

    Dave, that change was made by Cory. Should we change it back?

    # git blame -L 74,74 Allura/allura/controllers/repository.py
    8abe8ac6 (Cory Johns 2012-05-16 20:02:29 +0000 74)         mount_label
    = mount_label or '%s - %s' % (c.project.name, from_repo.tool_name)
    
    #git diff 9155c0c4bf2e536a6b79cd844cdb58f3f5a89193
    8abe8ac669f8af706807175f1d5ceb52d93e281f
    -        mount_label = mount_label or '%s - Code' % c.project.name
    +        mount_label = mount_label or '%s - %s' % (c.project.name,
     from_repo.tool_name)
    
     
  • Cory Johns - 2012-05-22

    If it's to use the label, shouldn't it be "TurboGears 2 - Docs"? I think me using the tool_name was wrong, but it definitely shouldn't have been hard-coded.

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-22

    Ok, I see what happened. Starting with the original ticket specifying the hardcoded value "Code" :) I've changed it again locally and it'll be in the public dev branch shortly.

    • status: open --> closed
    • milestone: forge-backlog --> forge-jun-01
     

Log in to post a comment.