Ref T4338. Mercurial exits with exit code 1 and "no changes found" in stdout
when there's no changes. I've split up the pushRepositoryToMirror to make
the code a tad more readable.
It isn't perfect, but it works for me.
Differential D8107
Add basic support for mirroring Mercurial repositories richardvanvelzen on Jan 30 2014, 10:37 AM. Authored by Tags None Referenced Files
Subscribers
Details
Ref T4338. Mercurial exits with exit code 1 and "no changes found" in stdout It isn't perfect, but it works for me. pushed some changes to my hosted repo. Saw them appearing in the
Diff Detail
Event TimelineComment Actions This looks good to me. Two thoughts:
For reference, I think the git version of this command is pretty aggressive about overwriting the remote, although I'm not completely sure how the --mirror flag behaves in all cases. In any case, this looks like a huge step forward to me. If you hit any of those special cases, let me know and we can figure out what to do about them. Comment Actions Closed by commit rP28fcb5711bc8 (authored by Richard van Velzen <rvanvelzen@expert-shops.com>, committed by @epriestley). Comment Actions Good points. I had thought about the tip issue, which is probably true. This first version just pushes the tip to the remote instead of actually mirroring the entire repo. --force *should* be enough in all cases:
This basically means that --force implies --new-branch but it can be dangerous, in the same way that it's dangerous with git (it overwrites all changes on the remote). |