]> git.mjollnir.org Git - cil.git/commitdiff
Added the 'steal' command (closes #6b087805).
authorAndrew Chilton <andychilton@gmail.com>
Thu, 3 Jul 2008 11:23:47 +0000 (23:23 +1200)
committerAndrew Chilton <andychilton@gmail.com>
Thu, 3 Jul 2008 11:23:47 +0000 (23:23 +1200)
README
bin/cil
issues/c_3da3fd2f.cil [new file with mode: 0644]
issues/i_6b087805.cil

diff --git a/README b/README
index bceb62360564e458a4110cbd76f20a64e788a2ba..27404a5e74e53bf56574f9f93467b5f01ec44516 100644 (file)
--- a/README
+++ b/README
@@ -100,4 +100,14 @@ run this to do checks regarding the whole issue list:
 That's it for now. As you can see, if you've played with any kind of bug/issue
 tracker before, 'cil' is straightforward.
 
+Sometimes, you might add someone else repository from which you want to fetch
+both code and issues. If you merge a new issue and you want to assign it to
+yourself, instead of editing the issue and having to type in your name and
+email, just use 'cil steal'. This will assign the issue to yourself and save it
+back out:
+
+ $ cil steal cafebabe
+
+Then just commit it to your VCS.
+
 ===============================================================================
diff --git a/bin/cil b/bin/cil
index eb0c83afef2afa271f2c09c94024e09ccd78872e..64c5a4f7148401988e29284b12ecd241a2a56a12 100755 (executable)
--- a/bin/cil
+++ b/bin/cil
@@ -243,6 +243,19 @@ sub cmd_status {
     display_issue($cil, $issue);
 }
 
+sub cmd_steal {
+    my ($cil, undef, $issue_name) = @_;
+
+    # firstly, read the issue in
+    my $issue = load_issue_fuzzy( $cil, $issue_name );
+
+    # set the AssignedTo for this issue to you (because you're stealing it)
+    $issue->AssignedTo( user($cil) );
+    $issue->save($cil);
+
+    display_issue($cil, $issue);
+}
+
 sub cmd_add {
     my ($cil, undef, $issue_name) = @_;
 
@@ -1043,6 +1056,7 @@ Commands:
    list    [FILTERS...]
    show    ISSUE
    status  ISSUE NEW_STATUS
+   steal   ISSUE
    edit    ISSUE
    comment ISSUE
    attach  ISSUE FILENAME
@@ -1150,6 +1164,12 @@ completeness. ie. issue 1 has to be completed before issue 2.
 Shortcut so that you can set a new status on an issue without having to edit
 it.
 
+=item steal ISSUE
+
+Shortcut to assign this issue to yourself. It reads your C<~/.cilrc> file for
+your UserName and UserEmail and uses this to populate the C<AssignedTo> field
+in the issue.
+
 =item edit ISSUE
 
 Edits the issue. If it changes, set the updates time to now.
diff --git a/issues/c_3da3fd2f.cil b/issues/c_3da3fd2f.cil
new file mode 100644 (file)
index 0000000..323073e
--- /dev/null
@@ -0,0 +1,6 @@
+Issue: 6b087805
+CreatedBy: Andrew Chilton <andychilton@gmail.com>
+Inserted: 2008-07-03T11:15:33
+Updated: 2008-07-03T11:16:26
+
+Done. Pretty easy eh!
index 30301be6e5ba5c05f8e7b0c820adc8959a73cd1f..186f86d3c4876059f5a0e05624c20109e1f5952e 100644 (file)
@@ -1,9 +1,12 @@
 Summary: Add a 'steal' command
-Status: New
+Status: Finished
 CreatedBy: Andrew Chilton <andychilton@gmail.com>
 AssignedTo: Andrew Chilton <andychilton@gmail.com>
+Label: Milestone-v0.5
+Label: Type-Enhancement
+Comment: 3da3fd2f
 Inserted: 2008-07-03T10:10:50
-Updated: 2008-07-03T10:12:29
+Updated: 2008-07-03T11:23:03
 
 A 'cil steal <issue>' command would be helpful to assign issues to yourself.
 This is just shorthabe for editing an issue and putting your "UserName