rakelib/scm.rb
changeset 268 da6c28844912
parent 263 dd183640f63e
child 269 e6ccd5be9bcb
--- a/rakelib/scm.rb	Wed Jul 24 10:45:26 2019 +0100
+++ b/rakelib/scm.rb	Wed Jul 24 10:02:21 2019 +0000
@@ -40,7 +40,7 @@
   end
 
   # Make sure CVS_RSH environment variable is properly set. Prefer MSYS2 ssh.exe
-  # over plink.exe. For details, see `hglib.rb`, method `sshconf()`  
+  # over plink.exe. For details, see `hglib.rb`, method `sshconf()`
   module_function
 
   def ensure_cvs_rsh_set
@@ -50,8 +50,8 @@
     ssh_in_path = which('ssh') ? true : false
     plink_in_path = which('plink') ? true : false
     if Gem.win_platform?
-      # If CVS_RSH is not set or is set to plink.exe, try to change to 
-      # MSYS2 ssh.exe as it gives better performance on (fast) LANs.      
+      # If CVS_RSH is not set or is set to plink.exe, try to change to
+      # MSYS2 ssh.exe as it gives better performance on (fast) LANs.
       if /^.*[pP]link(\.exe)?"?\s*(-ssh)?\s*(-2)?$/ =~ ssh_configured
         ssh_in_path ? (ssh = 'ssh') : (ssh = %q{"c:\msys64\usr\bin\ssh.exe"} if File.exist? %q{c:\msys64\usr\bin\ssh.exe})
 
@@ -134,12 +134,12 @@
     hg = HG::Repository.new(wc)
     begin
       paths = hg.paths
-      if repository.staging
-        unless paths.has_key? 'staging'
-          paths['staging'] = "#{repository.staging}/#{directory.gsub('/', separator)}"
+      if repository.origin
+        unless paths.has_key? 'origin'
+          paths['origin'] = "#{repository.origin}/#{directory.gsub('/', separator)}"
           hg.paths = paths
         end
-        hg.pull('staging')
+        hg.pull('origin')
       end
       if repository.upstream
         unless paths.has_key? 'upstream'
@@ -275,16 +275,16 @@
     if repository.upstream
       paths['upstream'] = "#{repository.upstream}/#{directory.gsub('/', separator)}"
     end
-    if repository.staging
-      paths['staging'] = "#{repository.staging}/#{directory.gsub('/', separator)}"
+    if repository.origin
+      paths['origin'] = "#{repository.origin}/#{directory.gsub('/', separator)}"
     end
-    paths['default'] = paths['staging'] || paths['upstream'] || paths['canonical']
+    paths['default'] = paths['origin'] || paths['upstream'] || paths['canonical']
 
     begin
       hg = HG::Repository.init(root / directory)
       # Configure path aliases.
       #
-      # Set the repository as non-publishing, This way when cloning from a staging
+      # Set the repository as non-publishing, This way when cloning from 'origin'
       # repo changes in draft phase would remain drafs. This is  essential to
       # employ evolve extension and being able to fix & evolve changes in clones
       # (on a CI server, for instance) and being able to push back without need to
@@ -297,7 +297,7 @@
           paths: paths
       )
 
-      hg.pull('staging') if repository.staging
+      hg.pull('origin') if repository.origin
       hg.pull('upstream') if repository.upstream
 
       begin