Mercurial: pull changes from unversioned copy

I currently maintain the repository of the Mercurial project I'm working on.

The rest of the team, however, does not.

There is a “good” (unversioned) copy of the code base that I can access through SSH. What I would like to do is make something like hg pullfrom this good copy into my main repository whenever it is updated.

As far as I can tell, there is no obvious way to do this, as it hg pullrequires an original hg repository.

I guess I could use a utility like rsyncto update my repository and then commit, but I was wondering:

Was there an easier / less inventive way to do this?

+3
source share
1 answer

In short: not what I know.

If I were in your place, I would save the "central" code in one branch, make my dev in another branch, and then have scripts that would push / pull accordingly.

For example, a pull script would be:

  • hg co central (make sure you cancel if the working copy had uncommitted changes)
  • rsync ssh://central/repo
  • hg ci -m "snapshot of central on $(date)"

Pressing a script will look something like this:

  • ./pull
  • hg co central
  • hg merge <your working branch>
  • ... check, fix any conflicts ...
  • rsync . ssh://central/repo

Finally, I would apply the key wand liberally until the rest of the crew is on board :) (although you probably already knew that).

+4
source

Source: https://habr.com/ru/post/1748908/


All Articles