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

Proposal for revised branch naming #53

Closed
dancysoft opened this issue Oct 13, 2023 · 4 comments · Fixed by #54
Closed

Proposal for revised branch naming #53

dancysoft opened this issue Oct 13, 2023 · 4 comments · Fixed by #54

Comments

@dancysoft
Copy link
Collaborator

Right now gerritlab pushes commits to branches named after the local branch (or a name supplied on the command line). I suggest a new scheme for naming branches:

<final-target-branch-name>-<fullchangeid>

final-target-branch-name comes from target_branch in .gitreview, unless an override is supplied on the command line.

Advantages:

@dancysoft
Copy link
Collaborator Author

@yaoyuannnn @thcipriani What do you think?

@yaoyuannnn
Copy link
Owner

This is a nice idea!

dancysoft pushed a commit that referenced this issue Oct 17, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 17, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 17, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 17, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 17, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
@kostajh
Copy link
Contributor

kostajh commented Oct 17, 2023

Right now gerritlab pushes commits to branches named after the local branch (or a name supplied on the command line). I suggest a new scheme for naming branches:

<final-target-branch-name>-<fullchangeid>

final-target-branch-name comes from target_branch in .gitreview, unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch name.  This means you can rename your local branch without worrying about a new set of MRs being created.

* Using the full Change-Id deals with [Increase the number of characters of the Change-Id used to generate the source branch name #39](https://github.com/yaoyuannnn/gerritlab/issues/39)

I think this would also address my concerns in #49 (comment).

With your PR, does it mean that one could use git cherry-pick to create a stack of MRs from two unrelated MRs?

@dancysoft
Copy link
Collaborator Author

I think this would also address my concerns in #49 (comment).

Agreed

With your PR, does it mean that one could use git cherry-pick to create a stack of MRs from two unrelated MRs?

If you're asking if this allows having a cherry-pick of a given commit (with the same Change-Id) for two different target branches, the answer is yes. If you're asking something else, I'll need you to flesh out the scenario a bit more.

dancysoft pushed a commit that referenced this issue Oct 19, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 23, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercised merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 23, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercised merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 23, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercised merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 23, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercise merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 23, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercise merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 23, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercise merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
dancysoft pushed a commit that referenced this issue Oct 24, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercise merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
thcipriani pushed a commit that referenced this issue Oct 25, 2023
Previously gerritlab pushed commits to branches named after the local
branch (or a name supplied on the command line).  Now MR branches are
named <final-target-branch-name>-<fullchangeid>.
final-target-branch-name comes from target_branch in .gitreview,
unless an override is supplied on the command line.

Advantages:

* The remote branch names never depend on the developer's local branch
  name. This means you can rename your local branch without worrying
  about a new set of MRs being created.

* Using the full Change-Id deals with #39

Other changes:

* Removed unused MergeRequest._local_branch attribute.

* Added tests to exercise merge_merge_requests

Closes: #53, #39
Change-Id: I732a738272927ef5af6ff00b0b21a033b0fe41b4
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 a pull request may close this issue.

3 participants