817 else: |
817 else: |
818 ui.status("(run 'hg update' to get a working copy)\n") |
818 ui.status("(run 'hg update' to get a working copy)\n") |
819 |
819 |
820 return r |
820 return r |
821 |
821 |
822 def push(ui, repo, dest="default-push"): |
822 def push(ui, repo, dest="default-push", force=False): |
823 """push changes to the specified destination""" |
823 """push changes to the specified destination""" |
824 dest = ui.expandpath(dest) |
824 dest = ui.expandpath(dest) |
825 ui.status('pushing to %s\n' % (dest)) |
825 ui.status('pushing to %s\n' % (dest)) |
826 |
826 |
827 other = hg.repository(ui, dest) |
827 other = hg.repository(ui, dest) |
828 r = repo.push(other) |
828 r = repo.push(other, force) |
829 return r |
829 return r |
830 |
830 |
831 def rawcommit(ui, repo, *flist, **rc): |
831 def rawcommit(ui, repo, *flist, **rc): |
832 "raw commit interface" |
832 "raw commit interface" |
833 if rc['text']: |
833 if rc['text']: |
1201 "paths": (paths, [], 'hg paths [name]'), |
1201 "paths": (paths, [], 'hg paths [name]'), |
1202 "^pull": |
1202 "^pull": |
1203 (pull, |
1203 (pull, |
1204 [('u', 'update', None, 'update working directory')], |
1204 [('u', 'update', None, 'update working directory')], |
1205 'hg pull [-u] [SOURCE]'), |
1205 'hg pull [-u] [SOURCE]'), |
1206 "^push": (push, [], 'hg push [DEST]'), |
1206 "^push": |
|
1207 (push, |
|
1208 [('f', 'force', None, 'force push')], |
|
1209 'hg push [DEST]'), |
1207 "rawcommit": |
1210 "rawcommit": |
1208 (rawcommit, |
1211 (rawcommit, |
1209 [('p', 'parent', [], 'parent'), |
1212 [('p', 'parent', [], 'parent'), |
1210 ('d', 'date', "", 'date code'), |
1213 ('d', 'date', "", 'date code'), |
1211 ('u', 'user', "", 'user'), |
1214 ('u', 'user', "", 'user'), |