aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/hg.py
Commit message (Collapse)AuthorAgeFilesLines
* doc: update :class: to :py:class: for modern Sphinx.W. Trevor King2012-10-261-1/+1
|
* Ran update-copyright.py.W. Trevor King2012-10-161-1/+1
|
* storage:vcs:hg: remove grandchildren from Hg._vcs_listdir.W. Trevor King2012-08-231-1/+4
| | | | | | | | | | | | | | | This fixes: From: Phil Schumm Date: Thu, 23 Aug 2012 08:15:21 -0500 Subject: [Be-devel] -be diff- under Hg ... I've just noticed that -be diff- seems to yield different output under Git than it does under Hg (e.g., in a Mercurial +repository, -be diff- appears to show all changes as new bugs rather than modified). ...
* storage:vcs:hg: fix missformed file_a -> file_b message typo.W. Trevor King2012-08-231-1/+1
|
* Ran update-copyright.py.W. Trevor King2012-02-161-10/+10
|
* Ran update_copyright.py.W. Trevor King2011-11-091-0/+1
|
* 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.
* 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)
* Run update_copyright.py.W. Trevor King2011-05-251-0/+1
|
* Remove form feeds (for compatibility with 2to3).W. Trevor King2011-05-121-1/+1
|
* Bumped to version 1.0.01.0.0Chris Ball2011-01-081-1/+2
|
* Ran update_copyright.pyW. Trevor King2010-06-221-12/+13
|
* Fixed docstrings so only Sphinx errors are "autosummary" and "missing attribute"W. Trevor King2010-02-071-40/+46
|
* 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"""
* 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 ...
* Add .changed() support to HgW. Trevor King2010-01-181-0/+71
|
* Added VCS._u_find_id_from_manifest for faster id->path calculationW. Trevor King2010-01-181-17/+3
|
* Updated copyright informationW. Trevor King2010-01-011-1/+1
|
* 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
* We don't do much with Mercurial's ui, so _dispatch -> dispatchW. Trevor King2009-12-291-2/+1
|
* Updated Hg backend to support .children(revision).W. Trevor King2009-12-291-1/+32
|
* Hg storage now based off mercurial module, not 'hg' executible.W. Trevor King2009-12-291-21/+39
| | | | | | | | | | | | | | | | | | | | | | | | This should make repeated calls to Hg storage instances _much_ faster, since we avoid repeatedly loading and tearing down a python subprocess. For example, the testsuite runs ~6x faster on my box. Here's a run with the old Hg implementation: $ python test.py libbe.storage.vcs.hg ... ================================= ERROR: test_get_previous_children --------------------------------- Traceback (most recent call last): ... NotImplementedError --------------------------------- Ran 49 tests in 133.285s FAILED (errors=1) A run with the new implementation gives the same results, except for: Ran 49 tests in 22.328s
* Fixed libbe.command.diff + ugly BugDir.duplicate_bugdir implementationW. Trevor King2009-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | duplicate_bugdir() works, but for the vcs backends, it could require shelling out for _every_ file read. This could, and probably will, be horribly slow. Still it works ;). I'm not sure what a better implementation would be. The old implementation checked out the entire earlier state into a temporary directory pros: single shell out, simple upgrade implementation cons: wouldn't work well for HTTP backens I think a good solution would run along the lines of the currently commented out code in duplicate_bugdir(), where a VersionedStorage.changed_since(revision) call would give you a list of changed files. diff could work off of that directly, without the need to generate a whole duplicate bugdir. I'm stuck on how to handle upgrades though... Also removed trailing whitespace from all python files.
* Adjust Hg._vcs_revision_id for 1-indexed revision ids.W. Trevor King2009-12-131-0/+2
|
* Work around mercurial (hg) issue 618.W. Trevor King2009-12-131-1/+13
|
* Fix Git._vcs_revision_id() offset bug.W. Trevor King2009-12-131-2/+2
|
* Handle non-int args to VCS.revision_id at the VCS level.W. Trevor King2009-12-131-4/+0
|
* Adjust Hg._vcs_revision_id to bail cleanly on non-int revidsW. Trevor King2009-12-131-0/+4
|
* Use detect rather than catching errors in _vcs_root().W. Trevor King2009-12-131-6/+1
|
* .bzr transition.W. Trevor King2009-12-131-1/+4
|
* More fixes for libbe.storage.vcs.hg + .git transition.W. Trevor King2009-12-131-0/+7
|
* Converted libbe.storage.vcs.hg to new Storage format.W. Trevor King2009-12-131-34/+39
|
* Initial directory restructuring to clarify dependenciesW. Trevor King2009-12-071-0/+108