[PATCH 4 of 4] 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 22:17:14 CDT 2007


# HG changeset patch
# User Eric Hopper <hopper at omnifarious.org>
# Date 1179457792 25200
# Node ID af8db3b42a4a1800293dc1290f116a5d5d623a8a
# Parent  32ea809e5bd1f4164c3998ab105c9d895698f4f1
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://selenic.com/pipermail/mercurial-devel/attachments/20070517/7c7be339/attachment.pgp 


More information about the Mercurial-devel mailing list