Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When a commit to revision control requires a developer to change their own config

What's the best method to notify other developers when a change committed into revision control requires some specific additional action by the developer getting the update e.g. modify a local config file not in version control?

I'm currently writing it in the commit message, but it seems like this could easily be missed. Do any revision control systems provide a better way of doing this?

How do other people do this, or should there never be any necessary changes that are outside of revision control?

I'm using mercurial but answers from those using other forms of revision control would be useful too.

like image 865
Andy Avatar asked Aug 22 '11 13:08

Andy


2 Answers

There should rarely be changes necessary that are outside of revision control. For the rare cases where they are, use the regular communication channel the developers have (like mailing list or IRC channel or something similar). Every multi-developer project needs such thing anyway.

like image 100
Jan Hudec Avatar answered Sep 20 '22 22:09

Jan Hudec


With git, what you could do (even if it isn't really there for that scenario) is to use a filter driver, provided your commit includes changes for a file with a recognizable content (the filter doesn't have a name or path of the file).

enter image description here

A filter driver is:

  • declared in a .gitattributes files (meaning, contrary to hooks or triggers, you can easily distribute it)
  • attached to a smudge and a clear script (also versioned, the smudge one being triggered on commit.
  • you can, on commit, triggers whatever automatic action you need.

Again, the point is to not use hooks (which you can't easily replicated amongst repos), and use a mechanism which can be versioned and cloned around.

like image 26
VonC Avatar answered Sep 20 '22 22:09

VonC