moving CL's around

13 views
Skip to first unread message

at

unread,
Dec 14, 2010, 8:42:54 AM12/14/10
to golan...@googlegroups.com
nuts,

    I have a few CL's that I'm working on and want to move them from one computer to the next (i.e. work <-> home).  Is there something built into the system to allow this, or is the best way to just tar and copy?

_nil

Eoghan Sherry

unread,
Dec 14, 2010, 9:00:32 AM12/14/10
to at, golan...@googlegroups.com

You can put them on codereview.appspot.com with 'hg change'
and 'hg upload' and pull them down on another machine
with 'hg clpatch'. Try 'hg help codereview' for the full list of commands.
Also, keep the reviewer field empty if they're not ready for review.
Otherwise, they'll be listed in the reviewer's account.

But, a tar and copy may be easier.

Eoghan

at

unread,
Dec 14, 2010, 9:04:07 AM12/14/10
to Eoghan Sherry, golan...@googlegroups.com
I tried this originally with and it was failing on hg patch.  I'll play around and see if it's a bug or me being an idiot.  Thanks for the tip.

Eoghan Sherry

unread,
Dec 14, 2010, 9:35:57 AM12/14/10
to at, golan...@googlegroups.com
On 14 December 2010 09:04, at <arctanof...@gmail.com> wrote:
> I tried this originally with and it was failing on hg patch.  I'll play
> around and see if it's a bug or me being an idiot.  Thanks for the tip.
>

Clpatch relies on hgpatch (src/cmd/hgpatch).
Did you build the tree before trying clpatch?

Eoghan

Russ Cox

unread,
Dec 14, 2010, 9:39:36 AM12/14/10
to at, golan...@googlegroups.com
>     I have a few CL's that I'm working on and want to move them from one
> computer to the next (i.e. work <-> home).  Is there something built into
> the system to allow this, or is the best way to just tar and copy?

Tar and copy (or rsync or unison or ...) is the best way.
upload + clpatch is okay but it's easy to get out of sync.

The actual metadata is in the .hg/codereview directory.
At minimum you need to copy the changed files from
the repository itself and the associated
.hg/codereview/cl.NNNNNN file.

If you really want to get complicated, I use a script
I call clpush that lets me turn individual CLs on and off.
The usage is to say "clpush" to get a list of known CLs
and then "clpush -NNNNNN" to turn off a CL or
"clpush +NNNNNN" to bring it back.
I think it's a little too fiddly to be part of the standard
Mercurial extension, and writing it in shell was faster
than Python anyway, but if you are interested I posted
a copy at https://gist.github.com/740498.
Using clpush you could "clpush -NNNNNN" and
then copy .hg/codereview/cl????.NNNNNN to the
other computer and there "clpush +NNNNNN".

Russ

Reply all
Reply to author
Forward
0 new messages