bazaar - Preventing bzr-update changes to user-specific .cfg file -


i have project, hosted on launchpad, contains user-specific configuration file.

once project checked out, .cfg file should downloaded. however, further updates (via "bzr update") ideally not alter .cfg file, user have made own edits it. these edits overridden / merged should (with potential conflicts) push update using code own .cfg file - don't want happen!

what's best practice avoid this? can't "bzr ignore", future users checking out via bzr not have .cfg file.

i could, of course, replace .cfg file "stock" 1 each time commit, seems bit clunky.

or equivalently clunky, supply .cfg file separately.

what i'm looking "single-shot" download, never update subsequently.

any advice?

this tricky problem, because version control systems in general not engineered have fine-grained commit strategies needed approach. if operating in controlled environment, use plugins or hooks exclude files commits etc., doesn't seem option here. i'll add bzr ignore won't you, either, because prevents files being added; doesn't prevent commits or checkout of files.

what can do generate config file during build/setup/installation if doesn't exist. like:

#!/bin/sh if [ ! -e configuration.cfg ];   cp etc/configuration.cfg.in configuration.cfg fi 

here, you'd check in etc/configuration.cfg.in , run above script @ build/setup/installation (this automated post_change_branch_tip hook in controlled environment). you'd put original in different directory there's less of risk of getting edited accident.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -