Merge lp:~patrick-regan/bzr/ignoreclarify into lp:bzr

Proposed by Patrick Regan
Status: Merged
Merged at revision: not available
Proposed branch: lp:~patrick-regan/bzr/ignoreclarify
Merge into: lp:bzr
Diff against target: 46 lines (+26/-0)
2 files modified
bzrlib/builtins.py (+6/-0)
doc/en/tutorials/tutorial.txt (+20/-0)
To merge this branch: bzr merge lp:~patrick-regan/bzr/ignoreclarify
Reviewer Review Type Date Requested Status
Ian Clatworthy Approve
Patrick Regan (community) Needs Resubmitting
John A Meinel Needs Fixing
Review via email: mp+15019@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Patrick Regan (patrick-regan) wrote :

Bug #59608 was pretty old, and something I could help on.

I've added some more clarification in both the tutorial and the online help text that tells the user that the ignore command will create a .bzrignore file and also implicitly add it for the next commit.

My first contribution, please feel free to give input. I am expecting to make mistakes for the first few.

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick Regan wrote:
> Patrick Regan has proposed merging lp:~patrick-regan/bzr/ignoreclarify into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
> Related bugs:
> #59608 'bzr ignore' undocumented behaviour and misleading tutorial
> https://bugs.launchpad.net/bugs/59608
>
>
> Bug #59608 was pretty old, and something I could help on.
>
> I've added some more clarification in both the tutorial and the online help text that tells the user that the ignore command will create a .bzrignore file and also implicitly add it for the next commit.
>
> My first contribution, please feel free to give input. I am expecting to make mistakes for the first few.
>

+ In the case that a .bzrignore file does not exist, the ignore command
+ will create one and add the specified files or patterns to the newly
+ created file. The ignore command will also automatically add the
+ .bzrignore file to be versioned. If creating a .bzrignore file without
+ the use of the ignore command will require an explicit add command.
+

What about:

 "If a .bzrignore file does not exist, ..."

Creating a .bzrignore file without using the ignore command will
require an explicit add command.

I like the rest.

 review: needs_fixing

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksFtHQACgkQJdeBCYSNAANhEwCeIMX+uGpdTSkCtGciO0n5e6Et
TbkAn0jDb9sdxdKlwe5p3IpjVKI+I63l
=+eoA
-----END PGP SIGNATURE-----

review: Needs Fixing
Revision history for this message
Patrick Regan (patrick-regan) wrote :

My only concern with getting rid of the

"The ignore command will also automatically add the .bzrignore file to be versioned."

sentence is that the original bug complaint was the following:

"From observation of behaviour, not by reading code, it is apparent that 'ignore' creates a .bzrignore file if none exists, or appends to it if it exists already. That might be expected. 'ignore' ALSO does an implicit and silent ADD of .bzrignore to the versioned file set. That was not entirely expected, and the tutorial is misleading in this respect."

I added that sentence to specifically mention that it does do a silent ADD. Do you think that the mentioning of this implicit add in the tutorial is enough? I've since changed the other suggestions in my local branch.

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick Regan wrote:
> My only concern with getting rid of the
>
> "The ignore command will also automatically add the .bzrignore file to be versioned."
>
> sentence is that the original bug complaint was the following:
>
> "From observation of behaviour, not by reading code, it is apparent that 'ignore' creates a .bzrignore file if none exists, or appends to it if it exists already. That might be expected. 'ignore' ALSO does an implicit and silent ADD of .bzrignore to the versioned file set. That was not entirely expected, and the tutorial is misleading in this respect."
>
> I added that sentence to specifically mention that it does do a silent ADD. Do you think that the mentioning of this implicit add in the tutorial is enough? I've since changed the other suggestions in my local branch.

I wasn't asking to remove that line, just change the wording on the
first one, and rewrite the last. Keep everything else the same.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksFzL4ACgkQJdeBCYSNAANbcQCdHvCHakUGQDuGQuvDSd84gQ8v
8qIAn3p+BgXEX9XXj/W/GOaiiJqlHFmK
=e12A
-----END PGP SIGNATURE-----

Revision history for this message
Patrick Regan (patrick-regan) wrote :

