changeset 783:7913a82a8cdd

Check mercurial/third-parties push conditions before pushing This prevents pushing MQ applied patches without --force.
author Patrick Mezard <pmezard@gmail.com>
date Tue, 01 Feb 2011 00:25:59 +0100
parents 1f1aeb1f5ffc
children f214fb3f92cd
files hgsubversion/wrappers.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -123,6 +123,9 @@ def push(repo, dest, force, revs):
     """
     assert not revs, 'designated revisions for push remains unimplemented.'
     cmdutil.bail_if_changed(repo)
+    checkpush = getattr(repo, 'checkpush', None)
+    if checkpush:
+        checkpush(force, revs)
     ui = repo.ui
     old_encoding = util.swap_out_encoding()
     # TODO: implement --rev/#rev support