summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d5266a)
raw | patch | inline | side by side (parent: 7d5266a)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 25 Jul 2007 07:27:57 +0000 (03:27 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 25 Jul 2007 08:23:09 +0000 (04:23 -0400) |
I'm storing the URLs of any pre-configured remote repositories
that we happen to come across so that we can later use these
URLs to show to the user in parts of the UI that might care.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
that we happen to come across so that we can later use these
URLs to show to the user in parts of the UI that might care.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/remote.tcl | patch | blob | history |
diff --git a/lib/remote.tcl b/lib/remote.tcl
index e235ca88765090e08707f63096369d56da76d196..cf9b9d582959e62c805a92a86c33e0f3ae7f304e 100644 (file)
--- a/lib/remote.tcl
+++ b/lib/remote.tcl
proc load_all_remotes {} {
global repo_config
global all_remotes tracking_branches some_heads_tracking
+ global remote_url
set some_heads_tracking 0
set all_remotes [list]
catch {
set fd [open [file join $rm_dir $name] r]
while {[gets $fd line] >= 0} {
+ if {[regexp {^URL:[ ]*(.+)$} $line line url]} {
+ set remote_url($name) $url
+ continue
+ }
if {![regexp {^Pull:[ ]*([^:]+):(.+)$} \
$line line src dst]} continue
if {[string index $src 0] eq {+}} {
foreach line [array names repo_config remote.*.url] {
if {![regexp ^remote\.(.*)\.url\$ $line line name]} continue
lappend all_remotes $name
+ set remote_url($name) $repo_config(remote.$name.url)
if {[catch {set fl $repo_config(remote.$name.fetch)}]} {
set fl {}