Questions on adding a new module in ns-3

53 views
Skip to first unread message

Mike Lien

unread,
Mar 27, 2014, 3:48:18 AM3/27/14
to ns-3-...@googlegroups.com
To begin with, I am completely new to Mercurial and Rietveld.

Recenlty, I have been trying to submit a code to the ns-3 working group.

I have completed the following tasks:

1. I have created a repository with Mercurial.
   The link is provided here: https://bitbucket.org/ChronoGen/wimax16m/src

2. I did manually click on the repositories of codereview.appspot.com
   As shown as the link, a new wimax16m module can be found at: https://codereview.appspot.com/repos

Here are my questions,

1. I did not understand the use of upload.py.
   - To be more specific, what I did understand was to use Mercurial (diff) and upload.py
  
   But the problem is that when I try to follow the guide online, I did not quite understand what commands have to be taken.

2. What is the next step? Am I done with the submission? or is there more?

Thanks

Tommaso Pecorella

unread,
Mar 27, 2014, 6:28:55 PM3/27/14
to ns-3-...@googlegroups.com
Hi Mike,

thanks for the contribution, but... the bitbucket project is private. As a consequence, I can't check it.

About the other questions, the process is this:
1) Clone ns-3-dev and find the revision number.
The "revision" number is a progressive number and it's maintained by mercurial.

The easiest way to find it is to issue the command "hg tip". the result is something like:

23:20:32:~/Development/workspace/ns-3-dev pecos$ hg tip

changeset:   10684:156ee4e1f4aa

tag:         tip

user:        Biljana Bojović <biljana...@gmail.com>

date:        Wed Mar 26 23:47:30 2014 +0100

summary:     Bug 1888 - COST231 propagation loss model: corrections


23:20:34:~/Development/workspace/ns-3-dev pecos$ 


The red number is the revision.

2) Add your modifications. I strongly suggest to use mercurial queues (http://mercurial.selenic.com/wiki/MqExtension). In this way you can push and pop your changes and keep the "base" code updated.

3) Use the command:
./upload.py --rev=10684 --cc=ns-3-r...@googlegroups.com

the script will take care of the rest.

Grab the URL, e.g., "Issue created. URL: http://codereview.appspot.com/<somenumber>"
That's the url you have to share. Otherwise we'll never find your code revision in the code review website.

If you have further questions, feel free to ask. Any module improvement is always welcome.

Cheers,

T.

Mike Lien

unread,
Mar 28, 2014, 4:32:13 AM3/28/14
to ns-3-...@googlegroups.com
Thanks T, it really helped on me understand the process.

One last question, I tried to push and ./upload.py the update, but I keep on getting "Permission denied" feedback.

Is there anyway I can register to get access?

Tommaso Pecorella於 2014年3月28日星期五UTC+8上午6時28分55秒寫道:

Tommaso Pecorella

unread,
Mar 28, 2014, 4:52:57 AM3/28/14
to ns-3-...@googlegroups.com
Hi,

you need a google mail account, but I guess you have it.

Where do you receive that error ?

Cheers,

T.

Mike Lien

unread,
Mar 28, 2014, 4:58:21 AM3/28/14
to ns-3-...@googlegroups.com
This is what I've got currently

// chronogen@chronogen-P5QL-PRO:~/ns-3-dev$ hg push ssh://co...@code.nsnam.org/repos/ns-3-dev
// pushing to ssh://co...@code.nsnam.org/repos/ns-3-dev
// remote: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
// abort: no suitable response from remote hg!

// chronogen@chronogen-P5QL-PRO:~/ns-3-dev$ cd ..
// chronogen@chronogen-P5QL-PRO:~$ ./upload.py --rev=10686 --cc=ns-3-r...@googlegroups.com
// bash: ./upload.py: Permission denied
// chronogen@chronogen-P5QL-PRO:~$

Sincerely,

Mike

Tommaso Pecorella於 2014年3月28日星期五UTC+8下午4時52分57秒寫道:

Tommaso Pecorella

unread,
Mar 28, 2014, 6:46:09 AM3/28/14
to ns-3-...@googlegroups.com
Hi,

On Friday, March 28, 2014 9:58:21 AM UTC+1, Mike Lien wrote:
This is what I've got currently

// chronogen@chronogen-P5QL-PRO:~/ns-3-dev$ hg push ssh://co...@code.nsnam.org/repos/ns-3-dev
// pushing to ssh://co...@code.nsnam.org/repos/ns-3-dev
// remote: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
// abort: no suitable response from remote hg!

This have to be done if (and only if) you're allowed to push in the ns-3-dev tree.
Only the module's maintainers can do this, in order to prevent honest mistakes.
As a consequence, it's pretty normal that you can't do it.

// chronogen@chronogen-P5QL-PRO:~/ns-3-dev$ cd ..
// chronogen@chronogen-P5QL-PRO:~$ ./upload.py --rev=10686 --cc=ns-3-r...@googlegroups.com
// bash: ./upload.py: Permission denied
// chronogen@chronogen-P5QL-PRO:~$

"upload.py" should be used from within the ns-3-dev folder. Either move it into ns-3-dev or call it from that folder by using "../upload.py" (double dot).
Moreover, check "upload.py" permissions. It seems that it's not an executable file and/or that you don't have the permissions to run it.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages