2

I need to keep track of different software installation, ease the upgrade of the files.

I'm planning to use a SCM to keep track of the modification and be able to roll-back rapidly if needed, or to ease the migration to a new machine.

Initially I tried to use Mercurial (hg) but I discovered that it does modify the modification date of the files and this is something unacceptable. Also I am not willing to use third-party plugins to overcome this limiation.

Still, I'm open to alternatives, does git or svn supports this without additional extensions?

Also, It would be great if I could put my customization in a patch queue or something similar so I can easy the upgrade of the installation to a new version.

sorin
  • 161,544
  • 178
  • 535
  • 806
  • Isn't that kinda what RCS was made for? – cHao Mar 20 '12 at 16:18
  • Now really, are you joking? RCS works on single files, which is far from what I am looking for. – sorin Mar 20 '12 at 16:21
  • http://stackoverflow.com/questions/1964470/whats-the-equivalent-of-use-commit-times-for-git can give you a context on that "timestamp issue" with DVCS like Git or Mercurial. – VonC Mar 20 '12 at 16:49
  • Yes, I was already aware about the answer with WRONG/STUPID/INFEASIBLE inside:) – sorin Mar 20 '12 at 17:04

3 Answers3

2

Subversion can use the commit-time instead of modification-time if you configure the Subversion client configuration file. (In Unix systems, it's under $HOME/.subversion/config).

I don't believe there's an equivalent one in Git. This was discussed before in Stackoverflow. The big complaint is that this would break Make which is true, but most version control systems do give you that option.

If this is for your company and not for personal use, you might want to look at Perforce. Perforce is a proprietary tool which costs money. There are exceptions: Small projects (no more than two users) and open source projects can use the tool for free.

The big advantage of Perforce is that it allows you to overlay directory structures. For example, you might have a default structure for your server, but each server modifies that structure a bit. You could keep the default one in one directory, and the custom changes for each separate server in another directory. When you do your checkout, you create a view that will combine the two. It's a bit hard to explain, but I found it great for tracking multiple server configurations.

The downsides of Perforce (besides the cost) is that it's more complex than Subversion. In Subversion, you can simply checkout a directory. In Perforce, you create a view of what you want to checkout, then check it out. That means learning the view configuration language. Perforce also has fewer plugins into third party tools than Subversion because it's not as popular. However, it might be good in your situation.

Community
  • 1
  • 1
David W.
  • 105,218
  • 39
  • 216
  • 337
0

Modification time: current checkout time as modification date is used because most compilers including gcc will recompile modified files based on modification time later than modification time of object file. This allows only modified files to be recompiled in order to save compilation time.

linquize
  • 19,828
  • 10
  • 59
  • 83
0

If you want version configuration (data), not monitor data for changes, you can think around etckeeper

Read also Track changes to /etc (configuration files) with etckeeper and Managing Configuration Changes with Git

PS - custom configurations on top of vanilla still want Mercurial with MQ

PS2 - you'll have timestsamp issue anyway in all cases

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110