Uploading .diff files on reviewboard

5 views
Skip to first unread message

Rahul Sharma

unread,
Feb 26, 2012, 2:30:51 PM2/26/12
to kde-...@kde.org
Hi,
I am trying to upload my .diff file on the reviewboard through the web UI for reviewboard, but I am getting error.
It always says that the file I uploaded is not .diff file even I am uploading the file of the .diff extension.

Any suggestions??

Regards,
Rahul Sharma

Ömer Fadıl USTA

unread,
Feb 26, 2012, 3:40:09 PM2/26/12
to kde-...@kde.org, rahulve...@gmail.com
how can you generate your diff ?
try to make diff like this
diff -ruNp /path/to/original/file.c /path/to/file.c.orig > patchname.patch

>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
>>> <<
>

--
Ömer Fadıl USTA
http://www.bilisimlab.com/

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Thomas Lübking

unread,
Feb 26, 2012, 3:48:02 PM2/26/12
to kde-...@kde.org

The reviewboard is pretty picky about diffs.
Create them using "git diff <hash>" of "git format-patch <hash>", eg
git format-patch HEAD~3
will create diffs for the 3 latest commits
while
git diff HEAD~2
will create one patch against the branch as it was two commits ago.

The reviewboard will also reject diffs against hashes it doesn't know
(because they only exist in your local branch) - for this purpose you can
create a diff agains a common hash and supply that as parenting patch.


Cheers,
Thomas

Rahul Sharma

unread,
Mar 1, 2012, 6:45:11 AM3/1/12
to kde-...@kde.org
Hi Thomas,
I created the diff the same way as you said and perhaps reviewboard accepted that. But I encountered another error. It says:
The file 'home/rahul/kmplot/kmplot/ksliderwindow.cpp' (r7ca8503) could not be found in the repository. after I have uploaded my diff.

And I don't know what does that mean. So, could you please tell me?

Regards,
Rahul Sharma.

Thomas Lübking

unread,
Mar 1, 2012, 11:23:30 AM3/1/12
to kde-...@kde.org, Rahul Sharma
Am 01.03.2012, 12:45 Uhr, schrieb Rahul Sharma <rahulve...@gmail.com>:

> *The file 'home/rahul/kmplot/kmplot/ksliderwindow.cpp' (r7ca8503) could
> not
> be found in the repository. *after I have uploaded my diff.


>
> And I don't know what does that mean. So, could you please tell me?

It means that the commit patch itself bases upon other commits which are
not included in the patch and make it not a direct diff to one of the
public git branches of the repository.
Depending on what you try to do, either combine your commits with "git
rebase -i HEAD~n" or create a complete patch against the last public
commit in your branch "git diff HEAD~n", "n" is the amount of commits you
did when branching.
If you branched long time ago, maybe first "git fetch; git rebase
<parenting branch name>" eg. "git fetch; git rebase origin/KDE/4.8" or
"git fetch; git rebase origin/master" to pre-resolve pot. conflicts.

Stephan Diestelhorst

unread,
Mar 22, 2012, 11:26:11 AM3/22/12
to kde-...@kde.org
On 26 February 2012 21:48, Thomas Lübking <thomas....@gmail.com> wrote:
> Am 26.02.2012, 20:30 Uhr, schrieb Rahul Sharma <rahulve...@gmail.com>:
>
>
>> Hi,
>> I am trying to upload my .diff file on the reviewboard through the web UI
>> for reviewboard, but I am getting error.
>> It always says that the file I uploaded is not .diff file even I am
>> uploading the file of the .diff extension.
>>
>> Any suggestions??
>
>
> The reviewboard is pretty picky about diffs.
> Create them using "git diff <hash>" of "git format-patch <hash>", eg
> git format-patch HEAD~3
> will create diffs for the 3 latest commits
> while
> git diff HEAD~2
> will create one patch against the branch as it was two commits ago.
>
> The reviewboard will also reject diffs against hashes it doesn't know
> (because they only exist in your local branch) - for this purpose you can
> create a diff agains a common hash and supply that as parenting patch.

I had to do

git format-patch --full-index origin/master

with rebased changes already committed locally.

Stephan

Reply all
Reply to author
Forward
0 new messages