Commits

Shlomi Fish  committed dd8d5f8

BibBucket hg repo anonymous checkout.

  • Participants
  • Parent commits a58e861

Comments (0)

Files changed (28)

File shlomif-settings/Bash/Themes/common/bitbucket-hg-remote-repo.pl

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Getopt::Long qw(GetOptions);
+
+my $auth = 1;
+
+my $bb_user;
+my $bb_repo;
+
+GetOptions(
+    'user=s' => \$bb_user,
+    'repo=s' => \$bb_repo,
+);
+
+if (!defined ($bb_user))
+{
+    die "user not specified!";
+}
+
+if (!defined ($bb_repo))
+{
+    die "repo not specified!";
+}
+
+if (($ENV{BITBUCKET_USERS} || '') =~ m{,\Q$bb_user\E,})
+{
+    print "ssh://hg\@bitbucket.org/$bb_user/$bb_repo\n";
+}
+else
+{
+    print "https://bitbucket.org/$bb_user/$bb_repo\n";
+}

File shlomif-settings/Bash/Themes/themes/games/abc-path/source.bash

 # c_src="$trunk/nurikabe-solver"
 this="$module"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/abc-path'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="abc-path")"
 
 cd "$this"
 

File shlomif-settings/Bash/Themes/themes/games/black-hole/source.bash

 
 this="$c_src"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/black-hole-solitaire'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="black-hole-solitaire")"
 
 cd "$this"
 

File shlomif-settings/Bash/Themes/themes/games/hitori/source.bash

 solver="$trunk/hitori-solver-in-ruby"
 this="$solver"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/hitori'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="hitori")"
 repos="https://svn.berlios.de/svnroot/repos/fc-solve/hitori/"
 repos_trunk="${repos}trunk/"
 

File shlomif-settings/Bash/Themes/themes/games/kakuro/source.bash

 trunk="$kakuro/trunk"
 solver="$trunk/solver/ruby"
 this="$solver"
-remote_repo='ssh://hg@bitbucket.org/shlomif/kakuro-cross-sums'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="kakuro-cross-sums")"
 
 cd "$this"
 

File shlomif-settings/Bash/Themes/themes/homepage/source.bash

 blog="$HOME/Docs/homepage/blog"
 logs="$HOME/Download/homesite-logs"
 p4n="$trunk/lib/presentations/qp/perl-for-newbies"
-remote_repo='ssh://hg@bitbucket.org/shlomif/shlomi-fish-homepage'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="shlomi-fish-homepage")"
 
 sel="$trunk/lib/screenplay-xml/from-vcs/Selina-Mandrake/selina-mandrake/screenplay/"
 pope="$trunk/lib/fiction-xml/from-vcs/The-Pope-Died-on-Sunday/Pope/text/"

File shlomif-settings/Bash/Themes/themes/nurikabe/source.bash

 trunk="$base/trunk"
 c_src="$trunk/nurikabe-solver"
 module="$c_src/Games-Nurikabe-Solver"
-remote_repo='ssh://hg@bitbucket.org/shlomif/nurikabe'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="nurikabe")"
 
 this="$module"
 

File shlomif-settings/Bash/Themes/themes/perl/dir-dump/source.bash

 hg_base="$base"
 trunk="$base/trunk"
 module="$trunk/File-Dir-Dumper"
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-file-dir-dumper'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-file-dir-dumper")"
 this="$module"
 
 cd "$this"

File shlomif-settings/Bash/Themes/themes/perl/docmake/source.bash

 module="$trunk/modules/App-XML-DocBook-Docmake"
 this="$module"
 test_dir="$HOME/Docs/Svn/Docs/programming/The-Perfect-IT-Workplace/docbook"
-remote_repo='ssh://hg@bitbucket.org/shlomif/docmake'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="docmake")"
 # Make sure that gvim's filename completion ignores filenames that it should
 # not edit.
 

File shlomif-settings/Bash/Themes/themes/perl/find-lines/source.bash

 trunk="$berlios_trunk"
 fl_trunk="$berlios_trunk/File-FindLines/module"
 module="$fl_trunk"
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-file-find-object-rule'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-file-find-object-rule")"
 
 this="$module"
 

File shlomif-settings/Bash/Themes/themes/perl/inifiles/source.bash

 
 base="$HOME/progs/perl/cpan/Config/IniFiles"
 hg_base="$base/hg"
-trunk="$hg_base/config-inifiles"
+trunk="$hg_base/perl-config-inifiles"
 module="$trunk/config-inifiles"
 
 this="$module"

File shlomif-settings/Bash/Themes/themes/perl/io/socket/inet6/source.bash

 module="$trunk/modules/IO-Socket-INET6"
 this="$module"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-io-socket-inet6'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-io-socket-inet6")"
 # Make sure that gvim's filename completion ignores filenames that it should
 # not edit.
 

