All these responses are correct.  For a multi-commit patch, create  via 
'post-review' and not the ReviewBoard GUI.

The problem is with adding a diff file that aggregates a bunch of patches.  In 
my case, I've ~97 commits.  Our old workflow suggests generating the patch with 
'git format-patch -s master', but that gives you 97 different patches to review 
(see 
http://wiki.cloudstack.org/display/dev/Git+workflow+in+the+brave+new+world).  
Apache suggests dumping the patches into a single file with 'git format-patch 
master --stdout > ~/patch-name.patch' (see 
http://incubator.apache.org/cloudstack/develop/non-contributors.html)  As 
Likitha and Min point out, this causes problems when one patch is dependent on 
another.

To avoid these issues, submit the commits as a single patch via RBTool's 
'post-review'.  See 
http://www.reviewboard.org/docs/manual/dev/users/tools/post-review/ for install 
instructions.  After installing, verify that your local git repo's 
origin/master is tracking Apache CloudStack's master.  E.g.

        $ git remote -v
        hyperv  https://github.com/lafferty/cshv3.git (fetch)
        hyperv  https://github.com/lafferty/cshv3.git (push)
        origin  
https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git (fetch)
        origin  
https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git (push)

Also, set the target Review Board.  E.g. to set for a repo, use the following 
command in the repo's root folder.

        git config reviewboard.url https://reviews.apache.org

>From the root the your local repo, simply call 'post-review'.  It will gross 
>up the changes between HEAD in the local repo and origin/master, create a 
>review, and return the URL.  You then flesh out the comments/summary/group 
>using a browser.

Enjoy!

> -----Original Message-----
> From: Likitha Shetty [mailto:likitha.she...@citrix.com]
> Sent: 29 January 2013 18:16
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: Upload Diff to Review Board fails on 'file not found in the
> repository'
> 
> I forgot to add, it is an issue only when a patch is dependent on 2 or more
> your previous patches (that have been not been merged yet). Because if it is
> just two commits we mark the first one as the parent diff while uploading the
> second one.
> 
> Thank you,
> Likitha
> 
> -----Original Message-----
> From: Min Chen [mailto:min.c...@citrix.com]
> Sent: Tuesday, January 29, 2013 11:20 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: Upload Diff to Review Board fails on 'file not found in the
> repository'
> 
> Yes, that is also the case that happened to me when I encountered exactly
> the same error.
> 
> Thanks
> -min
> 
> On 1/29/13 9:41 AM, "Likitha Shetty" <likitha.she...@citrix.com> wrote:
> 
> >I have seen this error before. I faced it because I had generated 2
> >patches from a set of local commits. So after the first patch was
> >uploaded, review board complained when I tried to upload the second
> >patch. And this was because the second patch was based on top of my
> >first commit which wasn't in the repo yet.
> >
> >Thank you,
> >Likitha
> >
> >-----Original Message-----
> >From: Donal Lafferty [mailto:dlaffe...@gmail.com]
> >Sent: Tuesday, January 29, 2013 9:01 PM
> >To: cloudstack-dev@incubator.apache.org
> >Subject: Upload Diff to Review Board fails on 'file not found in the
> >repository'
> >
> >Has anyone seen the complaint 'The file "<file>" (revision <revision>)
> >was not found in the repository' ?
> >
> >E.g. I get 'The file
> >"agent/src/com/cloud/agent/resource/HypervResource.java" (revision
> >8b8e89d) was not found in the repository' when uploading a diff file
> >created with git format-patch.
> >
> >However, that file is part of my diff, and was never in the
> >cloudstack-git referenced by my patch.
> >
> >
> >
> >The background is that I created a patch for the master branch.  E.g.
> >
> >$ git remote -v
> >hyperv  https://github.com/lafferty/cshv3.git (fetch) hyperv
> >https://github.com/lafferty/cshv3.git (push) origin
> >https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git(fetch)
> >origin
> >https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git(push)
> >
> >$ git format-patch origin/master --stdout > ../hyperV-plugin_06.patch
> >
> >The patch itself describes the creation of the file, an applies index
> >8b8e89d, as show below.
> >
> >1.7.9
> >
> >
> >From 13f9c118c724afb52b0694de539b4e1b3c38e7f7 Mon Sep 17 00:00:00
> 2001
> >From: "U-CC-SVR11\\Administrator" <Administrator@CC-SVR11.(none)>
> >Date: Thu, 15 Nov 2012 19:19:08 +0000
> >Subject: [PATCH 07/96] Starting point for ServerResource for Hyper-V is
> >DummyResource.
> >
> >---
> >.../com/cloud/agent/resource/HypervResource.java   |  227
> >++++++++++++++++++++
> >1 files changed, 227 insertions(+), 0 deletions(-) create mode 100755
> >agent/src/com/cloud/agent/resource/HypervResource.java
> >
> >diff --git a/agent/src/com/cloud/agent/resource/HypervResource.java
> >b/agent/src/com/cloud/agent/resource/HypervResource.java
> >new file mode 100755
> >index 0000000..8b8e89d
> >--- /dev/null
> >+++ b/agent/src/com/cloud/agent/resource/HypervResource.java
> >@@ -0,0 +1,227 @@
> >+// Licensed to the Apache Software Foundation (ASF) under one // or
> >+more contributor license agreements.  See the NOTICE file //
> >+distributed with this work for additional information // regarding
> >+copyright ownership.  The ASF licenses this file // to you under the
> >+Apache License, Version 2.0 (the // "License"); you may not use this
> >+file except in compliance // with the License.  You may obtain a copy
> >+of the License at
> >
> >
> >Later, the file index changes when the file is edited.  E.g.
> >
> >1.7.9
> >
> >
> >From fef4e3f291264224ed1430b3dff1e49bea7930c9 Mon Sep 17 00:00:00
> 2001
> >From: "U-CC-SVR11\\Administrator" <Administrator@CC-SVR11.(none)>
> >Date: Mon, 19 Nov 2012 15:41:26 +0000
> >Subject: [PATCH 09/96] Add min messages for host to register with the
> >management server when it starts up.
> >
> >---
> >.../com/cloud/agent/resource/HypervResource.java   |  200
> >++++++++++++++++++-
> >1 files changed, 189 insertions(+), 11 deletions(-)
> >
> >diff --git a/agent/src/com/cloud/agent/resource/HypervResource.java
> >b/agent/src/com/cloud/agent/resource/HypervResource.java
> >index 8b8e89d..e810ce4 100755
> >--- a/agent/src/com/cloud/agent/resource/HypervResource.java
> >+++ b/agent/src/com/cloud/agent/resource/HypervResource.java
> >@@ -20,14 +20,15 @@ import java.util.ArrayList; import
> >java.util.HashMap; import java.util.List; import java.util.Map;
> >+import java.util.Set;
> >import java.util.UUID;

Reply via email to