diff options
author | Gianluca Montecchi <gian@grys.it> | 2009-10-02 23:46:24 +0200 |
---|---|---|
committer | Gianluca Montecchi <gian@grys.it> | 2009-10-02 23:46:24 +0200 |
commit | b0b3c9473e3a4b728ea72a2876e39fe41284a9ed (patch) | |
tree | 533a389e877b4b1a9c4099bb419eb221b2f12ada /becommands/merge.py | |
parent | 071fef7c351c4fc23696aa6db693411b78da2edb (diff) | |
download | bugseverywhere-b0b3c9473e3a4b728ea72a2876e39fe41284a9ed.tar.gz |
Merged with Trevor's -rr branch
Diffstat (limited to 'becommands/merge.py')
-rw-r--r-- | becommands/merge.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/becommands/merge.py b/becommands/merge.py index 4aaefa8..f212b01 100644 --- a/becommands/merge.py +++ b/becommands/merge.py @@ -18,10 +18,10 @@ from libbe import cmdutil, bugdir import os, copy __desc__ = __doc__ -def execute(args, test=False): +def execute(args, manipulate_encodings=True): """ >>> from libbe import utility - >>> bd = bugdir.simple_bug_dir() + >>> bd = bugdir.SimpleBugDir() >>> bd.set_sync_with_disk(True) >>> a = bd.bug_from_shortname("a") >>> a.comment_root.time = 0 @@ -37,7 +37,7 @@ def execute(args, test=False): >>> dummy = dummy.new_reply("1 2 3 4") >>> dummy.time = 2 >>> os.chdir(bd.root) - >>> execute(["a", "b"], test=True) + >>> execute(["a", "b"], manipulate_encodings=False) Merging bugs a and b >>> bd._clear_bugs() >>> a = bd.bug_from_shortname("a") @@ -120,6 +120,7 @@ def execute(args, test=False): Merged into bug a >>> print b.status closed + >>> bd.cleanup() """ parser = get_parser() options, args = parser.parse_args(args) @@ -133,10 +134,11 @@ def execute(args, test=False): help() raise cmdutil.UsageError("Too many arguments.") - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) - bugA = bd.bug_from_shortname(args[0]) + bd = bugdir.BugDir(from_disk=True, + manipulate_encodings=manipulate_encodings) + bugA = cmdutil.bug_from_shortname(bd, args[0]) bugA.load_comments() - bugB = bd.bug_from_shortname(args[1]) + bugB = cmdutil.bug_from_shortname(bd, args[1]) bugB.load_comments() mergeA = bugA.new_comment("Merged from bug %s" % bugB.uuid) newCommTree = copy.deepcopy(bugB.comment_root) |