From 4c7a9d837a268480e61124bba84b5fb01ec3728f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 21 Jul 2009 07:28:26 -0400 Subject: Cleaned up saving/sync_with_disk. Got rid of a whole bunch of redundant .save() calls when sync_with_disk==True. Fixed up the "File-system access" portion of the BugDir docstring so we can all remember how things are supposed to work ;). Note that some .save() calls are still required. For example in becommands/merge.py, the copied comments have their .bug changed, but that is not a versioned property, so it doesn't trigger an automatic save, and we have to force the .save() by hand. libbe.rcs.RCS.mkdir() is now recursive by default, but you can set check_parents==False if you want it to fail in the case of missing parents. Because of the recursion, we removed the .update() call on preexisting directories, since there will be at least one of these occurrences for every .mkdir(check_parents=True) call, and I don't know of any VCS that actually needs them... Also stripped trailing whitespace from some files... --- becommands/diff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'becommands/diff.py') diff --git a/becommands/diff.py b/becommands/diff.py index f3474b3..0acfcb2 100644 --- a/becommands/diff.py +++ b/becommands/diff.py @@ -24,10 +24,10 @@ def execute(args, test=False): """ >>> import os >>> bd = bugdir.simple_bug_dir() + >>> bd.set_sync_with_disk(True) >>> original = bd.rcs.commit("Original status") >>> bug = bd.bug_from_uuid("a") >>> bug.status = "closed" - >>> bd.save() >>> changed = bd.rcs.commit("Closed bug a") >>> os.chdir(bd.root) >>> if bd.rcs.versioned == True: -- cgit From 680b3a15076d24d9e1ba5cd96623081d74dbd441 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 21 Jul 2009 10:32:15 -0400 Subject: Touched up becommands/diff.py's help message. --- becommands/diff.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'becommands/diff.py') diff --git a/becommands/diff.py b/becommands/diff.py index 0acfcb2..491261e 100644 --- a/becommands/diff.py +++ b/becommands/diff.py @@ -88,9 +88,10 @@ def get_parser(): return parser longhelp=""" -Uses the RCS to compare the current tree with a previous tree, and prints -a pretty report. If specifier is given, it is a specifier for the particular -previous tree to use. Specifiers are specific to their RCS. +Uses the RCS to compare the current tree with a previous tree, and +prints a pretty report. If REVISION is given, it is a specifier for +the particular previous tree to use. Specifiers are specific to their +RCS. For Arch your specifier must be a fully-qualified revision name. -- cgit