Strip all whitespace from right side of the VCS storage version string.
authorW. Trevor King <wking@drexel.edu>
Mon, 6 Sep 2010 01:22:37 +0000 (21:22 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 6 Sep 2010 01:22:37 +0000 (21:22 -0400)
The old method failed with Windows-style \r\n endlines, etc.

libbe/storage/vcs/base.py

index b545a4e1aac625c204ad19b2b28e151890cc8b4d..11ce754ace8163871a362bd0ab92f5b511e235be 100644 (file)
@@ -985,7 +985,7 @@ class VCS (libbe.storage.base.VersionedStorage):
             raise libbe.storage.InvalidStorageVersion(None)
         if revision == None: # don't require connection
             return libbe.util.encoding.get_file_contents(
-                path, decode=True).rstrip('\n')
+                path, decode=True).rstrip()
         relpath = self._u_rel_path(path)
         contents = self._vcs_get_file_contents(relpath, revision=revision)
         if type(contents) != types.UnicodeType: