Merging unrelated repositories

Craig Ozancin c.ozancin at gmail.com
Thu Jan 27 16:04:42 UTC 2022


I have done this in the past. The issue that I found is that while the hg
pull -f does force inclusion of the second repository. it does not connect
the two internally.  If you do heads. it lists two
heads. If you do an hg log -G and scroll down to where the second
repository was first pull, you will see the disconnection.

o  changeset:   9:c5a5c05e6bc8
|  user:        User
|  date:        Sun Jun 10 23:16:11 2018 -0600
|  summary:     Using standard build script.
|
o  changeset:   8:537463af535e
   parent:      -1:000000000000
   user:        User
   date:        Mon Aug 29 18:52:33 2016 -0600
   summary:     Initial Checkin

o  changeset:   7:2ba59a679a17
|  user:        User
|  date:        Sun Mar 28 11:09:43 2021 -0600
|  summary:     Fixed all permissions
|
o  changeset:   6:af6a3960bf17
|  user:        User
|  date:        Sun Mar 28 11:06:14 2021 -0600
|  summary:     Added String Appliations:

I joined the two by running

hg rebase -s 8 -d 7
hg update

For me this fixed the issue.



On Thu, Jan 27, 2022 at 12:42 AM Becker, Mischa J <mischa.becker at kroger.com>
wrote:

> > From: Chris Green
> > Sent: Tuesday, January 25, 2022 1:48 PM
> > Subject: Re: Merging unrelated repositories
> >
> > On Tue, Jan 25, 2022 at 09:39:03PM +0000, Chris Green wrote:
> > [snip]
> > >
> > > I've just tried it on a copy and it does seem to work OK, can someone
> > > just expand/explain a little please.
> > >
> > Except that it doesn't work, every other directory in my repository seems
> > to have dispappeared!  Fortunately it's a copy so it doesn't matter but I
> > really don't understand what it's done.
> >
> > In my original (unchanged) main repository I can see:-
> >
> >     chris at esprimo$ cd .cfg
> >     /home/chris/.cfg
> >     chris at esprimo$ ls share
> >     archive  mpv  temperature
> >     chris at esprimo$ ls lib
> >     python
> >     ris at esprimo$ ls hosts
> >     backup  bison  dns  esprimo  isbd  odin  t470  x201
> >
> > In the copy, after the merge, I see:-
> >
> >     chris at esprimo$ cd ~/tmp/cfg
> >     /home/chris/tmp/cfg
> >     chris at esprimo$ ls share
> >     temperature
> >     chris at esprimo$ ls lib
> >     python
> >     chris at esprimo$ ls hosts
> >     bison  dns  esprimo  t470
> >
> >
> > So what on earth went wrong?
>
> Are you sure those missing folders have files that are being tracked at
> tip in your original repo?  If not, they wouldn't get included in the clone.
>
> Mischa
>
> ________________________________
>
> This e-mail message, including any attachments, is for the sole use of the
> intended recipient(s) and may contain information that is confidential and
> protected by law from unauthorized disclosure. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply e-mail and destroy all copies
> of the original message.
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20220127/b72453f1/attachment-0002.html>


More information about the Mercurial mailing list