[Dropbox without pushes]

cesar mena cesar.mena at gmail.com
Sat May 30 13:26:21 UTC 2020


cesar mena <cesar.mena at gmail.com> writes:

> Uwe Brauer <oub at mat.ucm.es> writes:
>
>>>>> "HK" == Harald Klimach <harald at klimachs.de> writes:
>>
>>    > Hi,
>>    >> 1. they push,
>>    >> 
>>    >> 2. I pull, merge and push back
>>
>>    > If you don't want them to bother with the merging, why have them push at
>>    > all? Just pull from their repositories, and push necessary merges back.
>>
>>    > If this is not possible either let them send the changesets by mail then
>>    > tell them to pull from your main repository again after your merge, or
>>    > create "forks" for them at places, where they can push to (one for each)
>>    > and you can pull from and push back again.
>>
>> Usually it is said, one should not use dropbox as a repository, in the
>> sense that pushes and pulls wouldn't work.
>>
>> But would the following work.
>>
>> I move my local repository to my local Dropbox folder which is
>> synchronized with my real Dropbox account.
>>
>> My colleagues would copy and modify the Dropbox folder and I would try
>> periodically try to commit their changes.
>>
>> I could also use the share extension. I tried that once or twice and
>> found its behavior confusing.
>>
>> Any comments?
>
> hi,
>
> use bundles.
>
> 1. have the dropbox repo be pull only for your colleagues. 
>
> 2. to commit their changes you (or they) could create bundles[1] and
> move them to dropbox.
>
>   a. hg ci -m "colleague changes"
>   b. hg bundle -f colleague.bundle.1 --base uwe-master
>   c. cp colleague.bundle.1 ~/Dropbox/incoming/
>
> 3. then you, as the sole committer, inspect and apply the bundles at
> your discretion.  ie, hg pull colleague.bundle.1
>
> you could even drive bundle creation from a tag (uwe-master above) from
> the main repository.
>
> if i may suggest, keep a non-dropbox copy of the repository on your
> computer and do your work there. then push to the dropbox one when you
> are ready to share.
>
> --
>
> [1] bundles preserve all revision history and can deal with branches.
> see hg help bundle.

hi again,

come to think of it, it can be simpler than what i suggested in:
https://www.mercurial-scm.org/pipermail/mercurial/2020-May/052000.html.

it's basically the same as the bundle idea, but we are letting mercurial
do its thing!

the strategy would be to keep a repo per colleague in dropbox and have
them push/pull there. then you can merge onto a central repo that would
be in dropbox as well and accessible as pull only to your colleagues.

but once again, if i may, keep a non-dropbox copy of the repository on
your computer and do your work there. then push to the dropbox one when
you are ready to share.  this way, should the dropbox repo become
corrupted, you can always re-clone the non-dropbox one.

cheers!






More information about the Mercurial mailing list