aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/vcs.py
Commit message (Collapse)AuthorAgeFilesLines
* Don't get VCS version in VCS.__init__().W. Trevor King2009-12-031-2/+6
| | | | | | | | | | | | | | | | | | Often, this just causes a slow subprocess.Popen() call to get information we woln't even look at. Old benchmark: $ time be list > /dev/null real 0m2.369s user 0m1.980s sys 0m0.388s New benchmark: $ time be list > /dev/null real 0m1.472s user 0m1.304s sys 0m0.164s
* Added libbe.TESTING (defaults to False).W. Trevor King2009-12-031-282/+287
| | | | | | | | | | | | | | | | | | | | 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
* Fix libbe.vcs.VCS.get_file_contents(allow_no_vcs=True,binary=True).W. Trevor King2009-11-211-1/+8
| | | | | | | | In it's previous form it had ignored the binary option if self._use_vcs() returned False. Also added a few more details to the docstring, explaining the arguments.
* Adjusted test.py to use an installed vcs by default.W. Trevor King2009-11-201-6/+17
| | | | | | | | | Protects agaist the off chance that the user doesn't have Arch (tla) installed ;). Changed Arch.name from "Arch" to "arch" so that each VCSs .name matches the module name. This allows us to use vcs.VCS_ORDER (a list of module names) to set up the allowed values of BugDir.vcs_name.
* Broke subprocess handling out into its own submodule libbe.subproc.W. Trevor King2009-11-201-41/+9
|
* 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-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Cleanup temp. dir. in libbe.vcs tests.W. Trevor King2009-11-171-1/+2
|
* "CommandStderr" -> "CommandError" in VCS._u_invoke()W. Trevor King2009-11-171-1/+1
| | | | | Corrects a mistake from using string replace to move output,error -> stdout,stderr a few commits ago.
* Added unicode_output option to VCS._u_invoke()W. Trevor King2009-11-171-2/+8
|
* rename "output","error" -> "stdout","stderr" in VCS._u_invoke()W. Trevor King2009-11-171-4/+4
|
* Moved VCS detection from _vcs_help() to _vcs_version().W. Trevor King2009-10-061-10/+15
| | | | | | | 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.
* Moved from *.__del__() to exclusive use of *.cleanup().W. Trevor King2009-10-051-4/+2
| | | | | | | | | *.__del__() is run some unspecified time after the refcount for an object is reduced to zero. Sometimes that means that the rest of the world has already been deallocated, which makes life difficult, especially when Python won't attempt to construct stack traces inside *.__del__(). We were always (hopefully ;) calling del(*) anyway, so we just replace those calls with *.cleanup()
* Include stdout in CommandError.W. Trevor King2009-09-191-6/+7
|
* Added docstrings to libbe submodules.W. Trevor King2009-08-311-0/+6
| | | | Also a few minor tweaks to the module imports.
* RCS -> VCS, BUGDIR_DISK_VERSION -> v1.2W. Trevor King2009-08-311-0/+931