Problem/Motivation

Flag 8.x currently resides on Github. This was originally done to avoid a flood of issues and commits while the module was being rewritten. Today, 8.x is fairly stable and all major functionality is in place. Keeping Flag 8.x on Github means a loss of visibility for the module, and is confusing for site builders who are already using the 8.x module on projects.

Proposed resolution

Migrate the Flag 8.x repository to D.O. This can either be done as a clean commit, or a migration importing all of the Github commit history.

Remaining tasks

  • Define the current roadblocks before the repository can be migrated.
  • Determine if a single "big bang" commit will be used, or a full import of commit history.
  • Update the Flag project page to reflect the migration of Flag 8.x to D.O.
  • Profit.

User interface changes

A new version tag will be available in the issue queue. The Flag project page will need to be updated.

API changes

N/A.

Comments

klausi’s picture

+1
I would keep the git history since it potentially contains valuable information why a change was made. And please use the 8.x-Y.x git branch name pattern (not master).

socketwench’s picture

Master was only used on github since it's the standard there. ^_^ We'd definitely use a versioned branch on D.O.

socketwench’s picture

A potential roadblock is that the Travis CI tests are currently failing. They work locally and via the CLI as long as "localhost" is not used as the hostname. I've tried to modify the travis configuration to use an alternate hostname, but it's still failing.

I'm not sure if we'd have the same problems on D.O. I seem to remember Travis is used to power Testbot, but the configuration may be controlled by D.O and not modifiable by contrib projects.

pfrenssen’s picture

+1 for keeping the git history, I wonder why throwing away the history is even considered as an option.

socketwench’s picture

The idea behind not including git history during the early rewrite process isn't as valuable as it is during the "production" phase this repo move would represent. The history also would reference github issue numbers and not D.O issues. It may be a moot point, however, since git logs may only be rarely looked at and the cleanliness gained isn't worth the information loss.

socketwench’s picture

Admittedly, I'd love to keep the commit history from github myself. Having only one commit shown for a year's worth of work just seems...unfair.

Mostly, I want input from the other Flag maintainers before I start pushing a branch to D.O.

joachim’s picture

> The idea behind not including git history during the early rewrite process isn't as valuable as it is during the "production" phase this repo move would represent. The history also would reference github issue numbers and not D.O issues. It may be a moot point, however, since git logs may only be rarely looked at and the cleanliness gained isn't worth the information loss.

Hmmmm we maybe should have moved back sooner, but for ages the code on github wasn't up to coding or documentation standards.

Which brings me to my first question: is the D8 branch conforming to coding and documentation standards? That's a requirement for getting code onto d.org. I don't really mind if tests don't pass or things are broken, but the code needs to be ready to be worked on by the community.

It would indeed be a bad thing to lose commit history. But I really would rather avoid the horrible tangle of merges that the github branch has -- that's really not useful to anyone who's going to need to work through the history to, say, understand why a change was made, or when something broke.

So I'm not sure how we proceed -- some judicious cherry-picking and squash merges, but that would require some time poring over the github branch.

socketwench’s picture

Which brings me to my first question: is the D8 branch conforming to coding and documentation standards?

For the most part. There are some minor issues being flagged by phpcs, and some missing docblocks have slipped through lately due to the hellish month I've been having (lost an Aunt, lost a car, got acquired). I can start poking at that tonight. Also the tests are broken on Travis CI, but not locally. That problem may only exist on Github rather than on D.O's test infrastructure.

So I'm not sure how we proceed -- some judicious cherry-picking and squash merges, but that would require some time poring over the github branch.

There are 800 commits on Github... Somehow I doubt anyone will want to spend the time to clean that up or cherry-pick. The longer we leave the project on Github, the messier that will get too. It might be easier to just accept the mess in the past, but move quickly so future commits will be cleaner.

joachim’s picture

> There are 800 commits on Github... Somehow I doubt anyone will want to spend the time to clean that up or cherry-pick

Yeah... I've just had a quick go with the most recent merge tree... it blew up at the first commit it tried to apply...

SHA:	454b4979f7dcb7f5144c299fab758684611e8b08
Author:	socketwench <tess.flynn@gmail.com>
Date:	Sat Dec 20 2014 05:28:05 GMT+0000 (GMT)
Subject:	Merge branch '106_enableDisableUpdate' into 103_enableDisable

How on earth did you manage to make a merge commit with two branches that were BOTH yours???

Please can you make sure once we're back on d.org to always pull before you make commits, and make sure not to create merge commits?

It is a real pain that it's this messy, and it's true that the commit messages aren't that useful as they refer to github pull requests. But people should be credited, so we should keep the history.

While on the subject of credit though, I see @socketwench has at least 3 different versions of author credit. Could you have a go at using http://schacon.github.io/git/git-filter-branch.html / https://help.github.com/articles/changing-author-info/ to tidy that up? That at least will either work quickly or not at all.

joachim’s picture

Hmm, that works, but I'm not sure what to change your credit to: the credit form on this issue says socketwench is --author="rashfeather " which is somewhat confusing.

