hgext/relink.py
changeset 13659 a73f38d8bbdb
parent 13656 0e200e1801f4
parent 13658 6cc306093b99
child 13898 77b09a7fc8fc
--- a/hgext/relink.py	Wed Mar 16 13:51:47 2011 +0100
+++ b/hgext/relink.py	Wed Mar 16 16:07:06 2011 +0100
@@ -42,8 +42,12 @@
         hg.remoteui(repo, opts),
         ui.expandpath(origin or 'default-relink', origin or 'default'))
     if not src.local():
-        raise util.Abort('must specify local origin repository')
+        raise util.Abort(_('must specify local origin repository'))
     ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path))
+    if repo.root == src.root:
+        ui.status(_('there is nothing to relink\n'))
+        return
+
     locallock = repo.lock()
     try:
         remotelock = src.lock()