remote-bzr: update working tree upon pushing
authorFelipe Contreras <felipe.contreras@gmail.com>
Sun, 11 Nov 2012 14:19:55 +0000 (15:19 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Dec 2012 23:55:41 +0000 (15:55 -0800)
A 'git push' doesn't update the working directory on the remote, but
a 'bzr push' does. Teach the remote helper for bzr to update the
working tree on the bzr side upon pushing via the "export" command.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-bzr
index 2c05f35ef78e611c7a6f31527e622198dcba5a38..5b89a0537193d72ddb25a180020108243541687f 100755 (executable)
@@ -571,6 +571,8 @@ def do_export(parser):
             repo.generate_revision_history(revid, marks.get_tip('master'))
             revno, revid = repo.last_revision_info()
             peer.import_last_revision_info_and_tags(repo, revno, revid)
             repo.generate_revision_history(revid, marks.get_tip('master'))
             revno, revid = repo.last_revision_info()
             peer.import_last_revision_info_and_tags(repo, revno, revid)
+            wt = peer.bzrdir.open_workingtree()
+            wt.update()
         print "ok %s" % ref
     print
 
         print "ok %s" % ref
     print