Commits

Paul Nathan committed d9e73a2

New features: grout, grin. Change: now grupdate instead of grsync.

Added grout and grin to correspond with hg out, in.

Grsync confused everyone that it was explained to - people thought it
was a network operation. So grupdate.

Known bug - this may freeze when ssh is multiplexed.

  • Participants
  • Parent commits c6a9e12

Comments (0)

Files changed (18)

File guestrepo/__init__.py

     The .hggrmapping file lists remote paths in the following INI format:
 
        name = remote-path
-    
+
     If a remote repository is moved, the path referenced by a name can be
     updated to point to the new location.
 
     mercurial repository.
 '''
 
-from guestrepo import pull, push, sync, \
-                      freeze, summary, state
+from guestrepo import pull, push, grupdate, freeze, summary, state, grout, grin
+
 import convert
-
 import lockedui
 
 
    "grpush": (push,
               localopt + threadopt,
               "hg grpush [REPO [+]] [options]"),
-   "grsync": (sync,
+   "grupdate": (grupdate,
               localopt + threadopt,
-              "hg grsync [REPO [+]] [options]"),
+              "hg grupdate [REPO [+]] [options]"),
    "grfreeze": (freeze,
               [],
               "hg grfreeze"),
    "grstate": (state,
               [],
               "hg grstate"),
+   "grout" : (grout,
+              threadopt,
+              "hg grout"),
+   "grin" : (grin,
+             threadopt,
+              "hg grin"),
    "grconvert": (convert.convert,
          [('b', 'branch', False,
            "write the current branch of each subrepo instead of the changeset")

File guestrepo/guestrepo.py

 #####################
 # Commands
 #####################
-def sync(ui, repo, *args, **opts):
+def grupdate(ui, repo, *args, **opts):
     '''update guest repos
 
     Update each guest repo to the changeset identifier in the .hgguestrepo file.
     A warning will be raised if a guest is updated to a branch with multiple
     heads.
 
-    Sync is recursive. If the update operation adds a new guest, it is
+    Grupdate is recursive. If the update operation adds a new guest, it is
     cloned to the newly added identifier.
 
-    Sync will present an error and do nothing if there are local changes in any
+    Grupdate will present an error and do nothing if there are local changes in any
     guest repository.
     This prevents the update from causing a merge with local changes.
 
         raise util.Abort("repository %s contains uncommitted changes" % path)
 
     def syncaction(ui, repo, guest):
-        ui.status('syncing %s\n' % guest.canonpath)
+        ui.status('GR updating %s\n' % guest.canonpath)
         warnbranch(ui, guest.name, repo, guest.csid)
         commands.update(ui, repo, guest.csid)
 
     Pull each guest repo from the location specified in the mapping file.
     If any guest repo does not exist it is cloned and updated to the specified
     changeset id in the .hgguestrepo file.
-    See sync for information on how guests are updated.
+    See grupdate for information on how guests are updated.
     A pull to an existing repo will not update.
 
     Pull is run recursively on guest repositories.
     statestr = getstatestr(ui, repo, guests)
     repo.wwrite(GR_CONFIG, statestr, '')
 
+def grout(ui, repo, **opts):
+   """
+   List the outgoing changes for all guestrepos.
+   """
+   guests = getguests(repo)
+
+   mapping = True
+
+   def action(ui, repo, guest):
+      commands.outgoing(ui, repo, guest.uri)
+
+   workers = makeworkers(ui, opts)
+
+   try:
+      applyguests(ui, repo, guests, workers, action,
+                    [], mapping, False)
+   finally:
+      workers.join()
+   if len(workers.errors) > 0:
+      showerrors(ui, workers)
+      return 1
+   else:
+      return 0
+
+
+def grin(ui,repo,**opts):
+   """
+   List the incoming changes for all guestrepos.
+   """
+   guests = getguests(repo)
+
+   # just say no for now
+   opts['bundle'] = None
+   opts['force'] = False
+
+   mapping = True
+
+   def action(ui, repo, guest):
+      commands.incoming(ui, repo, guest.uri, **opts)
+
+   workers = makeworkers(ui, opts)
+
+   try:
+      applyguests(ui, repo, guests, workers, action,
+                    [], mapping, False)
+   finally:
+      workers.join()
+   if len(workers.errors) > 0:
+      showerrors(ui, workers)
+      return 1
+   else:
+      return 0
+
+
 #####################
 
 class guestrepo(object):

