aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/darcs.py
Commit message (Collapse)AuthorAgeFilesLines
* Added libbe.TESTING (defaults to False).W. Trevor King2009-12-031-5/+8
| | | | | | | | | | | | | | | | | | | | This flag allows us to skip unittest and testsuite declaration if we woln't need them. It speeds up simple be calls a suprising amount. With Testing=True (the old behavior): wking@thor:be.wtk$ time ./be > /dev/null real 0m0.393s user 0m0.340s sys 0m0.048s With TESTING=False (the new behavior): be.wtk$ time ./be > /dev/null real 0m0.216s user 0m0.152s sys 0m0.064s This adjustment was inspired by Jakub Wilk's Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559295
* Ran the new update_copyright.pyW. Trevor King2009-11-191-1/+2
|
* Use unicode_output=False in some Darcs._u_invoke_client() calls.W. Trevor King2009-11-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the following error: ====================================================================== ERROR: Should get file contents as committed to specified revision. ---------------------------------------------------------------------- Traceback (most recent call last): File ".../libbe/vcs.py", line 860, in test_revision_file_contents_as_committed full_path, revision) File ".../libbe/vcs.py", line 339, in get_file_contents contents = self._vcs_get_file_contents(relpath,revision,binary=binary) File ".../libbe/darcs.py", line 122, in _vcs_get_file_contents status,output,error = self._u_invoke(args, stdin=major_patch) File ".../libbe/vcs.py", line 488, in _u_invoke raise CommandError(args, status, stdout, stderr) CommandError: Command failed (2): patch: **** Only garbage was found in the patch input. while executing ['patch', '--reverse', 'a/text'] After adding the unicode_output=False lines, I adjusted the VCS._u_invoke_client() definition to pass all it's kwargs automatically through to VCS._u_invoke(). To make this simpler and more consistent, I renamed the "directory" option to "cwd", and adjusted *._u_invoke() calls appropriately in several VCS backends.
* Oops, fixed return typo in libbe.darcs.Darcs._vcs_get_file_contents()W. Trevor King2009-10-061-8/+8
| | | | | | | | | | | | | | | For self.parsed_version[0] >= 2, was returning the entire output of ._u_invoke_client() (status, output, and error). Now it just returns the output, which is what we want. This fixes Chris' failed test: ====================================================================== FAIL: Should get file contents as committed to specified revision. ---------------------------------------------------------------------- Traceback (most recent call last): File "libbe/vcs.py", line 852, in test_revision_file_contents_as_committed self.test_contents['rev_1'], committed_contents) AssertionError: 'Lorem ipsum' != (0, 'Lorem ipsum', '') ----------------------------------------------------------------------
* Moved VCS detection from _vcs_help() to _vcs_version().W. Trevor King2009-10-061-4/+6
| | | | | | | The version string is useful information to have around, while the help string is probably not. For example, we use it in darcs.Darcs._vcs_get_file_contents() to construct an incantation appropriate to the version we're dealing with.
* Added docstrings to libbe submodules.W. Trevor King2009-08-311-6/+10
| | | | Also a few minor tweaks to the module imports.
* RCS -> VCS, BUGDIR_DISK_VERSION -> v1.2W. Trevor King2009-08-311-25/+25
|
* Added .revision_id() to all the VCSs.W. Trevor King2009-07-231-13/+30
| | | | | This makes it easier to compare recent revisions without a human around to give you revision numbers.
* Added --allow-empty to "be commit"W. Trevor King2009-07-191-14/+15
| | | | | | | Previously many backends would silently add an empty commit. Not very useful. When the new --allow-empty flag and related allow_empty options are false, every versioning backend is guaranteed to raise the EmptyCommit exception in the case of an attempted empty commit.
* Updated GPLv2 to current GPLv2.W. Trevor King2009-07-141-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | Fixes Ben's bug 00f26f04-9202-4288-8744-b29abc2342d6. I also tweaked update_copyright.sh to make possible future copyright-blurb revision easier. The new algorithm is greedier, overwriting _all_ consecutive comments after a '^# Copyright' line, so do # Copyright # GPL ... GPL ... GPL # Your comment here... not # Copyright # GPL ... GPL ... GPL # # Your comment here... Without the blank line, your comment would get overwritten by the next run of update_copyright.sh. Note that catmutt is ignored by update_copyright.sh because Moritz Barsnick has only licensed his grepm code under the GPLv2 (not GPLv>=2). See the initial catmutt commit for details.
* Updated darcs put command for darcs >= 2.2.0, following Chris' reportW. Trevor King2009-07-011-2/+1
|
* Updated copyright blurbs and AUTHORS and included script for future updatesW. Trevor King2009-07-011-2/+1
|
* Added darcs support.W. Trevor King2009-06-301-0/+164
I don't know much darcs, so I make no claims about the beauty of my implementation. It seems to get the job done though, until a darcs guru comes along. I also tweaked the libbe.git.Git._rcs_get_user_id to handle the case where user.name or user.email are not set. I also added the option to pass a stdin string into the libbe.rcs.RCS._u_invoke* functions.