[darcs-users] pull -m is not honored on the first patch
Andrew Pimlott
andrew at pimlott.net
Wed Apr 28 03:52:13 UTC 2004
In pull, the -m expression is not applied to the first candidate patch;
this patch is offered for pulling unconditionally. This seems wrong and
is not consistent with unpull.
% mkdir a b
% cd a
/a% darcs inittree
Successfully initialized tree!
/a% echo hello > world
/a% darcs add world
/a% darcs record -a
What is the patch name? world
Do you want to add a long comment? [yn] n
Finished recording patch 'world'
/a% cd ../b
/b% darcs inittree
Successfully initialized tree!
/b% darcs pull -m nosuch ../a
Tue Apr 27 20:49:52 PDT 2004 andrew at pimlott.net
* world
Shall I pull this patch? [ynWvxqdjk?] y
So far so good... finished merging.
Finished pulling.
/b% darcs unpull -m nosuch
Cancelling unpull since no patch was selected.
The difference in the code is that unpull calls
with_selected_patch_from_repo, while pull calls with_selected_changes.
The latter calls text_select on the first patch, which unconditionally
offers it, and only calls tentatively_text_select, which checks whether
the patch matches the expression, on subsequent patches.
Andrew
More information about the darcs-users
mailing list