On Fri, May 06, 2005 at 02:09:32PM +0200, Thomas Zander wrote:
> On Fri, May 06, 2005 at 02:45:09PM +0300, Jani Monoses wrote:
> > Hello
> >
> > is there a way - besides being careful ;) - of preventing darcs to pull
> > between two completely unrelated repos?
> >
> > Do I understand right that since repos can evolve in time by patches being
> > deleted from them, there is no guarrantee that two repos can decide if they
> > share a common ancestry by looking at the inventories?
> >
> > I used command line history in the shell and the last darcs pull -v had an
> > URL pertaining to another object. If it had an -a on the commandline and
> > had I pressed return it might have polluted the repo I was currently in :)
>
> This auto detection is certainly needed in one way or another; if nothing else
> then to give a warning to the user that something fishy might be going on.
> Some things like less then 5% of the patches in each repository being shared
> could be a simple trick to avoid a long wait, or worse.
>
> Basically; what I'd like to see is this:
> on darcs push -a the diff being done between the local and remote patches-list
> should detect tell-tale signs of 'too many differences'.
> When that is detected the user should be asked if he really wants to procede
> with a prompt like this:
> updating repo '[EMAIL PROTECTED]/repo'.
> warning; all 1040 patches need to be pushed to a repo already containing
> 300 patches are you sure this is what you want?
>
> ps. a summary after a darcs (push|pull) -a of work done would also be really
> usefull!
>
> Should I file a bugreport on these issues? Or do others have better ideas?
I have _another_ idea, maybe not better.
I have been thinking about 'initialize' generating a hash
string and store it in _darcs/repo_id. 'get/put' should copy
the id and 'pull/push/send/apply' should compare them.
I can think of one special case where this would not work
as expected. If you instead of 'get' a repo 'init' an
empty repo and try to pull into it. I don't know it it's
worth handling that special case ('pull/push/send/apply'
can overwrite the id in empty repos).
A "common" repo from which you pull patches to many other
repos to fill them with "common" stuff is also a problem.
Perhaps deleting _darcs/repo_id should be enough to disable
the same-repo check?
And then the question: is darcs-unstable and darcs the "same"
repo? You want to pull between them, but you might want a
warning if you accidently try to 'pull -a'. You might want to
be able to generate new unique hash ids to "separate" branches.
Just some ideas.
--
Tommy Pettersson <[EMAIL PROTECTED]>
_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users