tags:

views:

47

answers:

2

This is the site http://hg.sagemath.org which has Mercurial repository. I have to collect all name tags first and when you click one of the name tags respective link gets open which has all files or directory which I need to copy to local directory if there is any changed. My setup will be as below the command prompt

  1. login to the Mercurial site.
  2. get the name tags.
  3. get link with refer to name tag (i.e, href attribute).
  4. update the local directory if there is changed in remote site.

Please let me know how could I achieve this? need urgent help..

+1  A: 

First off "need urgent help" is likely to make your responses slower. Don't say that.

Second, those repositories are actually being served via HTTP. You can do hg clone http://hg.sagemath.org/examples to get a local copy of the examples repository. So:

for i in examples extcode-main sage-main scripts-main; do
    hg clone http://hg.sagemath.org/$i;
done
Borealid
Hi Borealid, Thanks for your valuable reply.our company's mercurial site there is some other url when u click on name label(like let says if i click examples in http://hg.sagemath.org ,url will i get is http://hg.sagemath.org/examples/08976700 like this. ).so i want to get that first.i don't know which command does that job.sorry that i don't mention this first.do you have any idea about how could i get url which assocaited with name label.thanks for your reply
deepakm
Borealid: I simplified the script to just use `hg clone` since `hg clone == hg init + hg pull` with the advantage that clone also adds a suitable `.hg/hgrc` file (as I'm sure you already know).
Martin Geisler
@Martin: Thanks. The reason I had the pull instead of clone was b/c after the first run, he'd need a `pull -u` to keep the stuff up to date.
Borealid
Re: the number (08976700 in hg.sagemath.org/examples/08976700) is the latest revision number, you can ignore that, it's only used for browsing per revision.
Ton
@Borealid: ah, I didn't catch that :-)
Martin Geisler
A: 

hi, please anyone give me any suggention on above annswer's comment which i mention earlier.

thanks,

deepakm