Re: Newbie grief

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On 05/03/2012 08:58 PM, Rich Pixley wrote:
> On 5/1/12 16:30 , Felipe Contreras wrote:
>> Show all the hg commands of what you are trying to do, and we can show
>> you how you can achieve the same in git, but much more easily.
> hg init foo
> for i in `yes | head -4000`; do (set -x ; d=`date +%s.%N` ; hg clone foo foo-$d; (cd foo-$d && date > bar && hg add bar && hg ci -m $d)); done
> for i in foo-*; do (set -x ; (cd $i && hg push -f)); done

Here's how that would look in git (though I got rid of the timestamp
stuff and used seq instead):

git init foo
for i in $(seq 1 4000); do git clone foo foo-$i; (cd foo-$i && date > bar && git add bar && git commit -m "$i"; done)
for i in foo-*; do (set -x; (cd $i && git push master:$i/master)); done

The hg recipe creates 4000 branches which I for some reason can't
find the names of so I have no idea how to interact with them. The
git recipe names them explicitly to foo-$i/master in the foo/ repo,
since git doesn't allow pushing of commits without a ref.

Having read further in the thread, I see you did "hg merge" to merge
*all* the branches (which is impressive in itself, doing a 4000-way
merge), but I still don't see how you'd go about merging just one of
them. Perhaps that's not desirable.

Andreas Ericsson         
OP5 AB                   
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Newbies FAQ]     [Linux Kernel Development]     [Free Online Dating]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Free Online Dating]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]     [Linux Resources]

Add to Google