File guestrepo/workerpool.py

 
 # This must work with python 2.4
 
-import Queue
+from collections import deque   # pop and append are threadsafe
+import time
 import threading
 import sys
 
         '''
         if nthreads < 1:
             raise ValueError("number of threads must be at least one")
-        self.commands = Queue.Queue()
-        self.active = True
+        self.commands = deque()
+        self.active_status = True
+        self.activelock = threading.RLock()
         self.threads = []
         self.errors = []
-        self.errorslock = threading.Lock()
+        self.errorslock = threading.RLock()
 
         # emulate Queue.task_done in python >= 2.5
         self.ntaskstodo = 0
-        self.ntaskslock = threading.Lock()
+        self.ntaskslock = threading.RLock()
 
         def runcommands():
-            while self.active or self.gettasks() > 0:
+            while self.active() or self.gettasks() > 0:
+                # some windows installs of hg are missing parts of their
+                # standard library, we might not be able to import queue.
+                # Who needs it? We will make do by polling a deque.
                 try:
-                    (func, assoc) = self.commands.get(True,
-                                                      timeout=self.POLL_DELAY)
-                except Queue.Empty:
+                    (func, assoc) = self.commands.pop()
+                except IndexError:
+                    time.sleep(self.POLL_DELAY)
                     continue
                 try:
                     try:
 
         for i in range(nthreads):
             thread = threading.Thread(target=runcommands)
+            self.threads.append(thread)
             thread.start()
-            self.threads.append(thread)
-
-    def inctasks(self):
-        self.ntaskslock.acquire()
-        self.ntaskstodo += 1
-        self.ntaskslock.release()
 
     def dectasks(self):
         self.ntaskslock.acquire()
         self.errorslock.release()
 
     def run(self, func, assoc):
-        self.inctasks()
-        self.commands.put((func, assoc), block=True)
+       self.ntaskslock.acquire()
+       self.ntaskstodo += 1
+       self.commands.appendleft((func, assoc))
+       self.ntaskslock.release()
+
+    def set_active(self, status):
+       self.activelock.acquire()
+       self.active_status = status
+       self.activelock.release()
+
+       # in case we chain this in a fluent interface
+       return status
+
+    def active(self):
+       self.activelock.acquire()
+       status = self.active_status
+       self.activelock.release()
+
+       return status
+
 
     def join(self):
-        self.active = False
+        self.set_active(False)
         for thread in self.threads:
             thread.join()

File tests/run.sh

 # Make a temporary hgrc for testing
 export HGUSER=`whoami`
 export HGRCPATH=`mktemp`
+echo "[ui]" >> $HGRCPATH
+echo username = jenkins >> $HGRCPATH
 echo "[extensions]" >> $HGRCPATH
 echo guestrepo = `readlink -f ../guestrepo` >> $HGRCPATH
 echo bookmarks = >> $HGRCPATH

File tests/test-convert.t

   $ hg commit -m 3 >> /dev/null 2>&1
 
   $ rm -rf one two three
-  $ hg grsync
+  $ hg grupdate
   cloning three
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved

File tests/test-dirtyupdate.t

+# Guestrepo: A Mercurial Extension for the managing of components
+# Copyright (C) 2012   Schweitzer Engineering Laboratories, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Contact information:
+
+# opensource@selinc.com
+
+# Schweitzer Engineering Laboratories, Inc.
+# 2350 NE Hopkins Court
+# Pullman, WA 99163 - USA
+
+Make a guest repo:
+  $ mkdir gr1
+  $ cd gr1
+  $ hg init
+  $ echo c0 > f
+  $ hg add f
+  $ hg commit -m 0
+  $ cd ..
+
+Make host repo
+  $ mkdir host
+  $ cd host
+  $ hg init
+  $ echo c0 > f
+  $ echo mygr1 = mygr1-name default >> .hgguestrepo
+  $ echo mygr1-name = `readlink -f -n ../gr1` >> .hggrmapping
+  $ hg add f .hggrmapping .hgguestrepo
+  $ hg commit -m 0
+
+Test when host is modified:
+  $ echo change > f
+  $ hg grupdate
+  abort: repository /tmp/*/test-dirtyupdate.t/host contains uncommitted changes (glob)
+  [255]
+
+Test when deleted
+  $ rm f
+  $ hg grupdate
+  abort: repository /tmp/*/test-dirtyupdate.t/host contains uncommitted changes (glob)
+  [255]
+
+Test when removed
+  $ hg up -C
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg remove f
+  $ hg grupdate
+  abort: repository /tmp/*/test-dirtyupdate.t/host contains uncommitted changes (glob)
+  [255]
+
+Test when added
+  $ hg up -C
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ touch f2
+  $ hg add f2
+  $ hg grupdate
+  abort: repository /tmp/*/test-dirtyupdate.t/host contains uncommitted changes (glob)
+  [255]
+
+Clone child
+  $ hg up -C
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg grupdate
+  cloning mygr1
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+Test recursive behavior
+  $ hg up -C
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo changed > mygr1/f
+  $ hg grupdate
+  abort: repository /tmp/*/test-dirtyupdate.t/host/mygr1 contains uncommitted changes (glob)
+  [255]

File tests/test-freeze.t

   $ hg add .hgguestrepo .hggrmapping
   $ hg commit -m 0
 
-  $ hg grsync
+  $ hg grupdate
   cloning mygr
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved

File tests/test-guest-arguments.t

   $ hg commit -m 1
 
 Test cloning one guest
-  $ hg grsync one
+  $ hg grup one
   cloning one
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Clone others
-  $ hg grsync two three
+  $ hg grup two three
   cloning two
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Test with absolute path
-  $ hg grsync `readlink -f -n one`
-  syncing one
+  $ hg grupdate `readlink -f -n one`
+  GR updating one
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Test from subdirectory
   $ mkdir sub
   $ cd sub
-  $ hg grsync ../one
-  syncing one
+  $ hg grupdate ../one
+  GR updating one
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd ..
 
 Test from outside the repository
   $ cd ..
-  $ hg grsync -R host ./host/one
-  syncing one
+  $ hg grupdate -R host ./host/one
+  GR updating one
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Test missing guests
   $ cd host
-  $ hg grsync nonexistant
+  $ hg grupdate nonexistant
   abort: nonexistant is not a guest repository
   [255]
 

File tests/test-guestisparent.t

   $ hg add .hgguestrepo .hggrmapping
   $ hg commit -m 0
 
-  $ hg grsync
+  $ hg grupdate
   abort: guest path 'indirection/../.' refers to parent repository!
   [255]

File tests/test-in.t

+# Guestrepo: A Mercurial Extension for the managing of components
+# Copyright (C) 2012   Schweitzer Engineering Laboratories, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Contact information:
+
+# opensource@selinc.com
+
+# Schweitzer Engineering Laboratories, Inc.
+# 2350 NE Hopkins Court
+# Pullman, WA 99163 - USA
+
+Pull and sync perform the same action on nonexistant repos.
+
+This file tests that repos are cloned correctly
+
+  $ TESTDIR=`pwd`
+
+Make a guest repo:
+  $ mkdir gr1
+  $ cd gr1
+  $ hg init
+  $ echo c0 > f
+  $ hg add f
+  $ hg commit -m 0
+  $ cd ..
+
+Make another guest repo:
+  $ mkdir gr2
+  $ cd gr2
+  $ hg init
+  $ echo c02 > g
+  $ hg add g
+  $ hg commit -m 0
+  $ cd ..
+
+Make host:
+  $ mkdir host
+  $ cd host
+  $ hg init
+  $ echo mygr1 = mygr1-name default >> .hgguestrepo
+  $ echo mygr1-name = `readlink -f -n ../gr1` >> .hggrmapping
+  $ echo mygr2 = mygr2-name default >> .hgguestrepo
+  $ echo mygr2-name = `readlink -f -n ../gr2` >> .hggrmapping
+  $ hg add .hgguestrepo .hggrmapping
+  $ hg commit -m 0
+  $ cd ..
+
+Test Pull with clone:
+  $ cd host
+  $ hg grpull
+  cloning mygr1
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  cloning mygr2
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd ..
+
+Add new changeset to guest1 (not guest2)
+
+  $ cd gr1
+  $ echo c1 >> f
+  $ hg commit -m "adding something"
+  $ echo c1 >> f
+  $ hg commit -m "adding something"
+  $ cd ..
+
+
+Test Pull with clone:
+  $ cd host
+  $ hg grin
+  comparing with /tmp/cramtests-*/test-in.t/gr1 (glob)
+  searching for changes
+  changeset:   1:* (glob)
+  user:        * (glob)
+  date:        .+ (re)
+  summary:     adding something
+  
+  changeset:   2:* (glob)
+  tag:         tip
+  user:        * (glob)
+  date:        .+ (re)
+  summary:     adding something
+  
+  comparing with /tmp/cramtests-*/test-in.t/gr2 (glob)
+  searching for changes
+  no changes found
+
+
+
+
+
+
+
+  $ cd ..
+
+clean up:
+  $ cd $TESTDIR/host
+  $ rm -rf many

File tests/test-invalidinput.t

   $ hg add .hggrmapping .hgguestrepo
   $ hg commit -m 0
 
-  $ hg grsync
+  $ hg grupdate
   abort: guest at path 'mygr' has no changeset identifier
   [255]
 
   $ echo > .hggrmapping
   $ hg commit -m 1
 
-  $ hg grsync
+  $ hg grupdate
   abort: Could not resolve guest repo mapping mygr-name
   [255]
 
 
   $ echo > .hgguestrepo
   $ hg commit -m 2
-  $ hg grsync
+  $ hg grupdate
 
 Test with bad number of threads
-  $ hg grsync -j -2
+  $ hg grupdate -j -2
   abort: number of threads must be at least one
   [255]
 
   $ hg remove .hgguestrepo
   $ hg commit -m 3
 
-  $ hg grsync
+  $ hg grupdate
   abort: No such file or directory: */.hgguestrepo (glob)
   [255]

File tests/test-multihead.t

   guest: multiple heads for branch default
 
 Should also warn when updating
-  $ hg grsync
-  syncing guest
+  $ hg grupdate
+  GR updating guest
   guest: multiple heads for branch default
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved

File tests/test-nested.t

   $ hg commit -m 0
 
 Should get some kind of error about nested repos
-  $ hg grsync
+  $ hg grupdate
   abort: guest at 'mygr1/mygr2' is nested in guest at 'mygr1'
   [255]

File tests/test-out.t

+# Guestrepo: A Mercurial Extension for the managing of components
+# Copyright (C) 2012   Schweitzer Engineering Laboratories, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Contact information:
+
+# opensource@selinc.com
+
+# Schweitzer Engineering Laboratories, Inc.
+# 2350 NE Hopkins Court
+# Pullman, WA 99163 - USA
+
+  $ TESTDIR=`pwd`
+
+Setup copied from test recursive clone
+
+Make three recursive repos: host -> gr1 -> gr2
+  $ hg init gr2
+  $ cd gr2
+  $ echo c0 > f
+  $ hg add f
+  $ hg commit -m 0
+  $ cd ..
+
+  $ hg init gr1
+  $ cd gr1
+  $ echo c0 > f
+  $ echo mygr = mygr-name default >> .hgguestrepo
+  $ echo mygr-name = `readlink -f -n ../gr2` >> .hggrmapping
+  $ hg add .hgguestrepo .hggrmapping f
+  $ hg commit -m 0
+  $ cd ..
+
+  $ hg init host
+  $ cd host
+  $ echo mygr = mygr-name default >> .hgguestrepo
+  $ echo mygr-name = `readlink -f -n ../gr1` >> .hggrmapping
+  $ hg add .hgguestrepo .hggrmapping
+  $ hg commit -m 0
+  $ cd ..
+
+Get guest repos
+  $ hg grupdate -R host
+  cloning mygr
+  updating to branch default
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  cloning mygr
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+
+Make a change to both guests
+  $ cd $TESTDIR/host/mygr
+  $ echo c1 > f
+  $ hg commit -m 1
+
+  $ cd $TESTDIR/host/mygr/mygr
+  $ echo c1 > f
+  $ hg commit -m 1
+
+Push the changes
+  $ cd $TESTDIR/host
+  $ hg grout
+  comparing with /tmp/cramtests-*/test-out.t/gr1 (glob)
+  searching for changes
+  changeset:   1:* (glob)
+  tag:         tip
+  user:        * (glob)
+  date:        .+ (re)
+  summary:     1
+  
+  comparing with /tmp/cramtests-*/test-out.t/gr2 (glob)
+  searching for changes
+  changeset:   1:* (glob)
+  tag:         tip
+  user:        * (glob)
+  date:        .+ (re)
+  summary:     1
+  
+

File tests/test-pull-and-update.t

+# Guestrepo: A Mercurial Extension for the managing of components
+# Copyright (C) 2012   Schweitzer Engineering Laboratories, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Contact information:
+
+# opensource@selinc.com
+
+# Schweitzer Engineering Laboratories, Inc.
+# 2350 NE Hopkins Court
+# Pullman, WA 99163 - USA
+
+Pull and sync perform the same action on nonexistant repos.
+
+This file tests that repos are cloned correctly
+
+  $ TESTDIR=`pwd`
+
+Make a guest repo:
+  $ mkdir gr1
+  $ cd gr1
+  $ hg init
+  $ echo c0 > f
+  $ hg add f
+  $ hg commit -m 0
+  $ cd ..
+
+Make host:
+  $ mkdir host
+  $ cd host
+  $ hg init
+  $ echo mygr1 = mygr1-name default >> .hgguestrepo
+  $ echo mygr1-name = `readlink -f -n ../gr1` >> .hggrmapping
+  $ hg add .hgguestrepo .hggrmapping
+  $ hg commit -m 0
+
+Test Pull with clone:
+  $ hg grpull
+  cloning mygr1
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+Check that guest repo exists and was updated
+  $ hg id -n -R $TESTDIR/host/mygr1
+  0
+  $ rm -rf $TESTDIR/host/mygr1
+
+Test sync with clone:
+  $ hg grupdate
+  cloning mygr1
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+Check that guest repo exists and was updated
+  $ hg id -n -R $TESTDIR/host/mygr1
+  0
+  $ rm -rf $TESTDIR/host/mygr1
+
+Remove guest repo and change a deeper directory
+  $ cd $TESTDIR/host
+  $ rm -rf ./mygr1
+  $ echo many/dirs/deep/mygr1 = mygr1-name default > .hgguestrepo
+  $ hg commit -m 1
+
+Run same cloning pull as last time:
+  $ hg grpull
+  cloning many/dirs/deep/mygr1
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd many/dirs/deep/mygr1
+  $ hg id -n
+  0
+
+clean up:
+  $ cd $TESTDIR/host
+  $ rm -rf many
+
+Run cloning sync
+  $ hg grupdate
+  cloning many/dirs/deep/mygr1
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd many/dirs/deep/mygr1
+  $ hg id -n
+  0
+
+clean up
+  $ cd $TESTDIR/host
+  $ rm -rf many
+
+Add another branch to the guest repo so we can test pull/cloning to a branch
+  $ cd $TESTDIR/gr1
+  $ hg branch b1 2>&1 | grep -v "did you want a bookmark"
+  marked working directory as branch b1
+  $ echo c1 > f
+  $ hg commit -m c1
+
+Add another commit to default to be sure we are selecting the branch
+  $ hg up default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo c2 > f
+  $ hg commit -m c2
+
+Pull and clone to a specific branch
+  $ cd $TESTDIR/host
+  $ echo mygr1 = mygr1-name b1 > .hgguestrepo
+  $ hg commit -m 2
+  $ hg grpull
+  cloning mygr1
+  updating to branch b1
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat mygr1/f
+  c1
+  $ hg branch -R ./mygr1
+  b1
+
+Sync clone to specific branch
+  $ rm -rf ./mygr1
+  $ hg grupdate
+  cloning mygr1
+  updating to branch b1
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat mygr1/f
+  c1
+  $ hg branch -R ./mygr1
+  b1

File tests/test-push.t

   $ cd ..
 
 Get guest repos
-  $ hg grsync -R host
+  $ hg grupdate -R host
   cloning mygr
   updating to branch default
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved

File tests/test-recursive-clone.t

 Clean up:
   $ rm -rf ./host/mygr
 
-Test recursive sync clone
-  $ hg grsync -R host --traceback
+Test recursive update clone
+  $ hg grupdate -R host --traceback
   cloning mygr
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd $TESTDIR
 
 Sync the the default branch with the guest repo
-  $ hg grsync -R host
-  syncing mygr
+  $ hg grupdate -R host
+  GR updating mygr
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   cloning mygr
   updating to branch default

File tests/test-summary.t

   $ hg commit -m 0
 
 Sync and test summary
-  $ hg grsync
+  $ hg grupdate
   cloning mygr
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved