Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File history: in the source or let scm handle it?

I'm learning mercurial as my solo scm software. With other management software, you can put change comments into the file header through tags. With hg you comment the change set, and that doesn't get into the source. I'm more used to central control like VSS.

Why should I put the file history into the header of the source file? Should I let mercurial manage the history with my changeset comments?

like image 588
MKaras Avatar asked May 30 '09 14:05

MKaras


2 Answers

Let the source control system handle it.

If you put change details in the header it will soon become unwieldy and overwhelm the actual code.

Additionally if the scm has the concept of changelists (where many files are grouped into a single change) then you'll be able to write the comment so that it applies to the whole change and not just the edits in the one file (if that makes sense), giving you a clearer picture of why the edit was required.

like image 195
ChrisF Avatar answered Oct 07 '22 00:10

ChrisF


Yes; let the source control system handle your changeset comments. The rationale for this is that it makes considerably more sense when you're viewing the change log later, trying to work out what's going on between two versions of a file - the source control system can present the change comment to try and enlighten the situation.

like image 39
Rob Avatar answered Oct 07 '22 00:10

Rob