Show More
@@ -42,8 +42,12 b' def relink(ui, repo, origin=None, **opts' | |||||
42 | hg.remoteui(repo, opts), |
|
42 | hg.remoteui(repo, opts), | |
43 | ui.expandpath(origin or 'default-relink', origin or 'default')) |
|
43 | ui.expandpath(origin or 'default-relink', origin or 'default')) | |
44 | if not src.local(): |
|
44 | if not src.local(): | |
45 | raise util.Abort('must specify local origin repository') |
|
45 | raise util.Abort(_('must specify local origin repository')) | |
46 | ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path)) |
|
46 | ui.status(_('relinking %s to %s\n') % (src.store.path, repo.store.path)) | |
|
47 | if repo.root == src.root: | |||
|
48 | ui.status(_('there is nothing to relink\n')) | |||
|
49 | return | |||
|
50 | ||||
47 | locallock = repo.lock() |
|
51 | locallock = repo.lock() | |
48 | try: |
|
52 | try: | |
49 | remotelock = src.lock() |
|
53 | remotelock = src.lock() |
@@ -36,6 +36,13 b' formatting of final byte count' | |||||
36 | $ cat $TESTDIR/binfile.bin >> b |
|
36 | $ cat $TESTDIR/binfile.bin >> b | |
37 | $ hg ci -m anotherchange |
|
37 | $ hg ci -m anotherchange | |
38 |
|
38 | |||
|
39 | don't sit forever trying to double-lock the source repo | |||
|
40 | ||||
|
41 | $ hg relink . | |||
|
42 | relinking $TESTTMP/repo/.hg/store to $TESTTMP/repo/.hg/store | |||
|
43 | there is nothing to relink | |||
|
44 | ||||
|
45 | ||||
39 | Test files are read in binary mode |
|
46 | Test files are read in binary mode | |
40 |
|
47 | |||
41 | $ python -c "file('.hg/store/data/dummy.i', 'wb').write('a\r\nb\n')" |
|
48 | $ python -c "file('.hg/store/data/dummy.i', 'wb').write('a\r\nb\n')" |
General Comments 0
You need to be logged in to leave comments.
Login now