kshakya | UCOSP: Pony-Build

Branch problems with build-nose script

Posted in Uncategorized by kshakyaz on March 28, 2010

It seems that my build-script is still in the old master branch of which Titus has no access and is incompatible with his branch. So he suggested me to create a new branch and add the file to it. But during this process, I came across many problems.

When I try to push, I get a non fast forward error.

Khushboo@KHUSHBOO-PC ~/Desktop/pony-build1/client (master)
$ git push git@github.com:kshakya/pony-build.git
To git@github.com:kshakya/pony-build.git
! [rejected]        master -> master (non-fast forward)
error: failed to push some refs to ‘git@github.com:kshakya/pony-build.git’
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again.  See the ‘non-fast forward’
section of ‘git push –help’ for details.

To remove this error, I tried to pull from Titus’s repository which told me that everything was up to date which should not have happened.

Khushboo@KHUSHBOO-PC ~/Desktop/pony-build1/client (master)
$ git pull git://github.com/ctb/pony-build.git master
From git://github.com/ctb/pony-build
* branch            master     -> FETCH_HEAD
Already up-to-date.

So, I did the following:
git fetch git://github.com/ctb/pony-build.git master:titus
git checkout titus

I found out that ‘git pull’ does a merge, while ‘get fetch’ does a complete replace.  After this, I was able to do a regular push.

I also saw two files :build-nose~HEAD and build-nose~HEAD_0. I am not sure what it means.

Khushboo@KHUSHBOO-PC ~/Desktop/pony-build1/client (master)
$ ls
build-coverage     build-mechanize.py  build-pygr       test-git
build-cpython      build-nose          build-pygr-exp   test-virtualenv
build-cpython-win  build-nose.py       build-quixote    test_client
build-cpython3     build-nose~HEAD build-twill      upload-example
build-distutils2   build-nose~HEAD_0 build-zope
build-example      build-pb-env        pony_client.py
build-figleaf      build-pony-build    pony_client.pyc

I also see that I have two heads.
Khushboo@KHUSHBOO-PC ~/Desktop/pony-build1/client (master)
$ git show-ref master
35c119b3aa23ad2c467cc5aeb46728d39eefc680 refs/heads/master
6a7507a9e96dd884086c250a22976d393397ac86 refs/remotes/origin/master


UCOSP blog update!

Posted in Uncategorized by kshakyaz on March 26, 2010

Here is the link to this week’s UCOSP blog update:



This week on mechanize

Posted in Uncategorized by kshakyaz on March 22, 2010

This week, I came across small and big stuffs.  I remove the nose_problem6 branch which worked easily this time.

git push git@github.com:kshakya/pony-build.git :nose_problem6

Last week’s problem is still there. I found out what the problem is from last week’s conference call. After the pony_client was refactored, the cache_dir is never called or checked. This needs to be included in the code.

One quick fix for time being was to create a directory


More on mechanize..

Posted in Uncategorized by kshakyaz on March 14, 2010

I haven’t able to do much this week either. But here is what I did so far. I removed all the extra branches from my repository and fetched from Titus’s master branch in order to pull the fresh code from Titus branch. It tells me that it is up-to- date which I don’t think so. Also when I try running it, it tells me that a file “.pony-build” is missing. After talking to Titus, I found out that it is a directory that has all the cached copies of various source code repos that I am building. It is suppose to be created automatically by pony-client but in my case, I don’t see it anywhere. So it seems like it is a bug. More on this soon!

UCOSP blog update

Posted in Uncategorized by kshakyaz on March 13, 2010

Here is the link to the blog update.



Problems with Mechanize

Posted in Uncategorized by kshakyaz on March 7, 2010

Last time I ran into a windows error where it was not finding the subprocess.py file. I came to know that I didn’t have a updated version of pony-client file. So I pulled it but came across other problems. So to avoid all these problems and ust to get my code running, I copied the updated pony-client from Titus’s repo and tried running it. Now I have other problems:

Khushboo@KHUSHBOO-PC ~/Desktop/pony-build1/client (testbranch)
$ python build-mechanize.py
running: checkout (setup)
Traceback (most recent call last):
File “build-mechanize.py”, line 33, in <module>
results = do(name, commands, context=context)
File “C:\Users\Khushboo\Desktop\pony-build1\client\pony_client.py”, line 755,
in do
File “C:\Users\Khushboo\Desktop\pony-build1\client\pony_client.py”, line 451,
in run
WindowsError: [Error 2] The system cannot find the file specified: ‘c:/Users/Khu

I will update on it more later.

Working with mechanize.

Posted in Uncategorized by kshakyaz on February 28, 2010

For my next build script, I chose the mechanize package.  Unlike the previous nose package, mechanize uses the SvnUpdate to checkout source code. So far, everything works fine. The build runs but the test fails. The error that I see has something to do with not being able to find the  subprocess.py file. Here is the error that I get:

Traceback (most recent call last): File “C:\Users\Khushboo\Desktop\pony-build1\client\pony_client.py”, line 82, in _run_command p = subprocess.Popen(command_list, cwd=cwd, **default_kwargs) File “c:\Python26\lib\subprocess.py”, line 621, in __init__ errread, errwrite) File “c:\Python26\lib\subprocess.py”, line 830, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified

I think one of my team members encountered the same problem. I will probably discuss about this in the meeting.

Midway Update

Posted in Uncategorized by kshakyaz on February 28, 2010

Please read my midway update in the UCOSP blog. Here is the link:


Thank you!

Brush ups and clean ups

Posted in Uncategorized by kshakyaz on February 25, 2010

Today I made some additional changes. I renamed my file from build-nose.py to just build-nose and also changed line 17 name to just “nose”. And finally pushed it back to my  github. Apart from that I removed all the additional branches that I had in github so now its neat and clean and there is more confusion. Thats it so far.


Posted in Uncategorized by kshakyaz on February 24, 2010

I finally got my build script for nose package working. There was a lot that happened within this past few days. As I mentioned in my earlier post, I was stuck in an infinite loop of non-fast forward and conflicting merge errors. But with the help of good advisers and dear friends, I got it all sorted out.

First I removed all my pony-build stuff from the current location to a new location and renamed the folder. From the command line, I created a new directory and changed my directory to it.

mkdir ponybuild1

cd ponybuild1

Then I cloned everything again from github.

git clone git@github.com:kshakya/pony-build.git

Now, I have fresh copy from the repo. I then created a new branch in my repo called nose_problem6 since I wasn’t being able to push anything to the master branch.

git checkout -b nose_problem6

This command will create the branch and will also switch you to the same branch.  “checkout” will change and branch and “-b” will create the branch. So after this command you are in the nose_problem6 branch. After this, I did added my file, committed and  and pushed it. Also I made nose_problem6 my default branch in github.

git add build-nose.py

git commit

git push git@github.com:kshakya/pony-build.git nose_problem6

Along with push and pull, I also did some changes in my code. In my build-nose.py file, I changed line 10 from python26 to just python. Now in the pony_client.py file, a lot of changes were done.  A function to create a cache_dir was added. Some lines like line 539 and 545 were commented out. You can view the code here.


Finally I want to thank everyone who helped me get through this directly or indirectly. Max for fixing the HgClone, Titus for being so patient even after my frustrating emails, Rose for being always there and for helping me with the merge  conflicts and Fatima for whom my problems become way to simple after her huge indentation problem…LOL! And also my sister and my dear friend Dale who who listened to all my frustration 😀  [ PS–>As stupid as this last paragraph may seem, I think I have to thank them for being such nice people!!]