aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs
Commit message (Collapse)AuthorAgeFilesLines
* Fix my busted 1512c0e2a64e patch to libbe/util/encoding.py.W. Trevor King2011-11-131-2/+2
| | | | | | | | | | | | | | Some temporary changes to encoding.py seem to have been added to commit 1512c0e2a64e19c8d4e5697257a4df5ddd8bc727 Author: W. Trevor King <wking@drexel.edu> Date: Tue Nov 8 07:14:43 2011 -0500 by accident. The initial change came from discussions with Niall Douglas, during which I realized that "filesystem encoding" ususally means the encoding for the *path*, not the *contents*. To avoid further confusion I'd renamed `get_filesystem_encoding` to the less ambiguous `get_text_file_encoding`. This commit should complete the transition.
* Ran update_copyright.py.W. Trevor King2011-11-092-0/+2
|
* Oops, that forgot the equals part of Mercurial 1.9 or greater.W. Trevor King2011-09-071-1/+1
|
* Adjust Mercurial execution so it works with version 1.9 and earlier.W. Trevor King2011-09-071-3/+9
| | | | | | | This makes the changes for 1.9 brought in by bb645f8e489b9f50cd0aec7237ec9adb721797a8 optional. If the Mercurial version is 1.9 or greater, the new code is used. Otherwise, the old code is used.
* Move Bzr.version_cmp to VCS.version_cmp.W. Trevor King2011-09-072-92/+91
| | | | The version comparison code will be useful for all VCSs.
* Merge remote branch 'pschumms/master'W. Trevor King2011-09-071-6/+4
|\
| * Fixed problem with Hg support under version 1.9 ↵Phil Schumm2011-07-281-6/+4
| | | | | | | | (mercurial.dispatch.dispatch() now takes a single request object with option for capturing output stream)
* | Remove redundant re import from previous bzr version_cmp patch.W. Trevor King2011-09-071-1/+0
| |
* | Enhance Bzr.version_cmp to handle non-numeric versionsMichel Alexandre Salim2011-09-071-9/+50
|/ | | | | | | | | | | | bzr uses non-numeric tags to indicate prereleases; previously, this triggers an exception in be's Bzr module as version comparison is only supported between version strings that only contain numbers and dots. This patch extends version_cmp to support a single non-numeric pre-release string of arbitrary length (e.g. 'a', 'b', 'pre', 'rc'), and extends the docstring tests to cover this extension. Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
* Run update_copyright.py.W. Trevor King2011-05-257-3/+10
|
* Use open() instead of file() in CachedPathID doctests (2to3 compatability).W. Trevor King2011-05-121-3/+3
|
* Remove form feeds (for compatibility with 2to3).W. Trevor King2011-05-127-7/+7
|
* Add libbe.ui.util.user.get_fallback_fullname() and use pwd when possible.W. Trevor King2011-04-142-2/+2
| | | | This patch is based on Julien Muchembled's pwd suggestions.
* Work around bzr filelocking issue on Windows.W. Trevor King2011-02-242-2/+7
|
* Local imports and better missing-client detection in client-based VCS classes.W. Trevor King2011-02-224-20/+33
|
* Correct version for recent bzrlib fix.W. Trevor King2011-02-221-9/+9
| | | | | | | | | | | | | | | Rather than guessing from the output of `bzr tags`, I actually looked in the realease notes and tracked the removal of run_direct() to 2.2b2, which is confirmed by the r5146 patch itself: bzr.dev $ ./bzr log -p -n 0 -r 5146 | grep -1 deprec + + @deprecated_method(deprecated_in((2, 2, 0))) def run_direct(self, *args, **kwargs): -- + + @deprecated_method(deprecated_in((2, 2, 0))) def run_direct(self, *args, **kwargs):
* Don't call cmd.cleanup_now() for recent Bazaar versions.W. Trevor King2011-02-221-9/+18
| | | | | | | | | | | | | | | | | | | Bug reported by Michael Chaffin: > C:\XXX\ZZZ>be init > Traceback (most recent call last): > ... > AttributeError: 'cmd_root' object has no attribute '_operation' Due to changes in bzrlib: revno: 5146 [merge] committer: Canonical.com Patch Queue Manager <pqm@pqm.ubuntu.com> branch nick: +trunk timestamp: Mon 2010-04-12 04:09:46 +0100 So for versions of bzr since then, we don't have to worry about calling cleanup_now() anymore.
* Merge commit 'refs/merge-requests/3' of git://gitorious.org/be/beChris Ball2011-01-081-1/+1
|\
| * Refrain from committing outstanding changes.Robert Lehmann2010-11-211-1/+1
| | | | | | | | This makes be-commit act more like git-commit.
* | Bumped to version 1.0.01.0.0Chris Ball2011-01-088-8/+9
| |
* | Make libbe.storage.vcs.darcs.Darcs._vcs_listdir() more robust.W. Trevor King2010-12-061-2/+3
| | | | | | | | | | | | | | | | | | | | The old version returned [] (for Darcs 2.5) on darcs show files --no-files --patch 'Initial commit' .be (called in `be diff` for `test_usage.sh darcs`), because darcs returned the paths prefixed with './' (e.g. `./.be`, not `.be`). By calculating relative paths and using the relative paths to determine which files belong to the directory, we can handle both prefixed and plain paths.
* | Run cmd.cleanup_now() after executing bzr commands.W. Trevor King2010-12-061-0/+10
|/ | | | | | | | | | | | | | | Otherwise be remove ... blocks if it needs to remove multiple files, since bzrlib.builtins.cmd_remove needs write locks, and the second remove will try to aquire the lock that the first aquire hadn't released. If we force the release, the lock will be available for the second (and later) removal. It's not a problem to call cleanup_now() too often, because calling it clears the cleanup command stack, so I just added explicit cleanups after every bzr .run() call.
* Ran update_copyright.py.W. Trevor King2010-10-211-1/+1
|
* Strip all whitespace from right side of the VCS storage version string.W. Trevor King2010-09-051-1/+1
| | | | The old method failed with Windows-style \r\n endlines, etc.
* Remove useless children[i] from libbe.storage.vcs.base.VCS._children().W. Trevor King2010-09-051-1/+0
|
* Don't assume len(os.path.sep) == 1 in libbe.storage.vcs.base.W. Trevor King2010-09-051-4/+4
|
* Ah, restored altered dirname code to Monotone's root method.W. Trevor King2010-06-271-1/+5
| | | | | | | | | | | | The previous implementation used cwd=path which would fail for non-directory paths. The implementation before that was missing the not from if not os.path.isdir(path): dirname = os.path.dirname(path) which meant it found the dirname when it didn't need to, and not when it did ;).
* Fixed Monotone driver rooting for interface versions >= 8.0.W. Trevor King2010-06-271-11/+8
| | | | | | | I'm not sure where the dirname manipulation came from, but it was screwing things up ;). Also some argument order and indentation cleanups.
* Use _invoke_client (vs. old _u_invoke_client) for Monotone get_workspace_root.W. Trevor King2010-06-261-1/+1
| | | | | | | | | | | | | | | | This fixes Chris' ====================================================================== ERROR: Adding entries with the same ID should not increase the number of children. ---------------------------------------------------------------------- Traceback (most recent call last): ... CommandError: Command failed (1): mtn: misuse: workspace required but not found while executing ['mtn', 'automate', 'get_workspace_root']
* Add a Storage driver for the Monotone VCSW. Trevor King2010-06-262-1/+371
|
* Removed libbe.storage.vcs.base._get_versionW. Trevor King2010-06-263-21/+14
| | | | | | | | It had been catching exceptions from ._vcs_version, but ._vcs_version should catch its own exceptions. Also use cached results from .version in Darcs and Bzr.version_cmp() rather than calling ._vcs_version directly.
* Ran update_copyright.pyW. Trevor King2010-06-227-81/+88
|
* Darcs should look in ~/.darcs/author not ~/.darcs/prefs/authorwking2010-06-221-3/+3
| | | | | From: http://darcs.net/manual/node7.html#env:DARCS_EMAIL
* Darcs._vcs_get_user_id() now also checks ~/.darcs/prefs/author|email.wking2010-06-221-4/+6
| | | | Thanks to Gour for pointing out that it should.
* Use 'darcs add --boring' for Darcs > 0.9.10wking2010-06-221-1/+4
|
* Fixed Eric Kow's _darcs/prefs/author bug.W. Trevor King2010-05-191-1/+1
|
* Use _vcs_get_file_contents (vs get_file_contents) in Darcs._vcs_get_user_idW. Trevor King2010-05-191-1/+1
|
* Fixed docstrings so only Sphinx errors are "autosummary" and "missing attribute"W. Trevor King2010-02-077-378/+361
|
* Made Bzr/Darcs.version_cmp() more robust in response to Chris' email.W. Trevor King2010-02-012-18/+30
| | | | | | | | | | | | From: Chris Ball <cjb@laptop.org> Subject: Test suite status ... I ran the wking@drexel.edu-20100130162439-pmh5tg6kuq92x3l5 testsuite on Fedora 13/Rawhide. Had to downgrade Mercurial (bzr-hg doesn't support 1.4.2 yet) and bzr (my Fedora package contained a "b4" in the version string, which breaks libbe/storage/vcs/bzr.py:version_cmp()). ...
* Fixed Chris' "zero name length for Mercurial w/o ~/.hgrc" bug.W. Trevor King2010-02-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Chris Ball <cjb@laptop.org> Subject: Test suite status Date: Mon, 01 Feb 2010 11:27:53 -0500 Message-id: <m38wbcor92.fsf@pullcord.laptop.org> ... I hit the "assert len(name) > 0" in libbe/ui/util/libbe.py, coming from hg.py when running with no ~/.hgrc. Fixed by the following patch: === modified file 'libbe/storage/vcs/hg.py' --- libbe/storage/vcs/hg.py 2010-01-21 17:45:49 +0000 +++ libbe/storage/vcs/hg.py 2010-02-01 16:17:03 +0000 @@ -87,7 +87,14 @@ return tmp_stdout.getvalue().rstrip('\n') def _vcs_get_user_id(self): - return self._u_invoke_client('showconfig', 'ui.username') + output = self._u_invoke_client('showconfig', 'ui.username') + if output != "": + return output.rstrip('\n') + else: + # guess missing info + name = libbe.ui.util.user.get_fallback_username() + email = libbe.ui.util.user.get_fallback_email() + return libbe.ui.util.user.create_user_id(name, email) def _vcs_detect(self, path): """Detect whether a directory is revision-controlled using Mercurial"""
* Work around "bzr ls --non-recursive PATH : no list" bug in old bzrlib.W. Trevor King2010-01-281-4/+9
| | | | | | | | | | | | | | | See: https://bugs.launchpad.net/bzr/+bug/158690 Bug affected versions: 0.90.0 (reported) 1.3.1 (my test suite hit it) Doesn't affect versions: 2.0+ (non_recursive -> recursive) But I haven't isolated the source more specifically. Working around it for everything < 2.0 should be safe, but the cutoff could be fine-tuned if someone wants to dig through the bzr.dev history...
* Fix bzrlib.builtins.cmd_cat() output for pre 1.6.0 bzrlibs.W. Trevor King2010-01-281-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed in bzr.dev revno: 3341.2.1 revision-id: bialix@ukr.net-20080407074826-5lwuyv4dn1qlijg4 parent: pqm@pqm.ubuntu.com-20080407044456-s1a9orh0kssphdh9 committer: Alexander Belchenko <bialix@ukr.net> branch nick: cmd-cat timestamp: Mon 2008-04-07 10:48:26 +0300 message: `bzr cat` no more internally used Tree.print_file(). Merged into bzr.dev's trunk revno: 3512 [merge] revision-id: pqm@pqm.ubuntu.com-20080626004245-dnw85so4xqg8r9hy parent: pqm@pqm.ubuntu.com-20080625230724-lyux37pu8nx8tq34 parent: aaron@aaronbentley.com-20080626001706-wo3w74fwgliy12s4 committer: Canonical.com Patch Queue Manager <pqm@pqm.ubuntu.com> branch nick: +trunk timestamp: Thu 2008-06-26 01:42:45 +0100 message: (bialix) Deprectate (Branch|Repository).print_file, fix cmd_cat Before bzr branch 1.6 bzr.dev$ bzr tags ... bzr-1.5rc1 3418.6.3 bzr-1.6 3606.5.9 ... Fixes: python test.py -q libbe.storage.vcs.bzr ...............................FSome value:1E.. ====================================================================== ERROR: Get should be able to return the previous version. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/wking/src/fun/be/be.wtk/libbe/storage/base.py", line 976, in test_ get_previous_version ret = self.s.get(self.id, revision=revs[i]) File "/home/wking/src/fun/be/be.wtk/libbe/storage/base.py", line 335, in get value = self._get(*args, **kwargs) File "/home/wking/src/fun/be/be.wtk/libbe/storage/vcs/base.py", line 849, in _ get raise InvalidID(id, revision) InvalidID: unlikely id in revision 1 ...
* Fix bzrlib.builtins.cmd_ls() recursion argument for pre 2.0 bzrlibs.W. Trevor King2010-01-281-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ python test.py libbe.storage.vcs.bzr ... ====================================================================== ERROR: Children list should be revision dependent. ---------------------------------------------------------------------- Traceback (most recent call last): File ".../libbe/storage/base.py", line 997, in test_ get_previous_children ret = sorted(self.s.children('parent', revision=revs[i])) File ".../libbe/storage/base.py", line 314, in child ren return self._children(*args, **kwargs) File ".../libbe/storage/vcs/base.py", line 811, in _ children path = self.path(id, revision, relpath=False) File ".../libbe/storage/vcs/base.py", line 716, in p ath path = self._vcs_path(id, revision) File ".../libbe/storage/vcs/bzr.py", line 145, in _v cs_path self.repo, revision=revision, recursive=True) File ".../libbe/storage/vcs/bzr.py", line 163, in _v cs_listdir cmd.run(revision=revision, path=path, recursive=recursive) File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 800, in ignor e_pipe result = func(*args, **kwargs) TypeError: run() got an unexpected keyword argument 'recursive' ... The change is due to (in bzr.dev): revno: 4206.2.1 revision-id: ian.clatworthy@canonical.com-20090326133831-orvicmmc6w29mpfp parent: pqm@pqm.ubuntu.com-20090326063330-evutyvml3067dpsz committer: Ian Clatworthy <ian.clatworthy@canonical.com> branch nick: bzr.ls-recursive-off timestamp: Thu 2009-03-26 23:38:31 +1000 message: ls should be non-recursive by default Which occured between bzr-1.9rc1 and 2.0rc1.: bzr.dev$ bzr tags 2.0rc1 4634.9.1 ... bzr-1.9rc1 3815.3.1 bzr-2.0.1 4634.73.2 ...
* Implement Arch._vcs_path()W. Trevor King2010-01-272-8/+29
| | | | | | | | | | | | | | | Fixes VersionedStorage_commit_TestCase.test_get_previous_children. Should have fixed VersionedStorage_commit_TestCase.test_get_previous_version too, but 'tla file-find' is buggy: https://bugs.launchpad.net/ubuntu/+source/tla/+bug/513472 Also: * sort children in test_get_previous_children, since we shouldn't require a particular child order * unescape filenames in Arch._diff() * remove debugging prints from Arch._parse_diff() * remove silly blank line in git.py I'd stumbled across ;).
* Implement Arch._vcs_changed().W. Trevor King2010-01-271-2/+46
| | | | Fixes VersionedStorage_changed_TestCase.test_changed failure.
* Make VCS error messages and Storage test failures more descriptiveW. Trevor King2010-01-274-8/+11
|
* Rework fix for #bea/8fc# : be crashes on outdated id-cacheW. Trevor King2010-01-251-7/+10
| | | | | | | | | | | | | | | | | | | | | | | Now we re-run CachedPathID.init in an 'append' mode, rather than starting over from scratch. This avoids problems like ====================================================================== ERROR: Should not be able to add children to non-directories. ---------------------------------------------------------------------- Traceback (most recent call last): File ".../be.wtk/libbe/storage/base.py", line 680, in test_add_invalid_directory self.s.add('child', 'parent', directory=False) File ".../be.wtk/libbe/storage/base.py", line 248, in add self._add(id, *args, **kwargs) File ".../be.wtk/libbe/storage/vcs/base.py", line 737, in _add path = self._cached_path_id.add_id(id, parent) File ".../be.wtk/libbe/storage/vcs/base.py", line 267, in add_id parent_path = self.path(parent, relpath=True) File ".../be.wtk/libbe/storage/vcs/base.py", line 246, in path raise InvalidID(uuid) InvalidID: parent in revision None and similar.
* Don't print 'Multiple paths' message on cache regenW. Trevor King2010-01-251-3/+3
|
* Fixed #bea/8fc# : be crashes on outdated id-cacheW. Trevor King2010-01-241-1/+5
| | | | Also explicitly avoid loading or saving settings for root comments.
* Add Bzr._vcs_exists() anyway :pW. Trevor King2010-01-221-1/+8
|