[PATCH 5 of 5] Make hg import --exact work when a new branch is created by an import

hopper at omnifarious.org hopper at omnifarious.org
Thu May 17 16:44:06 UTC 2007


# HG changeset patch
# User Eric Hopper <hopper at omnifarious.org>
# Date 1179419432 25200
# Node ID 5f5ef91bb746fbce9d614f709c6ec6777ed6c039
# Parent  9011e30244966538e71fe261d4e40cedaa1007a1
Make hg import --exact work when a new branch is created by an import.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1547,6 +1547,7 @@ def import_(ui, repo, patch1, *patches, 
                 if p1 != wp[0].node():
                     hg.clean(repo, p1, wlock=wlock)
                 repo.dirstate.setparents(p1, p2)
+                repo.dirstate.setbranch(branch or 'default')
             elif p2:
                 try:
                     p1 = repo.lookup(p1)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20070517/2bac3d03/attachment.asc>


More information about the Mercurial-devel mailing list