socketwench’s picture

Yeah. I changed my username a long time ago, but the original one persists in git. I'm not sure if it's worth raising that with the infrastructure team or not.

joachim’s picture

> I'm not sure if it's worth raising that with the infrastructure team or not.

It definitely needs sorting out, as any of your patches that are committed by someone else but marked as authored by you will be wrong.

socketwench’s picture

It definitely needs sorting out, as any of your patches that are committed by someone else but marked as authored by you will be wrong.

It doesn't according to this issue... https://www.drupal.org/node/1490262#comment-6120108

joachim’s picture

In which case, it's not your git username that needs fixing, but the UI on d.org that creates the '--author' part of the suggested git commit command: it should use your d.org username, not your git username.

socketwench’s picture

You're actually in the repo in two different ways. Some of these differences are actually from the original D.O repo since I imported history from there.

Hmmm. The 8.x branch starts at commit 369 in the repo. Can we squash the previous commits?

socketwench’s picture

Alright. I've cleaned up some of the duplicate authors and pushed the changes.

pfrenssen’s picture

The 8.x branch starts at commit 369 in the repo. Can we squash the previous commits?

Everything before this is the original history of the module I presume? That comprises years of very valuable history, don't throw it away please!

In my daily work I very much rely on things like git log -S to find historical changes to particular strings. The context you can glean from looking at these commits is invaluable.

joachim’s picture

> In my daily work I very much rely on things like git log -S to find historical changes to particular strings. The context you can glean from looking at these commits is invaluable.

I agree completely!

> The 8.x branch starts at commit 369 in the repo. Can we squash the previous commits?

I'm not actually sure what's meant by this.

Presumably we're going to end up on d.org with an 8.x-3.x branch which forks off from 7.x-3.x at some point.

There's one bit of git history hacking I'd like to do before pushing 8.x-3.x to d.org, which is remove a merge commit from github's initial commit, which adds a LICENSE.txt file which should never be here.

(I wish we could do more history hacking, but I realize it's a doomed endeavour: whatever we do, a long section of our 8.x-3.x branch is going to have code that's not compliant with coding and docs standards, and whose commit messages refer to github issue numbers -- and hence are lacking in context. I don't remember if it was my suggestion to develop 8.x on github, but for the record, I don't think it was a good idea.)

socketwench’s picture

Everything before this is the original history of the module I presume? That comprises years of very valuable history, don't throw it away please!

Yeah, that occurred to me after I replied. It wouldn't really make much of a difference anyways.

Presumably we're going to end up on d.org with an 8.x-3.x branch which forks off from 7.x-3.x at some point.

I was actually thinking 8.x-4.x given that the module was rewritten, and there are some significant new features (Field Entry link type). It would just be easier to start with a new major version number.

There's one bit of git history hacking I'd like to do before pushing 8.x-3.x to d.org, which is remove a merge commit from github's initial commit, which adds a LICENSE.txt file which should never be here.

I can see about removing that commit. If nothing else, I can remove the file itself from the repo.

I don't remember if it was my suggestion to develop 8.x on github, but for the record, I don't think it was a good idea.

IIRC, I did start the code on D.O but you raised concerns about people using the 8.x branch prematurely and mucking up the issue queue. That was a valid point, but we rarely got any issues posted to the module on Github. We only recently broke 100, and most of them are task reminders to myself. The lack of visibility and commit consistency was the result.

If anything, we should have considered moving the module back to D.O much, much sooner. Perhaps the trigger point should have been when we were finally able to flag entities. That would have been feature-complete-enough to prove that the rewrite wasn't a dead end. That would have lessened the impact of the divergent git logs and leveraged the community rather than requiring a minor PR campaign on my part to raise awareness.

socketwench’s picture

License file removed.

We also have two READMEs. I'd like to do some rewriting and bring it closer to what I did for Flag Friend: http://cgit.drupalcode.org/flag_friend/commit/?id=8c97956ea1149c27ebfef3...

Once that's done, I'll delete the duplicate README from history. According to Berdir, README.md looks like the format going forward. I'll rewrite the content in the existing README.txt, then migrate it over to the *.md file.

socketwench’s picture

Turns out, you can't change your git username on D.O: https://www.drupal.org/node/2401715#comment-9483767

joachim’s picture

Status: Active » Fixed

Ok that's our new 8.x-4.x branch pushed to d.org! Hurrah!

Now this is back on d.org, please could we avoid making merge commits, and have commit messages that follow the standard form: https://www.drupal.org/node/52287?

joachim’s picture

Version: 7.x-3.x-dev » 8.x-4.x-dev
joachim’s picture

Issues still open on github should be moved over to this queue, I think.

socketwench’s picture

Yep. I'll start working on that and converting in-flight PRs to patch issues.

joachim’s picture

Cool!

Could you take take of updating the project page too please? I've just noticed that links through to github.

socketwench’s picture

Assigned: Unassigned » socketwench

On it.

socketwench’s picture

Assigned: socketwench » Unassigned

Done.

I also made the development snapshots visible on the main page.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.