File shlomif-settings/Bash/Themes/themes/perl/nav-menu/source.bash

 read_repos_url="http://svn.berlios.de/web-cpan/nav-menu"
 test_dir="$trunk/tests/integration/sites-gen"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-html-widgets-navmenu'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-html-widgets-navmenu")"
 
 __dist_name()
 {

File shlomif-settings/Bash/Themes/themes/perl/qantor/source.bash

 hg_base="$base"
 trunk="$base/trunk"
 this="$trunk/Text-Qantor"
-remote_repo='ssh://hg@bitbucket.org/shlomif/qantor'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="qantor")"
 rw_repos_url="https://svn.berlios.de/svnroot/repos/web-cpan/Text-Qantor"
 read_repos_url="http://svn.berlios.de/svnroot/repos/web-cpan/Text-Qantor"
 

File shlomif-settings/Bash/Themes/themes/perl/stats/source.bash

 
 inst_modules_dir="$HOME/apps/perl/modules"
 modules_makefile="${build_scripts_dir}/Modules.mak"
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-statistics-descriptive'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-statistics-descriptive")"
 
 PATH="$inst_modules_dir/bin/:$PATH"
 

File shlomif-settings/Bash/Themes/themes/perl/test/count/source.bash

 load_common hg
 # load_common gen_patch
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-test-count'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-test-count")"
 
 base="$HOME/progs/perl/cpan/Test/Count"
 hg_base="$base"

File shlomif-settings/Bash/Themes/themes/perl/test/run/source.bash

 inst_modules_dir="$HOME/apps/perl/modules"
 modules_makefile="${build_scripts_dir}/Modules.mak"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-test-run'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-test-run")"
 PATH="$inst_modules_dir/bin/:$PATH"
 # export PERL5LIB="$inst_modules_dir/lib/perl5/site_perl/$__perl_version/:$inst_modules_dir/lib/perl5/$__perl_version"
 

File shlomif-settings/Bash/Themes/themes/perl/test/www/mech/mojo/source.bash

 trunk="$base/trunk"
 module="$trunk/Test-WWW-Mechanize-Mojo"
 this="$module"
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-test-www-mechanize-mojo'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-test-www-mechanize-mojo")"
 
 PATH="$inst_modules_dir/bin/:$PATH"
 # export PERL5LIB="$inst_modules_dir/lib/perl5/site_perl/$__perl_version/:$inst_modules_dir/lib/perl5/$__perl_version"

File shlomif-settings/Bash/Themes/themes/perl/xml/libxml/source.bash

 hg_base="$base/hg"
 trunk="$hg_base/perl-xml-libxml"
 this="$trunk"
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-xml-libxml'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-xml-libxml")"
 
 xslt_base="$HOME/progs/perl/cpan/XML/LibXSLT"
 xslt_hg_base="$HOME/progs/perl/cpan/XML/LibXSLT/hg"

File shlomif-settings/Bash/Themes/themes/perl/xml/semantic-diff/source.bash

 module="$trunk/perl/modules/XML-SemanaticDiff"
 this="$module"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-xml-semanticdiff'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-xml-semanticdiff")"
 # This is so "make dist" won't complain when the file already exists.
 export GZIP="-f"
 

File shlomif-settings/Bash/Themes/themes/qp/source.bash

 this="$trunk/installer"
 site="$trunk/site"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/quad-pres'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="quad-pres")"
 
 cd "$this"
 

File shlomif-settings/Bash/Themes/themes/sites/web-cpan/source.bash

 trunk="$base/trunk"
 site="$trunk/wml"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/web-cpan-site'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="web-cpan-site")"
 
 this="$site"
 cd "$this"

File shlomif-settings/Bash/Themes/themes/wml/itself/source.bash

 # this="$trunk/src/wml_backend"
 this="$src"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/website-meta-language'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="website-meta-language")"
 cd "$this"
 
 prompt()

File shlomif-settings/Bash/Themes/themes/wml/latemp/source.bash

 # test_dir="$trunk/tests/integration/sites-gen"
 modules="$trunk/Perl/modules"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/latemp'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="latemp")"
 
 # Make sure that gvim's filename completion ignores filenames that it should
 # not edit.

File shlomif-settings/Bash/Themes/themes/xml/compare-ml/source.bash

 rw_repos_url="svn+ssh://svn.berlios.de/svnroot/repos/web-cpan/xml-compareml"
 read_repos_url="svn://svn.berlios.de/web-cpan/xml-compareml"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/xml-compareml'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="xml-compareml")"
 # Make sure that gvim's filename completion ignores filenames that it should
 # not edit.
 

File shlomif-settings/Bash/Themes/themes/xml/fiction/source.bash

 fict="$modules_dir/XML-Grammar-Fiction"
 this="$fict"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/fiction-xml'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="fiction-xml")"
 
 __dist_name()
 {

File shlomif-settings/Bash/Themes/themes/xml/fortune/source.bash

 module="$trunk/XML-Grammar-Fortune/module"
 this="$module"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/fortune-xml'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="fortune-xml")"
 
 __dist_name()
 {

File shlomif-settings/Bash/Themes/themes/xml/grammar-base/source.bash

 grammar_base="$trunk/XML-GrammarBase"
 this="$grammar_base"
 
-remote_repo='ssh://hg@bitbucket.org/shlomif/perl-xml-grammarbase'
+remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="perl-xml-grammarbase")"
 
 __dist_name()
 {