Archive for the ‘Revision Control’ Category

Bzr over SMB/CIFS using SMBMOUNT

on Wednesday 16th September, 2009 Gabe speculated thusly…

Ensure that the remote uig and gid are set correctly!

smbmount //foo/bar /media/bar -o username=myusername, password=mypassword, dir_mode=0755, file_mode=0664, noperm, uid=501, gid=501

Posted in Bazaar, Development, Programming, Revision Control, Server

No Comments »

Using SSHFS with Bazaar (Bzr) or Git

on Thursday 4th June, 2009 Gabe speculated thusly…

I use SSHFS to mount remote drives locally. The remote computers don’t have Bzr installed, and it’s difficult to get them up to date enough to install the latest Bzr. Therefore, I execute Bzr on my local computer on the mounted filesystem. Using default mount options for SSHFS leads to errors in both Git and Bzr, this is because (I believe) SSHFS doesn’t directly support file renaming. It is possible to avoid these problems by using the -oworkaround=rename switch with the mount command.

As an example my mount command looks similar to this:
sshfs -oworkaround=rename user@computer1:/var/www /media/computer1

Posted in Bazaar, Git, Information, Linux, Operating System, Programming, Revision Control, Server

No Comments »

Git errors on Cygwin

on Tuesday 16th September, 2008 Gabe speculated thusly…

I’ve recently started experimenting with Git, previously being totally committed(!) to Bazaar. Git is difficult in comparison but I intend to stick with it. I have been using Git under Cygwin on Windows XP, it seemed to work fairly well except that often when I added a large batch of source code files they wouldn’t get committed.

Eventually I found out it is because Git is choking on one the line endings in some files. When trying a commit of these files I would see a whole load of errors fly by such as ‘trailing whitespace’ and “you have some suspicious patch lines”. Googling around I found three answers, but I could only fully understand two of them.

Firstly, the approach I took, was to run the command chmod a-x .git/hooks/pre-commit in the git repository.

The other approach, which I found here says to edit the pre-commit file above and comment out the lines:
if (/\s$/) {
bad_line("trailing whitespace", $_);
}

Which would mean changing it to:
#if (/\s$/) {
#bad_line("trailing whitespace", $_);
#}

Hope that can help someone!

Posted in Development, Git, Operating System, Revision Control, Windows, XP

1 Comment »

Upgrading a Bazaar DRCS repository format

on Tuesday 6th May, 2008 Gabe speculated thusly…

Bazaar has come on a long way over the last six months with the latest release being somewhere around the 1.4 mark. Today, with the upgrade to Hardy which brought with it version 1.3 I started noticing incompatibilities between my local version (1.3) and the server version (0.9). Further investigation revealed some major changes across those revisions, including a completely revised storage format for branches or repositories. So, once you get Bazaar up to the latest version, you need to go about upgrading the storage formats of you branches like so:

To find out what storage format you are currently using, just go the the branch’s folder and type in:
bzr info -v | grep 'repository'

That should give you an output similar to this (an example of an obsolete format):
repository: Knit repository format 1

If it’s anything other than “Packs containing knits” then you’re still using the old storage format. How to upgrade is documented in the bzr documentation, including preparation and upgrading, but the gist of it is:

Make sure you backup the whole directory first, then run:
bzr upgrade

(if you’re using shared repositories, make sure you specify where the root repository is with bzr upgrade root-repo-dir)

Once that’s done, you should reconcile:

bzr reconcile

If the operation doesn’t report any problems, run a quick bzr info to make sure the repository has been updated correctly and you should be able to delete the backup of the old storage format dir which is named .bzr.backup/. Only do that after you’re sure everything is OK!

Posted in Bazaar, Revision Control

No Comments »