Как обновить репозиторий после ветки

575
user1734229

Когда я создаю новую ветку с Mercurial, я могу вытянуть только эту определенную ветку с:

hg pull -b <branchname> 

Консоль печатает количество файлов, которые были изменены, поэтому проблем с этим нет.

Но, когда я делаю :

hg update 

Хранилище не обновляется, и поэтому я должен объединить эту новую ветку и вернуться в ветку «по умолчанию», чтобы получить эти обновления.

пожалуйста, в чем здесь проблема?

0
вам нужно зафиксировать свои изменения Sathya 9 лет назад 0

1 ответ на вопрос

0
Lazy Badger

When you pull specific branch, you (by design) pull branch's HEAD and all it's ancestors

Mergeset, which merge this head into default branch (if exist) is not

  • ancestor of branch-head
  • changeset in branch <branchname>

and due to these two reasons can not be pulled.

It's not a problem, but correct and expected behavior.

If you asked "Why I didn't update to head", you have to re-read hg help update

If no changeset is specified, update to the tip of the current named branch

(i.e if your . was in default branch before, hg up will not change branch, you must hg up <branchname> for cross-branch updating)