Couple of general version control questions...

John Arbash Meinel john at arbash-meinel.com
Tue Jun 2 15:43:03 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard B. wrote:
>>> I've also read that it's good practice to version compiler, lib, and
>>> include files, but these are stored on a different drive to my
>>> project/source files, so how can I commit these files with my project
>>> files ?
> 
>> Are these part of the project or do you mean other people's stuff?
> 
> These are Microsoft's (ie. the Visual C++ compiler).
> 

Just to expand a bit on what Russel said.

The 'ignore' list for bzr is only a hint as to what to do about an
'unknown' file. So if a file matches, then 'bzr status' doesn't show it
as unversioned, and 'bzr add' doesn't default to adding it.

However, if you do "bzr add my_otherwise_ignored_file" bzr will always
honor your explicit request to version the file. So what you could do is:

bzr branch trunk release-0.x.y
cd release-0.x.y
$make
bzr add Release/foo.exe Release/foo.pdb Release/bar.dll \
        --file-ids-from=../release-0.w.v  # [1]
bzr commit -m "Adding the Release products for release 0.x.y"
bzr tag release-0.x.y

At this point, you probably *don't* want to merge this release back into
trunk.

Now, maintaining the list of files to add is a bit of a pain. Since you
are on Windows, I would probably save that information into a
"make-release.bat" script, that would do something like:

@echo off
bzr add Release/foo.pdb Release/bar.dll ...
bzr commit -m "Adding the Release products for release $1"
bzr tag release-$1


And then you would use it as:

bzr branch trunk release-0.x.y
cd release-0.x.y
make-release.bat 0.x.y

If you want to get fancy, you could get the release name from the branch
nick, which would be "bzr nick". But I don't know .bat scripting well
enough to figure out how to set a variable from the return value of a
command. (In shell, I would do "release_version=`bzr nick`", but I don't
know how to translate that to .bat)

John
=:->



[1] The --file-ids-from is a hint to bzr to match up the files in this
release with the same files from a different release. It doesn't matter
a lot, but it does make it a bit easier for us to give interesting
results from 'bzr log' and probably better delta compression.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkolOncACgkQJdeBCYSNAAOSqQCgyD9bETTScXMOrglMjHD3Mv2R
cSgAoMashQjjYEjiFeboQMNCYJbNt7CQ
=vp3G
-----END PGP SIGNATURE-----



More information about the bazaar mailing list