| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
._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 fixes
$ python be diff -2
Usage: be [options]
be: error: no such option: -2
and we now get the correct output
$ python be diff -2
Usage: be diff [options] [REVISION]
be: error: no such option: -2
|
| |
|
|
|
|
|
| |
This should make repeated calls to Bzr storage instances _much_ faster,
since we avoid repeatedly loading and tearing down a python subprocess.
|
|
|
|
| |
self.s.init()
|
|
|
|
|
|
| |
And
python test.py libbe.storage.vcs.base
passes again.
|
| |
|
|
|
|
| |
It may need access to the tty for the spawned editor.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Well, except for going through and updating the _long_help()
strings.
$ python test.py libbe.command
succeeds for everything except Diff and Subscribe, which is expected
since I haven't fixed up libbe.diff yet.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
They don't work yet, since I still need to fix up libbe.diff and
replace BugDir.duplicate_bugdir() with something based on the new
Storage backend.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old
.requires_*
thing was rediculous. The new ._get_*() callbacks allow the caller
to provide a means for getting the expensive structures, which the
command can use, or not, as required. This will also make it easier
to implement the completion callbacks.
The callbacks should probably have matching .set_*() methods, to
avoid the current cache tweaking
cmd._storage = ...
etc. But that can wait for now...
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For example, in Bash
alias be-open='be status open'
If you need to set options, this won't work, but command completion
with misc/completion/be.bash should make typing out
be status open
not too painful ;).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running
python test.py libbe.storage.vcs
yields some EmptyCommit problems, an issue with bzr revision ids, and
some trouble with git's remove(), but nothing too critical.
On the bright side, now
./be list
Detects and uses the bzr backend :).
Onwards to moving over the remaining commands...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have to work around the same issue as mercurial (hg) issue 618. I
can't find a Darcs bug report for this, but it's been fixed somewhere
between 1.0.9 and 2.3.1.
Example scripts demonstrating the bug:
$ darcs=/usr/bin/darcs
$ mkdir x; cd x; $darcs init; echo a > b; $darcs add b; \
$darcs record --all --author 'x <a@b.com>' --logfile b; \
echo z>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
echo g>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
cd ..; rm -rf x > /dev/null; $darcs --version
Finished recording patch 'a'
No changes!
No changes!
1.0.9 (release)
And showing it's been fixed:
$ darcs=~/.cabal/bin/darcs
$ mkdir x; cd x; $darcs init; echo a > b; $darcs add b; \
$darcs record --all --author 'x <a@b.com>' --logfile b; \
echo z>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
echo g>b; $darcs record --all --author 'x <a@b.com>' --logfile b; \
cd ..; rm -rf x > /dev/null; $darcs --version
Finished recording patch 'a'
Finished recording patch 'z'
Finished recording patch 'g'
2.3.1 (release)
|
| |
|