6

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.

Andy
  • 7,646
  • 8
  • 46
  • 69

5 Answers5

6

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.

Jan Hudec
  • 73,652
  • 13
  • 125
  • 172
5

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
3

Personnally, I use 2 methods :

  1. the communication one : I tell to other developpers what manipulations are to do to be up-to-date (correct, but sometimes, we miss some details ....)
  2. the scripted one : I made an update script that is used to manage the update of all the parts of my project (different directories, different repositories, different version control...), in this script I put every operation needed to maintain a correct repository (I use it for svn and git repositories).
Cédric Julien
  • 78,516
  • 15
  • 127
  • 132
2

Just an idea, but you could have trigger based on a pattern in the commit message to send a mail with the commit comment to developers

doable with hooks

Pierre Lacave
  • 2,608
  • 2
  • 19
  • 28
1

For files where each developer needs to make local changes (like database connection strings, etc.) I like to keep a template as a tracked file, something like localconfig.template. In your build/launch scripts you could have logic like this:

if not exists localconfig then
  copy localconfig.template to localconfig
else
  if localconfig.template is newer than localconfig
    print a big ugly warning about maybe needing to update
Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169