aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* We don't need VCS._vcs_exists yet, with exists only used in _addW. Trevor King2010-01-221-1/+1
|
* Add VCS._exists(), VCS.path(). Fix default handling in VCS._get().W. Trevor King2010-01-221-25/+37
| | | | | | | | | | VCS.path() consolidates a bunch of distributed code. The VCS backend cannot distinguish between _EMPTY and '' entry values, so it assumes len(contents) == 0 means _EMPTY. However, it had been returing None then, not default like its supposed to.
* Fix version import for mercurial <= 1.1.2W. Trevor King2010-01-211-1/+1
|
* Adjust to modern mercurial version definition.W. Trevor King2010-01-201-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hg-stable$ hg log --patch mercurial/util.py ... changeset: 7640:9626819b2e3d user: Matt Mackall <mpm@selenic.com> date: Sat Jan 10 18:02:38 2009 -0600 summary: refactor version code diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -142,6 +142,14 @@ """Find the length in characters of a local string""" return len(s.decode(_encoding, "replace")) +def version(): + """Return version information if available.""" + try: + import __version__ + return __version__.version + except ImportError: + return 'unknown' + # used by parsedate ... hg-stable$ hg tags ... 1.2 7823:11efa41037e2 1.1.2 7497:11a4eb81fb4f ...
* Fix _u_rel_path problems in VCS._childrenW. Trevor King2010-01-202-3/+4
|
* Use relative paths *._vcs_* methods.W. Trevor King2010-01-191-3/+6
|
* Better error messages in VCS._getW. Trevor King2010-01-191-3/+5
|
* Work around the extra output of `tla file-find` to get path.W. Trevor King2010-01-191-1/+2
| | | | | | | | Example output: * build pristine tree for ...--patch-1 * from import revision: ...--base-0 * patching for revision: ...--patch-1 ./{arch}/++pristine-trees/...--patch-1/./.be/unlikely id
* Work around Mercurial issue618 in Arch backend.W. Trevor King2010-01-191-4/+20
| | | | Also add some NotImplementedErrors for clearer diagnostics.
* Added changed() support for DarcsW. Trevor King2010-01-181-17/+110
|
* Add .changed() support to HgW. Trevor King2010-01-181-0/+71
|
* Fix VCS doctest for +revision InvalidID error messageW. Trevor King2010-01-181-1/+1
|
* Added VCS._u_find_id_from_manifest for faster id->path calculationW. Trevor King2010-01-183-23/+37
|
* Adjust VCSTestCase method docstrings for unittest.W. Trevor King2010-01-181-6/+3
|
* Added VCS._ancestorsW. Trevor King2010-01-181-0/+21
|
* Ignore paths with _u_path_to_id errors in VCS.changedW. Trevor King2010-01-181-5/+12
|
* Add .changed() support to BzrW. Trevor King2010-01-181-1/+83
|
* Add .changed() support to GitW. Trevor King2010-01-181-0/+81
|
* Add .changed() support to VCSW. Trevor King2010-01-181-0/+15
|
* Use more kwargs in libbe.command.serveW. Trevor King2010-01-011-1/+1
| | | | | | | | kwargs make things easier to maintain. Also make sure the .handle_*() methods return two items (content,ctype) even when both are None.
* Hand nonexistent paths in VCS._u_search_parent_directories().W. Trevor King2010-01-011-1/+5
| | | | | search_parent_directries raises an AssertionError if the original path doesn't exist.
* Updated copyright informationW. Trevor King2010-01-017-8/+22
|
* Track connection status to allow multiple Storage.disconnect() calls.W. Trevor King2009-12-311-1/+1
| | | | This makes cleaning up UIs easier: just call disconnect() :p.
* Correct for possible directory changes in mercurial.dispatch.dispatch()W. Trevor King2009-12-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | I ran across this when the hg unittests broke the vcs.base unittests: $ python test.py libbe.storage.vcs.base libbe.storage.vcs.hg ... OK $ python test.py libbe.storage.vcs.hg libbe.storage.vcs.base ... File ".../libbe/storage/vcs/base.py", line 914, in libbe.storage.vcs.base.VCSTestCase.Class._u_rel_path Failed example: vcs._u_rel_path("./a", ".") Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest libbe.storage.vcs.base.VCSTestCase.Class._u_rel_path[4]>", line 1, in <module> vcs._u_rel_path("./a", ".") File ".../libbe/storage/vcs/base.py", line 921, in _u_rel_path path = os.path.abspath(path) File "/usr/lib/python2.5/posixpath.py", line 403, in abspath path = join(os.getcwd(), path) OSError: [Errno 2] No such file or directory ... FAILED (failures=1)
* Disable mercurial.demandimport, since it breaks BzrW. Trevor King2009-12-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running python test.py libbe.storage.vcs.hg libbe.storage.vcs.bzr with the old setup produced lots of Traceback (most recent call last): File ".../libbe/storage/vcs/base.py", line 1010, in setUp self.s.init() File ".../libbe/storage/base.py", line 170, in init return self._init() File ".../libbe/storage/vcs/base.py", line 664, in _init self._vcs_init(self.repo) File ".../libbe/storage/vcs/bzr.py", line 88, in _vcs_init cmd.run(location=path) File ".../python2.5/site-packages/bzrlib/builtins.py", line 1685, in run format = bzrdir.format_registry.make_bzrdir('default') File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3452, in make_bzrdir return self.get(key)() File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3398, in helper bd.set_branch_format(_load(branch_format)) File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3385, in _load [factory_name]) File "/var/lib/python-support/python2.5/mercurial/demandimport.py", line 108, in _demandimport setattr(mod, x, _demandmod(x, mod.__dict__, locals)) File ".../python2.5/site-packages/bzrlib/lazy_import.py", line 106, in __getattribute__ obj = _replace() File ".../python2.5/site-packages/bzrlib/lazy_import.py", line 88, in _replace extra=e) IllegalUseOfScopeReplacer: ScopeReplacer object 'branch' was used incorrectly: Object already cleaned up, did you assign it to another variable?: _factory
* Use ._vcs_is_versioned() in VCS._children()W. Trevor King2009-12-291-0/+3
| | | | Otherwise Arch will return '.arch-ids' in its list, etc.
* Fixed make_*_testcase_subclasses() to avoid duplication.W. Trevor King2009-12-291-1/+2
| | | | | | Also removed final check for 'parent' existence in Storage_add_remove_TestCase.test_remove_nonrooted() because some VCSs (e.g. Git) don't keep track of blank directories.
* We don't do much with Mercurial's ui, so _dispatch -> dispatchW. Trevor King2009-12-291-2/+1
|
* Updated Darcs backend towards supporting .children(revision).W. Trevor King2009-12-291-40/+114
| | | | | | | | | | | | | | | | | | | ._vcs_isdir() and ._vcs_listdir() will need to parse the output of darcs show files [options] --patch REVISION PATH but both the --patch option and the PATH argument are new, and I can't get a recent enough version of Darcs to compile on my system. Theoretically they will work, but they remain untested for now. I don't think it's worth rolling my own darcs show files --patch REVISION to support earlier versions of Darcs, since the only solution I can think of now would be to check out the given revision and use os.walk() or some such, and that would be really ugly... Also added .version_cmp() for easy version comparison. Reindented ._vcs_get_file_contents() to remove trailing elses since the if clauses all contain returns.