darcs

Patch 250 resolve issue1784: push and pull print remote address ...

Title resolve issue1784: push and pull print remote address ...
Superseder Nosy List gh, guillaume.hoffmann, kowey, mornfall
Related Issues
Status accepted Assigned To mornfall
Milestone

Created on 2010-05-15.16:02:15 by gh, last changed 2011-05-10.22:06:47 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
resolve-issue1784_-push-and-pull-print-remote-address-right-away.dpatch gh, 2010-05-15.16:02:15 text/x-darcs-patch
resolve-issue1784_-push-and-pull-print-remote-address-right-away.dpatch guillaume.hoffmann, 2010-05-18.16:00:20 text/x-darcs-patch
unnamed gh, 2010-05-15.16:02:15
unnamed guillaume.hoffmann, 2010-05-18.16:00:20
See mailing list archives for discussion on individual patches.
Messages
msg11074 (view) Author: gh Date: 2010-05-15.16:02:15
1 patch for repository http://darcs.net:

Sat May 15 18:00:46 CEST 2010  Guillaume Hoffmann <guillaumh@gmail.com>
  * resolve issue1784: push and pull print remote address right away
Attachments
msg11075 (view) Author: gh Date: 2010-05-15.16:11:57
A little explanation:

the problem this patch solves is that darcs pull and darcs push first
wait to have an answer from the server before printing its address.
This can be annoying when the server is down or when you don't
remember what is the default server of your repository.

More generally, it is a good usability practise to tell the user why
they have to wait for the program to respond.

guillaume

On Sat, May 15, 2010 at 6:02 PM, gh <bugs@darcs.net> wrote:
>
> New submission from gh <guillaumh@gmail.com>:
>
> 1 patch for repository http://darcs.net:
>
> Sat May 15 18:00:46 CEST 2010  Guillaume Hoffmann <guillaumh@gmail.com>
>  * resolve issue1784: push and pull print remote address right away
>
> ----------
> files: resolve-issue1784_-push-and-pull-print-remote-address-right-away.dpatch, unnamed
> messages: 11074
> nosy: gh
> status: needs-review
> title: resolve issue1784: push and pull print remote address ...
>
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/patch250>
> __________________________________
msg11087 (view) Author: mornfall Date: 2010-05-18.13:16:08
gh <bugs@darcs.net> writes:

> Sat May 15 18:00:46 CEST 2010  Guillaume Hoffmann <guillaumh@gmail.com>
>   * resolve issue1784: push and pull print remote address right away
>
> [resolve issue1784: push and pull print remote address right away
> Guillaume Hoffmann <guillaumh@gmail.com>**20100515160046
>  Ignore-this: 345d1244aee3645ae6591104b06b8c1d
> ] hunk ./src/Darcs/Commands/Pull.lhs 198
>    -- Test to make sure we aren't trying to pull from the current repo
>    when (null repodirs) $
>          fail "Can't pull from current repository!"
> -  (Sealed them, Sealed compl) <- readRepos repository opts repodirs
>    old_default <- getPreflist "defaultrepo"
>    setDefaultrepo (head repodirs) opts
>    mapM_ (addToPreflist "repos") repodirs
> hunk ./src/Darcs/Commands/Pull.lhs 204
>    when (old_default == repodirs) $
>        let pulling = if DryRun `elem` opts then "Would pull" else "Pulling"
>        in  putInfo opts $ text $ pulling++" from "++concatMap formatPath repodirs++"..."
> +  (Sealed them, Sealed compl) <- readRepos repository opts repodirs
^^ The side effect of this is that we pollute the repo list
(_darcs/prefs/repos) with typos and such (i.e. repositories that are
unusable)... So I would argue that what should be moved is the message,
not the readRepos call.

> hunk ./src/Darcs/Commands/Push.lhs 125
>  prepareBundle :: forall p C(r u t) . (RepoPatch p) => [DarcsFlag] -> String -> Repository p C(r u t) ->
>                  IO (Doc)
>  prepareBundle opts repodir repository = do
> -  them <- identifyRepositoryFor repository repodir >>= read_repo
>    old_default <- getPreflist "defaultrepo"
>    setDefaultrepo repodir opts
>    when (old_default == [repodir]) $
> hunk ./src/Darcs/Commands/Push.lhs 130
>         let pushing = if DryRun `elem` opts then "Would push" else "Pushing"
>         in  putInfo opts $ text $ pushing++" to "++formatPath repodir++"..."
> +  them <- identifyRepositoryFor repository repodir >>= read_repo
>    us <- read_repo repository
>    common :>> us' <- return $ findCommonWithThem us them
>    prePushChatter opts us (reverseFL us') them
Same here.

Yours,
   Petr.
msg11088 (view) Author: guillaume.hoffmann Date: 2010-05-18.16:00:20
Thanks for the remark Petr. Here is a version that does not have the
bad side effect. I have tested it agains bogus repos addresses and
they do not get added to _darcs/prefs/repos .

guillaume

1 patch for repository http://darcs.net:

Tue May 18 17:42:33 CEST 2010  Guillaume Hoffmann <guillaumh@gmail.com>
  * resolve issue1784: push and pull print remote address right away
Attachments
msg11146 (view) Author: kowey Date: 2010-05-29.13:09:13
May I send this back your way, Petr?
msg11155 (view) Author: kowey Date: 2010-05-29.14:16:50
On Tue, May 18, 2010 at 16:00:20 +0000, Guillaume Hoffmann wrote:
> Thanks for the remark Petr. Here is a version that does not have the
> bad side effect. I have tested it agains bogus repos addresses and
> they do not get added to _darcs/prefs/repos .

Looks good, thanks to Petr for the earlier skim.

Guillaume: send may be another one.  Perhaps get too.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg11158 (view) Author: darcswatch Date: 2010-05-29.14:44:08
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-bb225a25d02d67fd7a9ff859460d24d725d92745
msg14192 (view) Author: darcswatch Date: 2011-05-10.19:36:40
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-bb225a25d02d67fd7a9ff859460d24d725d92745
History
Date User Action Args
2010-05-15 16:02:15ghcreate
2010-05-15 16:03:19darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-fae4480ebe5c0c651efbac1f15a11da136dce734
2010-05-15 16:11:57ghsetmessages: + msg11075
2010-05-18 13:16:10mornfallsetnosy: + mornfall
messages: + msg11087
2010-05-18 16:00:20guillaume.hoffmannsetfiles: + resolve-issue1784_-push-and-pull-print-remote-address-right-away.dpatch, unnamed
nosy: + guillaume.hoffmann
messages: + msg11088
2010-05-18 16:05:35darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-fae4480ebe5c0c651efbac1f15a11da136dce734 -> http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-bb225a25d02d67fd7a9ff859460d24d725d92745
2010-05-29 13:09:13koweysetassignedto: mornfall
messages: + msg11146
nosy: + kowey
2010-05-29 14:16:50koweysetmessages: + msg11155
2010-05-29 14:44:08darcswatchsetstatus: needs-review -> accepted
messages: + msg11158
2011-05-10 19:36:40darcswatchsetmessages: + msg14192
2011-05-10 22:06:47darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-bb225a25d02d67fd7a9ff859460d24d725d92745 -> http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-fae4480ebe5c0c651efbac1f15a11da136dce734