Ok, sounds good. I'll post tonight.

Sent from Android phone.

On Thu, Nov 19, 2009 at 5:57 PM, John A Meinel <email address hidden>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Patrick Regan wrote:
> > My only concern with getting rid of the
> >
> > "The ignore command will also automatically add the .bzrignore file to be
> versioned."
> >
> > sentence is that the original bug complaint was the following:
> >
> > "From observation of behaviour, not by reading code, it is apparent that
> 'ignore' creates a .bzrignore file if none exists, or appends to it if it
> exists already. That might be expected. 'ignore' ALSO does an implicit and
> silent ADD of .bzrignore to the versioned file set. That was not entirely
> expected, and the tutorial is misleading in this respect."
> >
> > I added that sentence to specifically mention that it does do a silent
> ADD. Do you think that the mentioning of this implicit add in the tutorial
> is enough? I've since changed the other suggestions in my local branch.
>
>
> I wasn't asking to remove that line, just change the wording on the
> first one, and rewrite the last. Keep everything else the same.
>
> John
> =:->
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAksFzL4ACgkQJdeBCYSNAANbcQCdHvCHakUGQDuGQuvDSd84gQ8v
> 8qIAn3p+BgXEX9XXj/W/GOaiiJqlHFmK
> =e12A
> -----END PGP SIGNATURE-----
> --
> https://code.launchpad.net/~patrick-regan/bzr/ignoreclarify/+merge/15019
> You are the owner of lp:~patrick-regan/bzr/ignoreclarify.
>

Revision history for this message
Patrick Regan (patrick-regan) wrote :

This is a resubmition with the changes Mr. Meinel suggested.

review: Needs Resubmitting
Revision history for this message
Patrick Regan (patrick-regan) wrote :

> This is a resubmition with the changes Mr. Meinel suggested.
Please disregard this vote. I had thought that it was a tag, but just now realized that it was a vote. Please excuse the newbie mistake.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I'll go ahead and land this now given John's previous vote. Well done on getting your first patch through the system!

review: Approve
Revision history for this message
Patrick Regan (patrick-regan) wrote :

> I'll go ahead and land this now given John's previous vote. Well done on
> getting your first patch through the system!

Thanks, I had lots of help.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/builtins.py'
2--- bzrlib/builtins.py 2009-11-19 06:28:13 +0000
3+++ bzrlib/builtins.py 2009-11-19 23:34:11 +0000
4@@ -2577,6 +2577,12 @@
5
6 See ``bzr help patterns`` for details on the syntax of patterns.
7
8+ If a .bzrignore file does not exist, the ignore command
9+ will create one and add the specified files or patterns to the newly
10+ created file. The ignore command will also automatically add the
11+ .bzrignore file to be versioned. Creating a .bzrignore file without
12+ the use of the ignore command will require an explicit add command.
13+
14 To remove patterns from the ignore list, edit the .bzrignore file.
15 After adding, editing or deleting that file either indirectly by
16 using this command or directly by using an editor, be sure to commit
17
18=== modified file 'doc/en/tutorials/tutorial.txt'
19--- doc/en/tutorials/tutorial.txt 2009-09-02 16:03:51 +0000
20+++ doc/en/tutorials/tutorial.txt 2009-11-19 23:34:11 +0000
21@@ -403,6 +403,26 @@
22 % bzr commit -m "Add ignore patterns"
23
24
25+bzr ignore
26+----------
27+
28+As an alternative to editing the ``.bzrignore`` file, you can use the
29+``bzr ignore`` command. The ``bzr ignore`` command takes filenames and/or
30+patterns as arguments and then adds them to the ``.bzrignore`` file. If a
31+``.bzrignore`` file does not exist the ``bzr ignore`` command will
32+automatically create one for you, and implicitly add it to be versioned::
33+
34+ % bzr ignore tags
35+ % bzr status
36+ added:
37+ .bzrignore
38+
39+Just like when editing the ``.bzrignore`` file on your own, you should
40+commit the automatically created ``.bzrignore`` file::
41+
42+ % bzr commit -m "Added tags to ignore file"
43+
44+
45 Global ignores
46 --------------
47