equal
deleted
inserted
replaced
36 command is running. (Both repositories will be locked against |
36 command is running. (Both repositories will be locked against |
37 writes.) |
37 writes.) |
38 """ |
38 """ |
39 if not hasattr(util, 'samefile') or not hasattr(util, 'samedevice'): |
39 if not hasattr(util, 'samefile') or not hasattr(util, 'samedevice'): |
40 raise util.Abort(_('hardlinks are not supported on this system')) |
40 raise util.Abort(_('hardlinks are not supported on this system')) |
41 src = hg.repository(hg.remoteui(repo, opts), |
41 src = hg.repository(ui, ui.expandpath(origin or 'default-relink', |
42 ui.expandpath(origin or 'default-relink', |
42 origin or 'default')) |
43 origin or 'default')) |
|
44 if not src.local(): |
43 if not src.local(): |
45 raise util.Abort(_('must specify local origin repository')) |
44 raise util.Abort(_('must specify local origin repository')) |
46 ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path)) |
45 ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path)) |
47 if repo.root == src.root: |
46 if repo.root == src.root: |
48 ui.status(_('there is nothing to relink\n')) |
47 ui.status(_('there is nothing to relink\n')) |