Goal: Do not require pootle to be run from the root directory. Useful to
refresh the stats

Thanks to Roland Mas.

Should be forwarded upstream.

Index: trunk/translate/storage/versioncontrol/bzr.py
===================================================================
--- trunk.orig/translate/storage/versioncontrol/bzr.py
+++ trunk/translate/storage/versioncontrol/bzr.py
@@ -56,17 +56,17 @@
     def update(self, revision=None):
         """Does a clean update of the given path"""
         # bzr revert
-        command = ["bzr", "revert", self.location_abs]
-        exitcode, output_revert, error = run_command(command)
+        command = ["bzr", "revert", self.location_rel]
+        exitcode, output_revert, error = run_command(command, self.root_dir)
         if exitcode != 0:
             raise IOError("[BZR] revert of '%s' failed: %s" \
-                    % (self.location_abs, error))
+                    % (self.location_rel, error))
         # bzr pull
         command = ["bzr", "pull"]
-        exitcode, output_pull, error = run_command(command)
+        exitcode, output_pull, error = run_command(command, self.root_dir)
         if exitcode != 0:
             raise IOError("[BZR] pull of '%s' failed: %s" \
-                    % (self.location_abs, error))
+                    % (self.root_dir, error))
         return output_revert + output_pull
 
     def commit(self, message=None, author=None):
@@ -79,25 +79,25 @@
         if author and (get_version() >= (0, 91)):
             command.extend(["--author", author])
         # the filename is the last argument
-        command.append(self.location_abs)
-        exitcode, output_commit, error = run_command(command)
+        command.append(self.location_rel)
+        exitcode, output_commit, error = run_command(command, self.root_dir)
         if exitcode != 0:
             raise IOError("[BZR] commit of '%s' failed: %s" \
-                    % (self.location_abs, error))
+                    % (self.location_rel, error))
         # bzr push
         command = ["bzr", "push"]
-        exitcode, output_push, error = run_command(command)
+        exitcode, output_push, error = run_command(command, self.root_dir)
         if exitcode != 0:
             raise IOError("[BZR] push of '%s' failed: %s" \
-                    % (self.location_abs, error))
+                    % (self.root_dir, error))
         return output_commit + output_push
 
     def getcleanfile(self, revision=None):
         """Get a clean version of a file from the bzr repository"""
         # bzr cat
-        command = ["bzr", "cat", self.location_abs]
-        exitcode, output, error = run_command(command)
+        command = ["bzr", "cat", self.location_rel]
+        exitcode, output, error = run_command(command, self.root_dir)
         if exitcode != 0:
             raise IOError("[BZR] cat failed for '%s': %s" \
-                    % (self.location_abs, error))
+                    % (self.location_rel, error))
         return output
