| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ 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
...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;).
|
|
|
|
| |
Fixes VersionedStorage_changed_TestCase.test_changed failure.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Also explicitly avoid loading or saving settings for root comments.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
...
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Also add some NotImplementedErrors for clearer diagnostics.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
kwargs make things easier to maintain.
Also make sure the .handle_*() methods return two items
(content,ctype)
even when both are None.
|
|
|
|
|
| |
search_parent_directries raises an AssertionError if the original path
doesn't exist.
|
| |
|
|
|
|
| |
This makes cleaning up UIs easier: just call disconnect() :p.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Otherwise Arch will return '.arch-ids' in its list, etc.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
._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.
|
|
|
|
|
| |
Also re-enabled the unitsuite in libbe.storage.vcs.base, which
I'd disabled while testing the VCS unittests.
|
|
|
|
|
| |
Now it returns '.' when you ask for the relative path from root to
itself. It used to raise AssertionError or InvalidPath.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
+ some minor fixes to vcs/base.py and vcs/bzr.py
Also removed .be/id-cache, which should never have been versioned in
the first place.
|
|
|
|
|
|
|
|
| |
Now they both pass
VersionedStorage_commit_TestCase.test_commit_revision_ids()
The .children() implementation for previous revisions lacks the
working directory's id<->path cache, so it's fairly slow...
|
|
|
|
|
| |
This should make repeated calls to Bzr storage instances _much_ faster,
since we avoid repeatedly loading and tearing down a python subprocess.
|
|
|
|
|
|
| |
And
python test.py libbe.storage.vcs.base
passes again.
|
|
|
|
|
|
| |
Also added ConnectionError pretty-print to ui.command_line, storage
version checking to BugDir.duplicate_bugdir(), and optional revision
argument to Storage.storage_version().
|
|
|
|
| |
Now commands automatically check for storage version compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that it only upgrades on-disk versions, so you can't use a
non-VCS storage backend whose version isn't your command's current
storage version. See #bea/110/bd1# for reasoning. To see the on-disk
storage version, look at
.be/version
To see your command's supported storage version, look at
be --full-version
I added test_upgrade.sh to exercise the upgrade mechanism on BE's own
repository.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|