Here's the problem I am trying to solve:

  1. Developer Alice is working locally. Alice makes some changes to a View. Alice exports her changes to a Feature, by running `drush features-update latest_news` ("latest_news" is the name of the feature). Alice pushes her changes to the development server.
  2. 2. Simultaneously, Bob is working locally. Bob has made some changes to a different View in the same Feature. Bob pulls Alice's changes down from dev.
  3. 3. Bob's changes are ready to be exported. First he runs `drush features-diff latest_news`, and he sees there's a problem: `latest_news` is overridden, but not all of the overrides are his.
  4. 4. If Bob runs `drush features-update latest_news` Alice's changes will be wiped out. If Bob runs `drush features-revert latest_news` then his own changes will be wiped out.

Question: what should Bob do?

The only thing I can think of is to have Bob export and commit before pulling, but I'm not crazy about that because it breaks his ability to fast-forward Alice's commit.

Comments

ropic’s picture

Same problem here

mpotter’s picture

Status: Active » Fixed

In the Drupal 8 version of Features, the features-revert command has a syntax to specify a single component to revert. Also, in the Features UI if you click the "Changes" next to the feature you can then check a single checkbox for the stuff you want to import so you can get Alice's changes without overwriting your own.

In general we have always recommended that you handle your features in a modular way so that you don't have multiple devs working on the same feature at the same time. Only the D8 version of Features has added stuff to make this easier.

In D7, you should be able to do the following:

1) Alice exports her feature changes and commits/pushes the code.
2) Bob makes his changes and exports his feature changes (drush fu...)
3) Now Bob pulls the code from Alice and merges her changes with his
4) Bob runs feature-revert to import the new code containing both his and Alice's changes
5) Bob can commit/push the merged code

So the problem is in your step #2 you are pulling/merging before Bob has a chance to export his changes. You need to export before you pull/merge.

Status: Fixed » Closed (fixed)

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