latvian
latvian

Reputation: 3225

How to pull & merge particular folder, file from other repo

I have few questions and i would appreciate your help:

  1. Say, i need specific folders from another repo merged into my repo/working dir. How would i do properly?

  2. If i pull anothers repo and then merge. Afterwards, realizing this is not working, so i call 'hg update -C'. Did this cleaned my repo from the changes i pulled from another repo that i released is not what i need?

  3. Can i do a pessimistic merge where it only adds and updates, but not deletes?

Thanks for helping learn Mercurial

Margots

Upvotes: 0

Views: 100

Answers (1)

Stephen Rasku
Stephen Rasku

Reputation: 2682

  1. I would just copy the needed files and folders from the other repo and commit them. You could technically do what you want as a merge but it's a manual, error-prone, finicky process.
  2. If you haven't committed your merge update -C will abandon the merge. Do update -C <myVersion> to get the specific version you want.
  3. This would be a messy process (see 1.) and I wouldn't bother. If there are problems you can always revert your file to a previous version.

Upvotes: 1

Related Questions